Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When trying to use Facebook compatibility:
FBSettings.IsPlatformCompatibilityEnabled = true; // to use Graph v1.0)
an exception is thrown:
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[FBSettings enablePlatformCompatibility]: unrecognized selector sent to class 0x106348c
at at (wrapper managed-to-native) ApiDefinition.Messaging:void_objc_msgSend_bool (intptr,intptr,bool)
at MonoTouch.FacebookConnect.FBSettings.set_IsPlatformCompatibilityEnabled (Boolean value) [0x00000] in <filename unknown>:0
at testApp.Login.ViewDidLoad () [0x00008] in /Users/user/Projects/testApp/testApp/ViewControllers/Login.cs:39
at at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string,intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String args, IntPtr principal, IntPtr delegate) [0x00005] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:62
at MonoTouch.UIKit.UIApplication.Main (System.String args, System.String principalClassName, System.String delegateClassName) [0x0001c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:45
at testApp.Application.Main (System.String args) [0x00008] in /Users/user/Projects/testApp/testApp/Main.cs:17
I have checked this issue and I am able to reproduce this issue.
When I try to set "IsPlatformCompatibilityEnabled" property of "FBSettings" class I am getting following exception:
"Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[FBSettings enablePlatformCompatibility]: unrecognized selector sent to class 0x4a5fa4"
Exception details: https://gist.github.com/saurabh360/3a82edce95689db68ebe
Build Output: https://gist.github.com/saurabh360/c4725ba594bb5382d9c4
=== Xamarin Studio ===
Version 5.6 (build 273)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Mono 3.10.0 ((detached/633e444)
GTK+ 2.24.23 (Raleigh theme)
Package version: 310000020
=== Xamarin.Android ===
Version: 4.18.0 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
Supported Android versions:
1.6 (API level 4)
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.0 (API level 11)
3.1 (API level 12)
3.2 (API level 13)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
=== Apple Developer Tools ===
Xcode 6.0.1 (6528)
=== Xamarin.iOS ===
Version: 22.214.171.124 (Business Edition)
Build date: 2014-10-12 21:49:14-0400
=== Xamarin.Mac ===
Version: 126.96.36.199 (Business Edition)
=== Build Information ===
Release ID: 506000273
Git revision: 4fdf44df17d841e324e22b99c0e4671360036dfd
Build date: 2014-10-07 18:16:52-04
=== Operating System ===
Mac OS X 10.9.5
Oh there seems to be a binding mistake, while the selector is definitely right enablePlatformCompatibility it is missing a semicolon on it.
I have submitted a fix to the component store, should be live in the next days as version 188.8.131.52
In the meantime you can workaround the issue by adding the following to your class:
[System.Runtime.InteropServices.DllImport (MonoTouch.Constants.ObjectiveCLibrary, EntryPoint = "objc_msgSend")]
public static extern void SetEnablePlatformCompatibility (IntPtr receiver, IntPtr selector, bool enable);
and then where you want to set it to true you do:
var classPtr = MonoTouch.ObjCRuntime.Class.GetHandle (typeof (FBSettings));
var enableSelector = MonoTouch.ObjCRuntime.Selector.GetHandle ("enablePlatformCompatibility:");
SetEnablePlatformCompatibility (classPtr, enableSelector, true);
that should unblock you.
Hope this helps.
Update is live at https://components.xamarin.com/view/facebookios
The update fixed the problem and Facebook v1.0 can be used.
This fix is very important for developers that still need to get user's complete friends list while it's possible - until 05/2015 for apps that were created before 04/2014.
Alex - 10x for the quick fix! :)
As per comment 5, this issue is fixed.
Hence closing this issue by marking it as Verified.