Archive for the ‘iOS’ Category

iOS 6, AddThisSDK and all that stuff you might need to ‚like‘ something (I’m no Facebook enthusiast)

Sonntag, November 11th, 2012

The AddThisSDK has some problems laying nicely with other frameworks (no encapsulated JSON library for instance). And the standard installation will also result in some errors.

If you’ll get BadAccess issues, be sure that the AddThis/ThirdPartyLibs/FBConnect folder contains nothing but the FacebookSDK folder. Anything else there (epsecially facebook classes) will cause problems as they may obscure the ‚real‘ FB classes.

For being able to build also for iOS 5 be sure to set iOS 6 relevant frameworks (social, fb) to ‚optional‘.

The Facebook configuration isn’t that well described; also all the parts can be found somewhere, it’s a lot of cherry picking. Therefore be sure to set the FB key/app id in the app delegate and also add it with key ‚FacebookAppID‘ in the applications plist file. There you also have to register the fb url scheme. Add an array with key ‚URL types‘, with one element (‚Item 0‘) as dictionary, that contains one element of type array with key ‚URL Schemes‘ and one element with key ‚Item 0‘ and value ‚fb<your_fb_pp_id>‘ (–> something like ‚fb3676876866767‘).

In the app delegate you also have to add: – (BOOL) application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation

which then returns :  return [FBSession.activeSession handleOpenURL:url];

Hopefully then everything works like a charm.