Wizcorp / phonegap-facebook-plugin

The official plugin for Facebook in Apache Cordova/PhoneGap
Other
1.9k stars 2.01k forks source link

phonegap-2.4.0 terminates in IOS #248

Closed nuthankumarns closed 11 years ago

nuthankumarns commented 11 years ago

Facebook wall post, calling FB.ui(params, function(obj) { console.log(obj);}); terminates

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFDictionary removeObjectForKey:]: mutating method sent to immutable object'

JonnyHeavey commented 11 years ago

I can confirm this issue and am also experiencing it.

shazron commented 11 years ago

With 2.4.0, NSJSONSerialization is used, thus objects returned are immutable: http://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html

Any NSDictionaries from the arguments should be considered immutable: https://github.com/phonegap/phonegap-facebook-plugin/blob/4993bdfed213593401c64d8233ebfdea37c484f8/native/ios/FacebookConnectPlugin.m#L284

I will submit a patch soon.

allanridolfi commented 11 years ago

there is a plugin for Facebook that still shows the same issue. it is https://github.com/mgcrea/cordova-facebook-connect.

I think the problem its with these lines:

}

shazron commented 11 years ago

Thanks @allanridolfi please file an issue at https://github.com/mgcrea/cordova-facebook-connect/issues so it will get noticed by the author.

allanridolfi commented 11 years ago

Thanks for your reply @shazron, the author should be in vacation :) this issue was already posted right there weeks ago. With your experience, could you plz try to help us? Me and the community will appreciate that much, as we already appreciate phonegap!