I have a problem when try to sign in to Google Plus, my app crash after send my user and password when return to the app.
The error happens in this line:
BOOL openURL(id self, SEL _cmd, UIApplication* application, NSURL* url, NSString* sourceApplication, id annotation){
[GPPURLHandler handleURL:url sourceApplication:@"com.google.chrome.ios" annotation:nil];
}
//...
I get in the device console:
: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot create an NSPersistentStoreCoordinator with a nil model'
then using the url printed in the console I try:
NSURL *fixedURL = [NSURL URLWithString:@"com.domain.xxxxxx:/oauth2callback?state=75029341&code=4/hy789ysdfhfRA8cuIeHbO0fP3p1oXcFeCnYJe--vZgc.klaHKD1A8zws76f7678df6782M1BcwvNlQI&authuser=0&num_sessions=1&prompt=consent&session_state=dca3e8a678sdf678a6f7d880e02bcf5155e5822c038..5f88"];
[GPPURLHandler handleURL:fixedURL sourceApplication:@"com.google.chrome.ios" annotation:nil];
//...
with these code nothing happens
then I try:
NSString *urlString =[NSMutableString stringWithFormat:@"%@:/oauth2callback?%@", [url scheme],[url query]];
NSURL *fixedURL = [NSURL URLWithString:urlString];
//...
And get the first error.
in Property List Key
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.domain.xxxxxx</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.domain.xxxxxx</string>
</array>
<key>CFBundleURLTypes</key>
<string>Editor</string>
</dict>
</array>
<key>GPGApplicationID</key>
<string>123123123-0fnaerghgic4er3g9cmn045daasl0u1u.apps.googleusercontent.com</string>
What I do wrong?