Quickblox : Conflicts between ASI Http symbols and modules - ios5

I am trying to implement chat module in my app. I have referred Simple Sample code of QuickBlox API.
But when I try to register user from my app I got below error of linker.
my Code : -
// Create QuickBlox User entity
QBUUser *user = [QBUUser user];
user.password = _textPassword.text;
user.login = [DicResponse valueForKey:#"User name"];
// create User
[QBUsers signUp:user delegate:self];
In my app I am already using ASIHTTP library. If I comment this line [QBUsers signUp:user delegate:self]; then it compiles successfully.
How to solve this conflicts ?
duplicate symbol _isDismissing in:
/Users/abc/Library/Developer/Xcode/DerivedData/app-dtliqcvxngqgfwgzpbvmtupglcjd/Build/Intermediates/app.build/Debug-iphonesimulator/app.build/Objects-normal/i386/ASIAuthenticationDialog.o
/Projects/abc/Quickblox.framework/Quickblox(QBASIAuthenticationDialog.o)
duplicate symbol _NetworkRequestErrorDomain in:
/Users/abc/Library/Developer/Xcode/DerivedData/app-dtliqcvxngqgfwgzpbvmtupglcjd/Build/Intermediates/app.build/Debug-iphonesimulator/app.build/Objects-normal/i386/ASIHTTPRequest.o
/Projects/LockMEIfYouCan/Quickblox.framework/Quickblox(QBASIHTTPRequest.o)
duplicate symbol _RedirectionLimit in:
/Users/abc/Library/Developer/Xcode/DerivedData/app-dtliqcvxngqgfwgzpbvmtupglcjd/Build/Intermediates/app.build/Debug-iphonesimulator/app.build/Objects-normal/i386/ASIHTTPRequest.o
/Projects/app/Quickblox.framework/Quickblox(QBASIHTTPRequest.o)
ld: 3 duplicate symbols for architecture i386

You have to use latest QuickBlox iOS SDK version 1.4 or just download from QuickBlox iOS SDK GitHub page

Related

Adding Aviary In-App Purchases iOS

So I have tried to add Aviary's IAP purchases and have had little luck getting them to show up in my application. I have not made sure that following has happening
My Provisioning Profile being used to build the application has IAP's turned on
I have uploaded all of Aviary's IAP's to itunes connect
I have added the required code for IAP's in my app delegate:
[[AFPhotoEditorController inAppPurchaseManager] startObservingTransactions];
[AFPhotoEditorCustomization enableInAppPurchases:#YES];
Before I start my photo editor session I add the following code
AFPhotoEditorController* photoEditor = [[AFPhotoEditorController alloc] initWithImage:imgToBeEdited];
[AFPhotoEditorCustomization enableInAppPurchases:#YES];
mPhotoEditorSession = [photoEditor session];
editorController = photoEditor;
[photoEditor setDelegate:self];
They are not showing up at all and I am uncertain of what Aviary is taking care of and what I should be taking care of
I think it might have to do with this line in the documentation:
Add the following lines to your app delegate's -applicationFinishedLaunchingWithOptions: method before invoking any StoreKit framework methods:
[[AFPhotoEditorController inAppPurchaseManager] startObservingTransactions];
This line adds the in-app purchase manager singleton as an observer of the StoreKit payment queue returned by [SKPaymentQueue defaultQueue], and sets a flag enabling in-app purchase code throughout the SDK.
Has anyone added this to their application and let me know what Storekit methods I need to invoke? Any sample code is helpful.
thanks in advance!

facebook ios sdk isn't working. iphone

I followed all the steps from here http://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/ (Adding SDK & framework dependencies, Adding SQLite and the -ObjC linker flag, Adding the Facebook App ID), but I can't figure out why I get the error
Use of undeclared identifier 'FBSettings'
when I put
[FBSettings publishInstall:YOUR_APP_ID];
into
(void)applicationDidBecomeActive in AppDelegate.
Ok. I found the solution. I'm seeing the "fb_mobile_activate_app" event show up in the App Dashboard -> Insights -> App Events -> Overview
What I did:
Followed the iOS Getting Started instructions.
Added the deprecated headers, I'm sure there is a better way to do this but it worked for me. Add the headers by dragging the DeprecatedHeaders folder from the FacebookSDK.framework/Versions/A/DeprecatedHeaders folder into the Frameworks section of your Project Navigator. Choose 'Create groups for any added folders' and deselect 'Copy items into destination group's folder (if needed)'. This adds the headers as a reference.
Then I followed the Add the Facebook SDK instructions which was just adding the following code to the AppDeligate.m file right before the '#end' at the bottom of the file. This code should tell Facebook that the app was opened and that the app was installed from an ad click (DON"T FORGET TO CHANGE YOUR_APP_ID WITH YOUR FACEBOOK APP ID):
- (void)applicationDidBecomeActive:(UIApplication *)application {
NSLog(#"Application did become active.");
[FBSettings setDefaultAppID:#"YOUR_APP_ID"];
[FBAppEvents activateApp];
}
Added the this include to the very top of the AppDeligate.m file:
#import "FacebookSDK.h"
That's it. I now have this code in the app store and I'm getting install data for Facebook Ads.
I had the same issue but I just added:
#import <FacebookSDK/FacebookSDK.h>
And that got rid of my error.
See the demo ~/Documents/FacebookSDK/Samples/HelloFacebookSample to see it in action
You also have to import AdSupport.framework and Social.framework.

facebook using quickblox sdk instead of facebook-ios-sdk

Is it possible to integrate facebook in my app using quickblox sdk instead of facebook-ios-sdk ?
Sure, you can.
Download latest version of QuickBlox iOS SDK
http://quickblox.com/developers/IOS (1.2.0)
Make query
[QBUsers logInWithSocialProvider:#"facebook" delegate:self];
Enter you login & pass into webform
Catch result
// QuickBlox queries delegate
-(void)completedWithResult:(Result *)result{
// success result
if(result.success){
// User Login
if([result isKindOfClass:QBUUserLogInResult.class]){
QBUUserLogInResult *res = (QBUUserLogInResult *)result;
// Here is your Facebook access token
NSString *fbAccessToken = res.socialProviderToken;
NSDate *fbAccessTokenEpiresAt = res.socialProviderTokenExpiresAt
// Make query to Facebook Graph API with your access token
// ...
}else{
NSLog(#"Errors=%#", result.errors);
}
}
Also, You can see at ChattAR https://github.com/QuickBlox/ChattAR-ios src - we made some queries to Facebook Graph API without Facebook-ios-sdk
p.s. could you use 'quickblox' tag in QuickBlox related questions, thx.
You don't have to use the facebook sdk, it's just better to do so because they made the sdk, it's stable, it works... why recreate the wheel but, by all means, if you only want to do something simple then go for it.

How do I share documents using dropbox Api in iPhone app?

I am writing an app for iOS using dropbox Api.
My app has the following features,
1. User must be able to log in to his dropbox account, create document and upload.
2. He must be able to view his folder and file contents.
3. User must have the provision to share the documents with others.
I have completed the first 2 tasks, but finding it difficult to share the documents. I have referred dropbox developers forum but didn't get any solution.
Can anybody please tell me how do I do this?
Thanks in advance.
You can make a call to:
NSString *path = #"/yourfile.jpg";
[[self restClient] loadSharableLinkForFile:path];
Then you set up the delegate methods:
- (void)restClient:(DBRestClient*)restClient loadedSharableLink:(NSString*)link forFile:(NSString*)path
{
NSLog(#"link is %#", link);
}
- (void)restClient:(DBRestClient*)restClient loadSharableLinkFailedWithError:(NSError*)error
{
NSLog("%#", [error localizedDescription]);
}
You can find all the calls you need by looking inside the framework at DBRestClient.h.
Good luck!
The Dropbox API provides the /shares call ( https://www.dropbox.com/developers/reference/api#shares ) to allow you to create read-only shareable links ( https://www.dropbox.com/help/167 ) to any file or folder in the user's Dropbox. This call is available via the loadSharableLinkForFile: function in DBRestClient.m in the official Dropbox iOS SDK. (The Dropbox API does not currently offer any calls for read/write shared folders.)

iPhone: Cannot test InAppPurchase in sandbox after it is approved

I have a free iPhone App which uses in app purchase. I tested my first InAppPurchase with sandbox environment and it worked fine. After the InAppPurchase was approved and worked fine in App store, I added several new InAppPurchases in iTunes Connect and tried to test them in the sandbox environment. However I could not find these new InAppPurchases in my app.
The following is the code I uses to get InAppPurchase products:
//....
SKProductsRequest *prodRequest= [[SKProductsRequest alloc] initWithProductIdentifiers:
[NSSet setWithObject: prod]];
prodRequest.delegate = self;
[prodRequest start];
//....
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
int count = [response.products count];
NSLog(#"number of products:%d",count);
for (int i=0; i < count; i++) {
SKProduct* product = [response.products objectAtIndex:i];
NSLog(#"product %d:id=%# title=%# desc=%# price=%#", i, product.productIdentifier, product.localizedTitle,
product.localizedDescription,
product.price);
}
}
If I use the old InAppPurchase product id I can get it, but if I use any newly created product id I got count==0.
From what I saw, I guess may app may not be running in the sandbox environment after my first InAppPurchase was approved, but this is just a guess, because I don't know how to check if my app is in sandbox mode or not.
I searched Internet about this issue and tried the following:
1. created a new version of my app, uploaded it to iTunes connect, and rejected the binary. no use
2. deleted all my provisioning profiles and created new ones. no use
3. created an app id for my app in developer provisioning portal and created provisioning profile for that id and used it in Xcode. no use
My Xcode version was 3.2.5. I upgraded it to 4 but this did not fix the problem.
I am wondering if any one else has seen this issue and found a solution. Thanks.
OK I came across this post and got some hint:
Product Identifiers Are Valid On One Phone But Not Another
I just deleted the app from my iPod Touch, did not reboot, then tried to run my app from Xcode again, and it worked. I guess there was some states saved together with the app which determines whether to use sandbox environment for InAppPurchase or not. Although I could run my newly compiled binary without deleting the old app, I could not get rid of some old state which caused the app not running in the sandbox environment. That is what caused the problem. The solution is to delete the old app from the device before running newly compiled binary.