Facebook iOS SDK: application crashes immediately after launching with "Character not found: _ACFacebookAppIdKey". iOS 5 only

Symptoms: application crash after launch:

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 issue is specific to MonoTouch binding for SDK for iOS for Facebook, and this only happens for iOS 5.0 and 5.1. You can play it just by following the sample project on your iOS 5 device.

There is a related SO question ( Facebook SDK 3.1 for iOS - works on iOS6, but crashes on iOS 5.x ), which implies the introduction of a framework is optional. As far as I know, this cannot be done from Xamarin.iOS, but the LinkWith assembly LinkWith in the binding already has WeakFrameworks = "Accounts AdSupport Social" , which, I believe, is equivalent to the fact that these frameworks are optional in Xcode. So there is no help.

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

+6
source share
2 answers

This is a known bug fixed (but the patch has not yet reached any stable version of Xamarin.iOS - the bug report says that it will be included in release 6.2.2, but this did not happen).

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

+7
source

This can be solved very easily.

Click on your project Goals .

then go to summary

In Related Structures and Libraries

The required parameter changes to the optional three frameworks:

  • Social.framework

  • AdSupport.framework

  • Accounts.framework

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

+8
source

Source: https://habr.com/ru/post/943899/


All Articles