Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook iOS SDK: App crashes right after starting with "Symbol not found: _ACFacebookAppIdKey." only in iOS 5

Symptoms: app crashes right after starting:

OS Version:      iPhone OS 5.1.1 (9B206)
Report Version:  104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread:  0

Dyld Error Message:
  Symbol not found: _ACFacebookAppIdKey
  Referenced from: /var/mobile/Applications/C9CCEC42-DD12-40D1-91EE-965A8AC37AE4/MyApp.app/MyApp
  Expected in: /System/Library/Frameworks/Accounts.framework/Accounts
 in /var/mobile/Applications/1234EC42-0012-40D1-1234-965A8AC31234/MyApp.app/MyApp
  Dyld Version: 199.6

This problem is specific to the MonoTouch binding for the Facebook iOS SDK, and it only happens for iOS 5.0 and 5.1. It can be reproduced by simply running the sample project on an iOS 5 device.

There's a related SO question (Facebook SDK 3.1 for iOS - runs on iOS6, but crashes on iOS 5.x) which suggests making the framework optional. As far as I know, this cannot be done from Xamarin.iOS, but the LinkWith assembly attribute in the binding already has WeakFrameworks = "Accounts AdSupport Social", which I assume is the equivalent of making those frameworks optional in XCode. So, no help there.

The problem seems to be a bug in the MonoTouch binding, Xamarin.iOS, or the Facebook iOS SDK itself. Any ideas?

like image 805
Diego Avatar asked Apr 29 '13 17:04

Diego


2 Answers

It can be solved very easily..

Click on your project Targets.

then go to summary

Under Linked Frameworks and Libraries

Change Required Option into Optional of three Frameworks are :

  • Social.framework

  • AdSupport.framework

  • Accounts.framework

Now you can also run and check your code on iPAD or iPHONE simulator 5 or 5.1

like image 143
Pankaj Bhardwaj Avatar answered Nov 16 '22 23:11

Pankaj Bhardwaj


This is a known bug which has been fixed (but the fix hasn't reached any stable version of Xamarin.iOS yet - the bug report says it'll be included in the 6.2.2 release, but that didn't happen).

Currently the only known workaround is to use an older version of the Facebook SDK.

like image 24
Rolf Bjarne Kvinge Avatar answered Nov 16 '22 23:11

Rolf Bjarne Kvinge