Archive for November, 2012

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.

MacOS, Rails, RSpec und Guard

Dienstag, November 6th, 2012

Gestern wollte ich auf meinem Mac (Lion) Guard aufsetzen, um in den Genuss automatisierten Testens zu kommen. Mit den richtigen naleitungen ist das ja auch gar kein Problem; dachte ich zumindest. Lief auch alles ganz prima: Spork startete durch und alle Specs wurden ebenfalls ausgeführt. Sogar Growl gab seinen bekanntlich leckeren Senf dazu. Aber was war das? Nach dem ersten Durchlauf erschien ein kommentarloses ‚Done.‘ und in der nächsten Zeile ein Prompt. Ok, dachte ich, das muss wohl so sein. Einige Recherchen später wusste ich nun auch über die interaktive Konsole des neuen Guard (1.5.3) Bescheid.

Das Üble war nur, dass auch wildeste Änderungen in den Specs oder Modeln Guard nicht dazu bewegten, die Specs erneut auszuführen. Sämtliche Konfigurationsänderungen wollten da auch keine Linderung bringen. Eine Rücksetzen auf Guard 0.8.8 brachte das Ganze wieder zum laufen (was brauche ich Guard, wenn Dateiänderungen nicht getrackt werden), aber warum zurück in die Steinzeit?

Irgendwann stieß ich dann auf den Guard Parameter ‚-i‘. Dieser sorgt dafür, dass die interaktive Konsole nicht aufgerufen wird. Starte ich nun Guard (1.5.3) mit ‚bundle exec guard -i‘, so läuft alles wie geschmiert.