I am making an app in Swift and Xcode 6 and everything has been working fine, until now. When I go to run it, I get a delegate error and it crashes immediately. Here is the debugger code:
2014-11-11 10:18:48.282 Pro Cast[2987:65789] *** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'You have to call setApplicationId:clientKey: on Parse to configure Parse.'
I've never had an issue with Parse up tot his point. What can I do?
You need to set your Parse applicationID and clientID in the AppDelegate.m. Specifically in didFinishLaunchingWithOptions You can get your appID and clientID on the parse website.
Don't forget to import the parse framework.
Related
Does anyone have a working xcode project they could upload / share?
I'm having trouble getting this to work clean without errors.
The example is located here.
[https://developers.facebook.com/docs/howtos/feed-dialog-using-ios-sdk/][1]
I have the project working to this extent -
The main viewcontroller is displayed with a button that allows the user to send a post to facebook.
When clicked, facebook indicates that the user has already authorized the app to post to their page. He clicks OK on the facebook message and then the user sees the 'share' dialog and is allowed to enter text for his post.
As the sharedialog is presented to the user, I get this warning in my console
2012-09-29 11:04:25.190 gw_fakeapp[8016:fe03] FBConditionalLog: handleOpenURL should not be called once a session has closed
My problem comes when the user clicks "share", I get the error:
2012-09-29 11:04:32.217 gw_fakeapp[8016:fe03] *** Terminating app due to uncaught exception 'com.facebook.sdk:InvalidOperationException', reason: 'FBSession: an attempt was made reauthorize permissions on an unopened session'
*** First throw call stack:
(0x14c9022 0xfe2cd6 0x14c8ee1 0x171d1 0x14367 0x3ad8 0x14cae99 0x14814e 0x386a0e 0x14cae99 0x14814e 0x1480e6 0x1eeade 0x1eefa7 0x1ee266 0x16d3c0 0x16d5e6 0x153dc4 0x147634 0x1da9ef5 0x149d195 0x1401ff2 0x14008da 0x13ffd84 0x13ffc9b 0x1da87d8 0x1da888a 0x145626 0x28ed 0x2815)
terminate called throwing an exception(lldb)
Does anyone have a working project I could compare mine with?
Thank you!
Phil
You can download sample of codes from developer.apple.com which describe about Facebook post publishing.
Here is the link: https://github.com/downloads/facebook/facebook-ios-sdk/FacebookSDK-3.1.pkg
I have Scringo all set up in my application. However after the user logs into facebook and returns to the app the app freezes and my log shows this error.
2012-07-24 10:25:56.724 BlackOps2[3558:907] -[__NSDictionaryM stringByAddingPercentEscapesUsingEncoding:]: unrecognized selector sent to instance 0x1cd510
2012-07-24 10:25:56.728 BlackOps2[3558:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM stringByAddingPercentEscapesUsingEncoding:]: unrecognized selector sent to instance 0x1cd510'
*** First throw call stack:
(0x3544356b 0x3572397f 0x354474fb 0x35445c0d 0x35397e68 0x2ba0b 0x24ead 0x30b49 0x42fc7 0x2242f 0x1c4f1 0x1c8c3 0x35fec5b5 0x35f3d991 0x35f3d8ad 0x318a6acf 0x318a61bb 0x318ce323 0x3538a2e1 0x318ce783 0x31832c65 0x35414143 0x354139a9 0x354126ef 0x35390c1d 0x35390aa9 0x3825433b 0x364fa535 0x2731 0x26f0)
libc++abi.dylib: terminate called throwing an exception
(gdb)
Any help would be great!!
I think that the problem is because your FB app includes some advanced setting that tells Facebook to use a response format that should be activated by default only in Oct, 2012 and your Scringo version still doesn't support it.
To make it work you should either:
1) Update to the latest Scringo version
or
2) Go to your FB app settings (where you registered your FB app), and choose the Advanced Settings. There, you'll see a Migration section. Make sure the following field is DISABLED:
October 2012 Breaking Changes (this will work until 3, Oct 2012)
i made an iphone App which I've submitted in the App store . The App is there in the App Store for about an year . It has basically a faceBook Login button . One fine day it crashes, the moment i click my Facebook login Button in my iPhone 4, iPhone 4s.When i try to run it in my Macbookpro it also crashed . I'm getting the error
"Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull lowercaseString]: unrecognized selector sent to instance 0x2125ce8'".........
It works fine in my iPhone 3Gs...please help me .How can a iPhone App crash After working fine for about an year. Is it something related to Facebook updated methods or related to iPhone version.The App crashes exactly after FBrequest is called !please help me I'm losing my reputation .......
Looks like there is a string in your app that is set to point to NSNull. The app crashes when you are attempting to make that string lowercase.
Since NSNull points to a static object of type NSNull, trying to send the message "lowercaseString" to it causes the app to crash. (if it had been nil, Objective-C would simply ignore the message)
Could it be that there is a string somewhere that used to be set to a value, but for some reason now has been removed and is set to NSNull? It could be due to changes in the FaceBook-API but it could also be caused by changes in what the server is sending to you, different information in your facebook account and many other things. The parser you are using may be setting NSNull instead of nil whenever a NULL-value is sent by the server.
Bare in mind that it might also not be related to Facebook at all, since you find different behaviour on iPhone3GS.
You could try to look around for NSString values in your code that you are trying to make lowercase. Use the debugger to try to identify strings that are of type NSNull. You can compare your strings to NSNull like this:
if (text == (id)[NSNull null]) {
// String is NSNull!
}
I have setup my application key and secret as well as added the facebook connect button to my view. When I select the button and login within the app, it crashes with the following error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CategoryQuoteViewController session:didLogin:]: unrecognized selector sent to instance 0x5d10800'
I have no idea what this is and cant find anything on the facebook wiki.
The - (void)session:(FBSession*)session didLogin:(FBUID)uid delegate method needed to be added.
My project builds fine but when it gets to line pasted bellow it crashes with the following message.
CODE:
oauthAPI = [[MPOAuthAPI alloc] initWithCredentials:credentials
authenticationURL:[NSURL URLWithString:#"https://twitter.com/oauth/"]
andBaseURL:[NSURL URLWithString:#"https://twitter.com/"]];
ERROR:
Assertion failure in
-[MPOAuthAuthenticationMethodOAuth initWithAPI:forURL:withConfiguration:],
/Project/MPOAuth/MPOAuthAuthenticationMethodOAuth.m:49
Terminating app due to uncaught
exception
'NSInternalInconsistencyException',
reason: 'Incorrect number of oauth
authorization methods'
twitter now uses OAuth as authentication mechanism. You will have to change your oauthAutoConfig.plist
The entry for twitter should look like this