{ "id": "163152", "key": "TIMOB-23890", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-13T00:14:55.000+0000", "created": "2016-09-09T23:42:06.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "facebook", "facebookSDK", "ios", "ios10", "ti.facebook", "xcode8" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" }, { "id": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "issuelinks": [ { "id": "52722", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "163213", "key": "TIMOB-23904", "fields": { "summary": "iOS10: Button listener takes two taps before responding for Facebook login", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52716", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "163181", "key": "TIMOB-23897", "fields": { "summary": "iOS: Support Ti.Facebook 5.2.5 on Titanium SDK < 5.5.0", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-11-17T08:16:44.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Facebook login using the latest FB Modules is not working anymore on devices running iOS 10.\r\n\r\nWe have catch this behavior on our production published app running the Facebook Module (5.2.0) and Ti SDK 5.3.0.\r\n\r\nWe have tested this behavior on Ti SDK 5.2.0.GA up to 5.5.0 RC and all present the same behavior.\r\n\r\n\r\n*Steps to Reproduce*\r\n\r\n* Use a button for Facebook login (using the fb.authorize method).\r\n* The button opens the SafariView with the Facebook App Authorization site.\r\n* Tap OK button.\r\n* The SafariView gets a blank page and doesn't get dismissed.\r\n* If you tap the DONE button, the view is dismissed but the is not logged in.\r\n\r\n\r\n*Expected*\r\nNormal FB login flow where you tap the OK button on the SafariViewController opened by the Facebook module, the SafariViewController gets dismissed, the login event is fired with the user logged in.\r\n\r\n*Follows a very simple app using the Facebook Module displaying this issue.*\r\n\r\n\r\n{code:javascript}\r\nvar fb = require(\"facebook\");\r\n\r\n// Facebook Stuff\r\nfb.initialize();\r\n\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar fbloginbutton = Ti.UI.createButton({\r\n title: \"Login with Facebook\"\r\n});\r\n\r\nfbloginbutton.addEventListener(\"click\", function() {\r\n fb.authorize();\r\n});\r\n\r\nwin.add(fbloginbutton);\r\n\r\nvar lbl = Ti.UI.createLabel({\r\n color: \"red\",\r\n text: fb.loggedIn\r\n});\r\n\r\n\r\n\r\n\r\n\r\nwin.add(lbl);\r\n\r\nfb.addEventListener(\"login\", function() {\r\n console.log(\"fb-event-login: \" + fb.loggedIn);\r\n console.log(\"accessToken: \" + fb.accessToken);\r\n console.log(\"fbuid: \" + fb.uid);\r\n \r\n lbl.setText(fb.loggedIn);\r\n});\r\n\r\nfb.addEventListener(\"logout\", function() {\r\n console.log(\"fb-event-logout: \" + fb.loggedIn);\r\n console.log(\"accessToken: \" + fb.accessToken);\r\n \r\n lbl.setText(fb.loggedIn);\r\n \r\n});\r\n\r\n\r\nconsole.log(\"fb-boot-status: \" + fb.loggedIn);\r\nconsole.log(\"fb-boot-accessToken: \" + fb.accessToken);\r\n\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nPlease remember to setup the proper Facebook App ID parameters on tiapp.xml on the iOS section together with LSApplicationQueriesSchemes and NSAppTransportSecurity as per Facebook Ti module instructions.\r\n\r\n\r\nThis is critical since iOS 10 final is to be released next week and this completely breaks Facebook login.\r\n", "attachment": [], "flagged": false, "summary": "iOS10: Facebook Login is not working", "creator": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "subtasks": [], "reporter": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "environment": "Titanium 5.5.0.v20160831100821\r\nalso tested on 5.4.0.GA\r\n\r\nMac OS X 10.11.6\r\n\r\nXcode 8 GM\r\n\r\nTested on Device running iOS 10.0.1 GM and on Simulator 10.0 (XCode 8 GM)", "closedSprints": [ { "id": 707, "state": "closed", "name": "2016 Sprint 19 SDK", "startDate": "2016-09-10T00:17:15.164Z", "endDate": "2016-09-24T00:17:00.000Z", "completeDate": "2016-09-26T05:17:04.253Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "395788", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "More Info:\r\n\r\n* Using the Module Login Button (using createLoginButton) presents the same behavior.\r\n* If you tap to open the Link In Safari, it opens in safari and when you tap OK it goes back to the app and crashes ([ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'. [ERROR] Reason: [ERROR] *** setObjectForKey: object cannot be nil (key: error))\r\n* We have tried to use the latest version of the ti.facebook module on github (iOS-5.2.4 release) and it does not solve this problem.\r\n* Facebook has released the 4.15.1 version of their SDK which makes some updates related to XCode 8 and iOS 10 (Ti.Facebook module seems to use 4.14.0 on the latest Github Version)", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-09T23:52:38.000+0000", "updated": "2016-09-09T23:52:38.000+0000" }, { "id": "395789", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Other apps that use the same native login flow on iOS (opens SFSafariViewController with Facebook login inside the app itself) are working fine after updating to iOS 10. Our app which the current iOS Published version is compiled with Facebook Module (5.2.0) and Ti SDK 5.3.0 is not.\r\n\r\nOn all our tests running against iOS 9 both on devices as in the simulator, the login behaves normally.", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-09T23:56:47.000+0000", "updated": "2016-09-09T23:56:47.000+0000" }, { "id": "395792", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "other devs are experiencing this problem as well:\r\n\r\nhttp://stackoverflow.com/questions/39297781/facebook-login-doesnt-works-on-ios-10-titanium-sdk-5-3-1-ga-and-5-5-0-beta/39422401#39422401", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-10T04:00:36.000+0000", "updated": "2016-09-10T04:00:36.000+0000" }, { "id": "395793", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "I have tried to compile the current ti.facebook module source replacing the Facebook SDK frameworks with the ones available on their latest SDK (4.15.1). The module works fine but shows the same behavior presenting a blank screen after tapping OK and not returning to the app. Closing the safari view controller manually returns to the app and fires the login event as \"cancelled\" and it doesn't login at all.\r\n\r\n", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-10T04:03:49.000+0000", "updated": "2016-09-10T04:03:49.000+0000" }, { "id": "395819", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~ygbr], I'm here! Before I dig into the issue, I would like to clear the following quote:\r\n{quote}\r\nWe have catch this behavior on our production published app running the Facebook Module (5.2.0) and Ti SDK 5.3.0.\r\n{quote}\r\nHow can you catch the error-behavior in a production app when a) iOS 10 need to be built with Xcode 8 which is not able to have apps in the store, yet and b) you are using Ti SDK 5.3.0 for that which does not support iOS 10 builds, yet. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-11T10:50:45.000+0000", "updated": "2016-09-11T10:50:45.000+0000" }, { "id": "395820", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Let's go:\r\n- This seems to happen on the native side as well (https://forums.developer.apple.com/thread/50332 + http://stackoverflow.com/questions/38689631/how-to-use-facebook-ios-sdk-on-ios-10)\r\n- Make sure you have included all iOS required query schemes (if that works, let me know and I'll update the docs anyway):\r\n{code:xml}\r\nLSApplicationQueriesSchemes \r\n \r\n fbapi \r\n fbapi20130214 \r\n fbapi20130410 \r\n fbapi20130702 \r\n fbapi20131010 \r\n fbapi20131219 \r\n fbapi20140410 \r\n fbapi20140116 \r\n fbapi20150313 \r\n fbapi20150629 \r\n fbapi20160328 \r\n fbauth \r\n fbauth2 \r\n fb-messenger-api20140430 \r\n fb-messenger-platform-20150128 \r\n fb-messenger-platform-20150218 \r\n fb-messenger-platform-20150305 \r\n fbapi \r\n fb-messenger-api \r\n fbauth2 \r\n fbshareextension \r\n \r\n{code}\r\n- Enable keychain-sharing in your entitlements with your app-id from the tiapp.xml (if that works, we need to update the docs as well):\r\n{code:xml}\r\nkeychain-access-groups\r\n\r\n\tcom.yourcompany.identifier\r\n\r\n{code}\r\n\r\nSo summary: I don't think it's the Facebook module itself, but the way we need to implement it for iOS 10. I will see if Facebook has a specific SDK release for iOS 10 so we can include that as well. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-11T11:01:43.000+0000", "updated": "2016-09-11T11:01:43.000+0000" }, { "id": "395822", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (ti.facebook): https://github.com/appcelerator-modules/ti.facebook/pull/63\r\n\r\n[~ygbr] Please try the ti.facebook version 5.2.5 that is attached to the PR, as well as the above hints. Pretty sure that will work. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-11T11:24:57.000+0000", "updated": "2016-09-11T11:24:57.000+0000" }, { "id": "395838", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "@Hans clearing out your questions:\r\n\r\nbq. How can you catch the error-behavior in a production app when a) iOS 10 need to be built with Xcode 8 which is not able to have apps in the store, yet and b) you are using Ti SDK 5.3.0 for that which does not support iOS 10 builds, yet. Thanks!\r\n\r\nWe have installed the current version of our production app available in the iOS App Store ( compiled with Facebook Module (5.2.0), Xcode 7 and Ti SDK 5.3.0) and the facebook login simply stopped working after updating to iOS 10 GM. (Tested on iPhone 5S, 6, and 6S Plus). It worked flawlessly on iOS 9.\r\n\r\nJust to be clear, just updating to iOS 10 completely breaks Facebook Login on previously published Ti apps, which doesn't happens with other (non-ti) apps that were also compiled with previous versions of Xcode and FB SDKs.\r\n\r\nWe have tested a plethora of other iOS apps that uses Facebook login and they are working just fine after updating to to iOS 10. All titanium apps that we control are having this login failure on iOS 10.\r\n\r\n\r\nI will try the keychain and adding the extra LSApplicationQueriesSchemes (even though Facebook SDK explicitly says to remove the extra ones in the latest SDK version) and report back here soon.\r\n\r\nThanks.\r\n", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-11T15:36:18.000+0000", "updated": "2016-09-11T15:36:18.000+0000" }, { "id": "395847", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for the feedback! The entitlements are not necessary anymore, since the newer version of the Facebook SDK sets them for you. I am still able to reproduce it and need some more testing right now. Will keep you updated.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-11T18:58:58.000+0000", "updated": "2016-09-11T18:58:58.000+0000" }, { "id": "395848", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "@Hans Thanks for the feedback. As a side note I have tried all the steps you mentioned and the FB Module attached to your PR (5.2.5) but still get the same effects (yesterday I have tried to update the FB SDK frameworks on the module myself too, but I got the same results).\r\n\r\nI also have tried to test it with run-on-main-thread on and off and the with the new jscore framework enabled but the problem persists in all cases.\r\n\r\n", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-11T19:07:54.000+0000", "updated": "2016-09-11T19:07:54.000+0000" }, { "id": "395849", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, found the problem. In the Titanium SDK core, we have the following application delegate to handle url-opens:\r\n{code:objc}\r\n- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation\r\n{code}\r\nWhen using the Facebook-SDK, the following thing is recommended:\r\n{code:objc}\r\n- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation\r\n{\r\n return [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];\r\n}\r\n{code}\r\nand for some reason, it never made problems before, but now it does. So we need to find a way to hook into that delegate from the module.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-11T19:26:39.000+0000", "updated": "2016-09-11T19:26:39.000+0000" }, { "id": "395850", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Ok, I have something working (although I'm not sure it's the best way to do it, yet): We need an SDK-core PR to send out a notification when the above delegate is called by the system. In the module, we hook into that notification like we do with other (system- and SDK-side notifications). Inside there, we call the Facebook-delegate and the callback in {{authorize}} that has not been triggered gets triggered. Works with both active and inactive sessions. Anyway, it requires a lot of testing to ensure everything in the session- and accesstoken-handling still works.\r\n\r\nPR's:\r\n- ti.facebook: https://github.com/appcelerator-modules/ti.facebook/pull/63\r\n- titanium_mobile (master): https://github.com/appcelerator/titanium_mobile/pull/8346\r\n- titanium_mobile (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8352\r\n- titanium_mobile (5_5_X): https://github.com/appcelerator/titanium_mobile/pull/8351\r\n\r\nI will do the 6_0_X and 5_5_X backports as soon as [~ygbr] and [~cng] can confirm the fix. I updated the prepackaged version in the ti.facebook PR as well. Fingers crossed!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-11T20:06:30.000+0000", "updated": "2016-09-12T18:19:14.000+0000" }, { "id": "395852", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Hi Hans, I have tested using your updated module PR and your pull on Ti master (6.1.0) and now when I tap on the OK button inside the FB Login SafariViewController I get the following crash:\r\n\r\n\r\n{code:log}\r\n[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] Reason:\r\n[ERROR] *** setObjectForKey: object cannot be nil (key: error)\r\n[ERROR] Stack trace:\r\n[ERROR]\r\n[ERROR] 0 CoreFoundation 0x000000010b716333 __exceptionPreprocess + 147\r\n[ERROR] 1 libobjc.A.dylib 0x000000010ace521e objc_exception_throw + 48\r\n[ERROR] 2 CoreFoundation 0x000000010b62c9b7 -[__NSDictionaryM setObject:forKey:] + 1047\r\n[ERROR] 3 fblogintest 0x0000000104656020 -[FacebookModule fireLogin:cancelled:withError:] + 336\r\n[ERROR] 4 fblogintest 0x00000001045b9b31 -[FBSDKLoginManager invokeHandler:error:] + 148\r\n[ERROR] 5 fblogintest 0x00000001045b98a7 -[FBSDKLoginManager completeAuthentication:expectChallenge:] + 1499\r\n[ERROR] 6 fblogintest 0x00000001045b65c0 -[FBSDKLoginURLCompleter completeLogIn:withHandler:] + 374\r\n[ERROR] 7 fblogintest 0x00000001045bb6e2 -[FBSDKLoginManager(Native) application:openURL:sourceApplication:annotation:] + 644\r\n[ERROR] 8 fblogintest 0x00000001045883ba -[FBSDKApplicationDelegate application:openURL:sourceApplication:annotation:] + 305\r\n[ERROR] 9 CoreFoundation 0x000000010b6b419c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12\r\n[ERROR] 10 CoreFoundation 0x000000010b6b409b _CFXRegistrationPost + 427\r\n[ERROR] 11 CoreFoundation 0x000000010b6b3e02 ___CFXNotificationPost_block_invoke + 50\r\n[ERROR] 12 CoreFoundation 0x000000010b676ea2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 2018\r\n[ERROR] 13 CoreFoundation 0x000000010b675f3b _CFXNotificationPost + 667\r\n[ERROR] 14 Foundation 0x000000010636613b -[NSNotificationCenter postNotificationName:object:userInfo:] + 66\r\n[ERROR] 15 fblogintest 0x00000001044b4e08 -[TiApp application:openURL:sourceApplication:annotation:] + 408\r\n[ERROR] 16 UIKit 0x00000001068cbae3 __45-[UIApplication _applicationOpenURL:payload:]_block_invoke + 940\r\n[ERROR] 17 UIKit 0x00000001068cb472 -[UIApplication _applicationOpenURL:payload:] + 757\r\n[ERROR] 18 SafariServices 0x00000001170bc060 -[SFSafariViewController remoteViewController:hostApplicationOpenURL:] + 155\r\n[ERROR] 19 SafariServices 0x00000001170b3db7 -[SFBrowserRemoteViewController willOpenURLInHostApplication:] + 68\r\n[ERROR] 20 CoreFoundation 0x000000010b69d05c __invoking___ + 140\r\n[ERROR] 21 CoreFoundation 0x000000010b69cee1 -[NSInvocation invoke] + 289\r\n[ERROR] 22 FrontBoardServices 0x000000011260576b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24\r\n[ERROR] 23 FrontBoardServices 0x00000001126055e4 -[FBSSerialQueue _performNext] + 189\r\n[ERROR] 24 FrontBoardServices 0x000000011260596d -[FBSSerialQueue _performNextFromRunLoopSource] + 45\r\n[ERROR] 25 CoreFoundation 0x000000010b6bb311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n[ERROR] 26 CoreFoundation 0x000000010b6a059c __CFRunLoopDoSources0 + 556\r\n[ERROR] 27 CoreFoundation 0x000000010b69fa86 __CFRunLoopRun + 918\r\n[ERROR] 28 CoreFoundation 0x000000010b69f494 CFRunLoopRunSpecific + 420\r\n[ERROR] 29 GraphicsServices 0x000000010cdbda6f GSEventRunModal + 161\r\n[ERROR] 30 UIKit 0x00000001068c0f34 UIApplicationMain + 159\r\n[ERROR] 31 fblogintest 0x00000001042dfff6 main + 310\r\n[ERROR] 32 libdyld.dylib 0x000000010f94768d start + 1\r\n[ERROR] 33 ??? 0x0000000000000001 0x0 + 1\r\n[ERROR]\r\n[ERROR] 2016-09-11 18:27:20.175 fblogintest[3129:344150] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: error)'\r\n[ERROR] *** First throw call stack:\r\n[ERROR] (\r\n[ERROR] 0 CoreFoundation 0x000000010b71634b __exceptionPreprocess + 171\r\n[ERROR] 1 libobjc.A.dylib 0x000000010ace521e objc_exception_throw + 48\r\n[ERROR] 2 CoreFoundation 0x000000010b62c9b7 -[__NSDictionaryM setObject:forKey:] + 1047\r\n[ERROR] 3 fblogintest 0x0000000104656020 -[FacebookModule fireLogin:cancelled:withError:] + 336\r\n[ERROR] 4 fblogintest 0x00000001045b9b31 -[FBSDKLoginManager invokeHandler:error:] + 148\r\n[ERROR] 5 fblogintest 0x00000001045b98a7 -[FBSDKLoginManager completeAuthentication:expectChallenge:] + 1499\r\n[ERROR] 6 fblogintest 0x00000001045b65c0 -[FBSDKLoginURLCompleter completeLogIn:withHandler:] + 374\r\n[ERROR] 7 fblogintest 0x00000001045bb6e2 -[FBSDKLoginManager(Native) application:openURL:sourceApplication:annotation:] + 644\r\n[ERROR] 8 fblogintest 0x00000001045883ba -[FBSDKApplicationDelegate application:openURL:sourceApplication:annotation:] + 305\r\n[ERROR] 9 CoreFoundation 0x000000010b6b419c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12\r\n[ERROR] 10 CoreFoundation 0x000000010b6b409b _CFXRegistrationPost + 427\r\n[ERROR] 11 CoreFoundation 0x000000010b6b3e02 ___CFXNotificationPost_block_invoke + 50\r\n[ERROR] 12 CoreFoundation 0x000000010b676ea2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 2018\r\n[ERROR] 13 CoreFoundation 0x000000010b675f3b _CFXNotificationPost + 667\r\n[ERROR] 14 Foundation 0x000000010636613b -[NSNotificationCenter postNotificationName:object:userInfo:] + 66\r\n[ERROR] 15 fblogintest 0x00000001044b4e08 -[TiApp application:openURL:sourceApplication:annotation:] + 408\r\n[ERROR] 16 UIKit 0x00000001068cbae3 __45-[UIApplication _applicationOpenURL:payload:]_block_invoke + 940\r\n[ERROR] 17 UIKit 0x00000001068cb472 -[UIApplication _applicationOpenURL:payload:] + 757\r\n[ERROR] 18 SafariServices 0x00000001170bc060 -[SFSafariViewController remoteViewController:hostApplicationOpenURL:] + 155\r\n[ERROR] 19 SafariServices 0x00000001170b3db7 -[SFBrowserRemoteViewController willOpenURLInHostApplication:] + 68\r\n[ERROR] 20 CoreFoundation 0x000000010b69d05c __invoking___ + 140\r\n[ERROR] 21 CoreFoundation 0x000000010b69cee1 -[NSInvocation invoke] + 289\r\n[ERROR] 22 FrontBoardServices 0x000000011260576b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24\r\n[ERROR] 23 FrontBoardServices 0x00000001126055e4 -[FBSSerialQueue _performNext] + 189\r\n[ERROR] 24 FrontBoardServices 0x000000011260596d -[FBSSerialQueue _performNextFromRunLoopSource] + 45\r\n[ERROR] 25 CoreFoundation 0x000000010b6bb311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n[ERROR] 26 CoreFoundation 0x000000010b6a059c __CFRunLoopDoSources0 + 556\r\n[ERROR] 27 CoreFoundation 0x000000010b69fa86 __CFRunLoopRun + 918\r\n[ERROR] 28 CoreFoundation 0x000000010b69f494 CFRunLoopRunSpecific + 420\r\n[ERROR] 29 GraphicsServices 0x000000010cdbda6f GSEventRunModal + 161\r\n[ERROR] 30 UIKit 0x00000001068c0f34 UIApplicationMain + 159\r\n[ERROR] 31 fblogintest 0x00000001042dfff6 main + 310\r\n[ERROR] 32 libdyld.dylib 0x000000010f94768d start + 1\r\n[ERROR] 33 ??? 0x0000000000000001 0x0 + 1\r\n[ERROR] )\r\n[ERROR] libc++abi.dylib: terminating with uncaught exception of type NSException\r\n-- End simulator log ---------------------------------------------------------\r\n{code}", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-11T21:32:23.000+0000", "updated": "2016-09-11T21:33:40.000+0000" }, { "id": "395853", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Mhh, it looks like in [this line|https://github.com/hansemannn/ti.facebook/blob/85ec3e4307bf8375f0450d104ed0e8c6a804d7cd/ios/Classes/FacebookModule.m#L870] the {{errorString}} is nil. Very weird. I just pushed another commit to optimize the delegate handling, please build the module yourself this time to speed-up the debugging, thanks!.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-11T23:04:15.000+0000", "updated": "2016-09-11T23:04:15.000+0000" }, { "id": "395857", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Hi Hans,\r\n\r\nI have downloaded the latest version from your PR and build it myself. Still getting the following error after I tap OK on the SafariViewController\r\n\r\n\r\n\r\n{code:objc}\r\n[TRACE] [fblogintest] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: error)'\r\n[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] Reason:\r\n[ERROR] *** setObjectForKey: object cannot be nil (key: error)\r\n[ERROR] Stack trace:\r\n[ERROR]\r\n[ERROR] 0 CoreFoundation 0x0000000109cf0333 __exceptionPreprocess + 147\r\n[ERROR] 1 libobjc.A.dylib 0x00000001092bf21e objc_exception_throw + 48\r\n[ERROR] 2 CoreFoundation 0x0000000109c069b7 -[__NSDictionaryM setObject:forKey:] + 1047\r\n[ERROR] 3 fblogintest 0x0000000102c38040 -[FacebookModule fireLogin:cancelled:withError:] + 336\r\n[ERROR] 4 fblogintest 0x0000000102b9bca1 -[FBSDKLoginManager invokeHandler:error:] + 148\r\n[ERROR] 5 fblogintest 0x0000000102b9ba17 -[FBSDKLoginManager completeAuthentication:expectChallenge:] + 1499\r\n[ERROR] 6 fblogintest 0x0000000102b98730 -[FBSDKLoginURLCompleter completeLogIn:withHandler:] + 374\r\n[ERROR] 7 fblogintest 0x0000000102b9d852 -[FBSDKLoginManager(Native) application:openURL:sourceApplication:annotation:] + 644\r\n[ERROR] 8 fblogintest 0x0000000102b6a52a -[FBSDKApplicationDelegate application:openURL:sourceApplication:annotation:] + 305\r\n[ERROR] 9 CoreFoundation 0x0000000109c8e19c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12\r\n[ERROR] 10 CoreFoundation 0x0000000109c8e09b _CFXRegistrationPost + 427\r\n[ERROR] 11 CoreFoundation 0x0000000109c8de02 ___CFXNotificationPost_block_invoke + 50\r\n[ERROR] 12 CoreFoundation 0x0000000109c50ea2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 2018\r\n[ERROR] 13 CoreFoundation 0x0000000109c4ff3b _CFXNotificationPost + 667\r\n[ERROR] 14 Foundation 0x000000010494013b -[NSNotificationCenter postNotificationName:object:userInfo:] + 66\r\n[ERROR] 15 fblogintest 0x0000000102a96f78 -[TiApp application:openURL:sourceApplication:annotation:] + 408\r\n[ERROR] 16 UIKit 0x0000000104ea5ae3 __45-[UIApplication _applicationOpenURL:payload:]_block_invoke + 940\r\n[ERROR] 17 UIKit 0x0000000104ea5472 -[UIApplication _applicationOpenURL:payload:] + 757\r\n[ERROR] 18 SafariServices 0x0000000115696060 -[SFSafariViewController remoteViewController:hostApplicationOpenURL:] + 155\r\n[ERROR] 19 SafariServices 0x000000011568ddb7 -[SFBrowserRemoteViewController willOpenURLInHostApplication:] + 68\r\n[ERROR] 20 CoreFoundation 0x0000000109c7705c __invoking___ + 140\r\n[ERROR] 21 CoreFoundation 0x0000000109c76ee1 -[NSInvocation invoke] + 289\r\n[ERROR] 22 FrontBoardServices 0x0000000110bdf76b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24\r\n[ERROR] 23 FrontBoardServices 0x0000000110bdf5e4 -[FBSSerialQueue _performNext] + 189\r\n[ERROR] 24 FrontBoardServices 0x0000000110bdf96d -[FBSSerialQueue _performNextFromRunLoopSource] + 45\r\n[ERROR] 25 CoreFoundation 0x0000000109c95311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n[ERROR] 26 CoreFoundation 0x0000000109c7a59c __CFRunLoopDoSources0 + 556\r\n[ERROR] 27 CoreFoundation 0x0000000109c79a86 __CFRunLoopRun + 918\r\n[ERROR] 28 CoreFoundation 0x0000000109c79494 CFRunLoopRunSpecific + 420\r\n[ERROR] 29 GraphicsServices 0x000000010b397a6f GSEventRunModal + 161\r\n[ERROR] 30 UIKit 0x0000000104e9af34 UIApplicationMain + 159\r\n[ERROR] 31 fblogintest 0x00000001028c2326 main + 310\r\n[ERROR] 32 libdyld.dylib 0x000000010df2168d start + 1\r\n[ERROR] 33 ??? 0x0000000000000001 0x0 + 1\r\n[ERROR]\r\n[ERROR] 2016-09-11 22:59:51.484 fblogintest[11606:999429] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: error)'\r\n[ERROR] *** First throw call stack:\r\n[ERROR] (\r\n[ERROR] 0 CoreFoundation 0x0000000109cf034b __exceptionPreprocess + 171\r\n[ERROR] 1 libobjc.A.dylib 0x00000001092bf21e objc_exception_throw + 48\r\n[ERROR] 2 CoreFoundation 0x0000000109c069b7 -[__NSDictionaryM setObject:forKey:] + 1047\r\n[ERROR] 3 fblogintest 0x0000000102c38040 -[FacebookModule fireLogin:cancelled:withError:] + 336\r\n[ERROR] 4 fblogintest 0x0000000102b9bca1 -[FBSDKLoginManager invokeHandler:error:] + 148\r\n[ERROR] 5 fblogintest 0x0000000102b9ba17 -[FBSDKLoginManager completeAuthentication:expectChallenge:] + 1499\r\n[ERROR] 6 fblogintest 0x0000000102b98730 -[FBSDKLoginURLCompleter completeLogIn:withHandler:] + 374\r\n[ERROR] 7 fblogintest 0x0000000102b9d852 -[FBSDKLoginManager(Native) application:openURL:sourceApplication:annotation:] + 644\r\n[ERROR] 8 fblogintest 0x0000000102b6a52a -[FBSDKApplicationDelegate application:openURL:sourceApplication:annotation:] + 305\r\n[ERROR] 9 CoreFoundation 0x0000000109c8e19c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12\r\n[ERROR] 10 CoreFoundation 0x0000000109c8e09b _CFXRegistrationPost + 427\r\n[ERROR] 11 CoreFoundation 0x0000000109c8de02 ___CFXNotificationPost_block_invoke + 50\r\n[ERROR] 12 CoreFoundation 0x0000000109c50ea2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 2018\r\n[ERROR] 13 CoreFoundation 0x0000000109c4ff3b _CFXNotificationPost + 667\r\n[ERROR] 14 Foundation 0x000000010494013b -[NSNotificationCenter postNotificationName:object:userInfo:] + 66\r\n[ERROR] 15 fblogintest 0x0000000102a96f78 -[TiApp application:openURL:sourceApplication:annotation:] + 408\r\n[ERROR] 16 UIKit 0x0000000104ea5ae3 __45-[UIApplication _applicationOpenURL:payload:]_block_invoke + 940\r\n[ERROR] 17 UIKit 0x0000000104ea5472 -[UIApplication _applicationOpenURL:payload:] + 757\r\n[ERROR] 18 SafariServices 0x0000000115696060 -[SFSafariViewController remoteViewController:hostApplicationOpenURL:] + 155\r\n[ERROR] 19 SafariServices 0x000000011568ddb7 -[SFBrowserRemoteViewController willOpenURLInHostApplication:] + 68\r\n[ERROR] 20 CoreFoundation 0x0000000109c7705c __invoking___ + 140\r\n[ERROR] 21 CoreFoundation 0x0000000109c76ee1 -[NSInvocation invoke] + 289\r\n[ERROR] 22 FrontBoardServices 0x0000000110bdf76b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24\r\n[ERROR] 23 FrontBoardServices 0x0000000110bdf5e4 -[FBSSerialQueue _performNext] + 189\r\n[ERROR] 24 FrontBoardServices 0x0000000110bdf96d -[FBSSerialQueue _performNextFromRunLoopSource] + 45\r\n[ERROR] 25 CoreFoundation 0x0000000109c95311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\r\n[ERROR] 26 CoreFoundation 0x0000000109c7a59c __CFRunLoopDoSources0 + 556\r\n[ERROR] 27 CoreFoundation 0x0000000109c79a86 __CFRunLoopRun + 918\r\n[ERROR] 28 CoreFoundation 0x0000000109c79494 CFRunLoopRunSpecific + 420\r\n[ERROR] 29 GraphicsServices 0x000000010b397a6f GSEventRunModal + 161\r\n[ERROR] 30 UIKit 0x0000000104e9af34 UIApplicationMain + 159\r\n[ERROR] 31 fblogintest 0x00000001028c2326 main + 310\r\n[ERROR] 32 libdyld.dylib 0x000000010df2168d start + 1\r\n[ERROR] 33 ??? 0x0000000000000001 0x0 + 1\r\n[ERROR] )\r\n[ERROR] libc++abi.dylib: terminating with uncaught exception of type NSException\r\n{code}", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-12T02:02:34.000+0000", "updated": "2016-09-12T02:02:34.000+0000" }, { "id": "395858", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "I have actually created a very simple app just for testing this issue and also created the application on Facebook, so everything is wired app correctly.\r\n\r\nDoes it help you if I provide you with this testing source??? (if you want I can also make you an admin or tester of the app on facebook dev platform so you can actually login and run the app or I can create test users and provide the test logins here).\r\n\r\nThis way you can just drop the updated module on every change and I think it would make debugging faster.", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-12T02:18:04.000+0000", "updated": "2016-09-12T02:18:04.000+0000" }, { "id": "395866", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Did you use a precompiled master? Since the PR is not merged, yet, you need to compile a custom 6.1.0 from the above PR. Let me package it for you and give it to test, so we can speed-up the process.\r\n\r\n*EDIT*: Please download and unzip [this file|https://www.dropbox.com/s/kuip20k1xjcjvn3/5.5.0.zip?dl=0] to {{~/Library/Application Support/Titanium/mobilesdk/osx/5.5.0}} and make sure to change the SDK-version to that one. It is the latest 5.5.0 build including the fixes from the above PR (in TiBase.h/m and TiApp.m).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T08:06:08.000+0000", "updated": "2016-09-12T09:12:57.000+0000" }, { "id": "395876", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Hi Hans, I couldn't use the precompiled master because the ones on build.appcelerator were all 2 days old, so I went and checked-out the entire master pointed to your commit: 28ad30f12bb28c464b1f6e03da10b37463b1ace6 (which is the last one on your pull request to titanium_mobile)\r\n\r\nI will try with the version you packaged above and report back soon.", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-12T10:24:25.000+0000", "updated": "2016-09-12T10:24:25.000+0000" }, { "id": "395878", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "I just downloaded your pre-packaged 5.5.0 and used that to make a clean build of the app.\r\n\r\nI have also used the ti.facebook that I built module from the latest commit on your PR (f0ade97).\r\n\r\nUnfortunately the app still gives the same crash after I tap OK on the SafariController.\r\n\r\n\r\nOn a side note, previously if I tapped the bottom-right button on the SafariController to open the fb login site on Safari externally and perform the authentication on Safari, it did get back to the app and the login happened normally. Now in this version it crashes too.\r\n\r\n", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-12T10:44:45.000+0000", "updated": "2016-09-12T10:44:45.000+0000" }, { "id": "395879", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "Also, I have observed that if we make the login using the module's button (fb.createLoginButton) it doesn't crash when returning to the app, different behavior of calling the authorize() method directly. That said, it returns to the app without a crash but doesn't login the user since all state variables are nil/undefined.", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-12T10:57:11.000+0000", "updated": "2016-09-12T10:57:11.000+0000" }, { "id": "395912", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Added an additional commit to fire a {{Ti.App.iOS.handleurl}} event to get notified about handled URL's. Relates to two other tickets, so I've put it here to link it.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T17:37:57.000+0000", "updated": "2016-09-12T17:37:57.000+0000" }, { "id": "395950", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "More PRs!:\r\n6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8358\r\n5_5_X: https://github.com/appcelerator/titanium_mobile/pull/8357\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/8356\r\nfacebook module: https://github.com/appcelerator-modules/ti.facebook/pull/64\r\n\r\nh4. Steps to test\r\nScenario A: Use the case above. It will fail to log in without crashing.\r\nScenario B: Using the same case, follow these instructions to include a appname.entitlements in {{platform/ios}}:\r\n{quote}\r\n**Using Facebook module with iOS 10 and Xcode 8**\r\nTo log in using facebook, we now have to include an entitlements file that enables Keychain Sharing\r\nCapabilities. To do so, create a `/platform/ios/.entitlements` file with this content\r\n{quote}\r\n{code}\r\n\r\n\r\n\r\n\r\n keychain-access-groups\r\n \r\n \r\n $(AppIdentifierPrefix)APP_ID\r\n \r\n\r\n\r\n{code}", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-12T22:51:42.000+0000", "updated": "2016-09-13T06:06:30.000+0000" }, { "id": "395957", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "@Chee\r\n\r\n1. Do we really have to create the entitlements file on /platform/ios or can we add keychain-access-groups to the ios section on tiapp.xml ?\r\n2. Also in \"/platform/ios/.entitlements\", refers to the bundle id or the app name string itself (that can be i18n'ed and varies in some cases) ?\r\n\r\nThanks", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-12T23:24:44.000+0000", "updated": "2016-09-12T23:24:44.000+0000" }, { "id": "395961", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~ygbr] \r\n1. It needs to be the entitlements-file, because the Info.plist is not the .entitlements file (the entitlements are used to manage app capabilities, the Info.plist to manage app settings)\r\n2. I need to look-up the folder-structure, but it's similar to where you save localized app-titles as well.\r\n\r\nReading your comment, you probably copied the proposed entitlements to your tiapp instead of a new file? That would solve the last mystery, why it worked for me but didn't for you.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-12T23:37:13.000+0000", "updated": "2016-09-12T23:37:13.000+0000" }, { "id": "395967", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "@Hans\r\n\r\nI can confirm that after adding the entitlements to /platform/ios/fblogintest.entitlements file with keychain-access-groups it stopped crashing and facebook login now works both with the authorize() as with the facebook login button.\r\n\r\nThanks Hans!!!\r\n\r\n", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2016-09-13T00:53:09.000+0000", "updated": "2016-09-13T00:53:09.000+0000" }, { "id": "395982", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Please note that you need $(AppIdentifierPrefix) in the entitlements file in order to run on device.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-13T06:07:18.000+0000", "updated": "2016-09-13T06:07:18.000+0000" }, { "id": "395984", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with Ygor's sample that the workflow was successful. Got a red \"1\" indicating login.\r\n\r\nCreated a new Facebook developer entry and set plist as required. Initially had issues with entitlements on the provision installing to device, but [~cng] has a solution there we should get tomorrow.\r\n\r\nAlso verified the following as additional test. \r\n{code}\r\nvar fb = require(\"facebook\");\r\nfb.initialize();\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\nvar btn = Ti.UI.createButton({\r\n title: (fb.loggedIn) ? \"Request write permissions and submit\" : \"Login\"\r\n});\r\n\r\nbtn.addEventListener(\"click\", function() {\r\n if (fb.loggedIn) {\r\n requestPublishPermissions();\r\n } else {\r\n fb.permissions = ['email'];\r\n fb.authorize();\r\n }\r\n});\r\n\r\nfb.addEventListener(\"login\", function(_e) {\r\n if (!_e.success) {\r\n btn.setTitle(\"Login\");\r\n Ti.API.error(\"Login cancelled/failed!\");\r\n Ti.API.error(_e);\r\n return;\r\n } else {\r\n Ti.API.info(\"Login succeeded\");\r\n btn.setTitle(\"Request write permissions and submit\");\r\n }\r\n});\r\n\r\nfunction requestPublishPermissions() {\r\n fb.requestNewPublishPermissions(['publish_actions'], fb.AUDIENCE_ONLY_ME, function(e) {\r\n if (!e.success) {\r\n alert(\"Publish permissions denied!\");\r\n return;\r\n }\r\n\r\n var blob = Ti.UI.createView({\r\n width: 500,\r\n height: 500,\r\n backgroundColor: \"green\"\r\n }).toImage();\r\n\r\n var args = {\r\n picture: blob,\r\n caption: \"Great green view\"\r\n };\r\n\r\n fb.requestWithGraphPath('me/photos', args, \"POST\", showRequestResult);\r\n });\r\n\r\n}\r\n\r\nfunction showRequestResult(e) {\r\n alert(\"Photo has been submitted, check your facebook photo album\");\r\n Ti.API.info(e);\r\n}\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n\r\nAll performed with:\r\nXcode: 8.0 beta 6 (8S201h)\r\niOS: 10.0.1 (14A403)\r\nAppc CLI Core: 5.5.0-6\r\nAppc CLI NPM: 4.2.7\r\nAppcelerator Studio: 4.7.1.201609100950\r\nTitanium SDK: 5.5.0.v20160912200427\r\nFacebook module: 5.2.5", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-13T06:15:58.000+0000", "updated": "2016-09-13T06:15:58.000+0000" }, { "id": "395985", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "New PRs with doc updates here:\r\n5_5_X: https://github.com/appcelerator/titanium_mobile/pull/8362\r\n6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8363\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/8364\r\nfacebook PR: https://github.com/appcelerator-modules/ti.facebook/pull/65\r\n\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-13T06:27:42.000+0000", "updated": "2016-09-13T06:27:42.000+0000" }, { "id": "395989", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Follow-up ticket to support Titanium SDK < 5.5.0: MOD-2297", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-13T08:11:13.000+0000", "updated": "2016-09-13T08:11:13.000+0000" }, { "id": "396152", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with:\r\nNPM Version: 2.15.1\r\nNode Version: 4.4.3\r\nMac OS: 10.11.2\r\nAppc CLI: 5.5.0\r\nAppc CLI NPM: 4.2.7\r\nTitanium SDK version: 5.5.0.GA\r\nAppcelerator Studio, build: 4.7.1.201609100950\r\nXcode 8.0 GM\r\n\r\nI used the sample code attached as well as the one mentioned in my previous comment. I noticed that the log in requires two button pushes before logging in, and will write a separate ticket for that and link here.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-14T20:47:10.000+0000", "updated": "2016-09-14T20:47:10.000+0000" }, { "id": "396365", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please reopen this issue as the problem still exists. ", "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-16T18:00:14.000+0000", "updated": "2016-09-16T18:00:14.000+0000" }, { "id": "396367", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~bfreid] can you please provide more information of the problem you have and share with us the environment you are using? Make sure it's Facebook module 5.2.6. Is it failing for only iOS10 or everything? Thanks.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-16T18:10:29.000+0000", "updated": "2016-09-16T18:10:29.000+0000" }, { "id": "396368", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-16T18:14:48.000+0000", "updated": "2016-09-16T18:14:48.000+0000" }, { "id": "396382", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have just verified with the development team that this issue still exists and is becoming very visible with more and more people upgrading to IOS10. \r\n\r\n", "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-16T21:18:09.000+0000", "updated": "2016-09-16T21:18:09.000+0000" }, { "id": "396386", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Chee: \r\n\r\nI've confirmed that we are using the Facebook module 5.2.6", "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-16T21:35:35.000+0000", "updated": "2016-09-16T21:35:35.000+0000" }, { "id": "396405", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~bfreid] can you describe the scenario again? You meant the first attempt will cause the app to hang and not Facebook right? Is this happening on simulator? On simulator you have to provide an appname.entitlements file to platform/ios as instructed on the readme and docs for it to run. It'll be helpful if you can provide us a reproducible sample code so that we can isolate the problem you are facing.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-16T22:32:06.000+0000", "updated": "2016-09-16T22:32:06.000+0000" }, { "id": "396534", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Chee we are having same issues on 5.2.7 as we had on 5.2.6. This is not done on a simulator, it is on a live app. the first time you install the application it works, from there on every time after will open login page and go back to the app and show it's loading till the login is prompted a 2nd time. the only way to get it work the first time thereafter is to uninstall/reinstall the app or reboot the device. ", "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-19T16:27:49.000+0000", "updated": "2016-09-19T16:27:49.000+0000" }, { "id": "396539", "author": { "name": "antonioduran", "key": "antonioduran", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Brian Freid. By my side it is working good. \r\n\r\nBut I had to execute the logout method before executing the authorize method. Please try this:\r\n\r\nfb.initialize();\r\nfb.logout();\r\nfb.authorize();\r\n\r\nThanks, and best,\r\nAntonio.", "updateAuthor": { "name": "antonioduran", "key": "antonioduran", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-19T17:11:40.000+0000", "updated": "2016-09-19T17:11:40.000+0000" }, { "id": "396546", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Francisco,\r\n\r\nThank you for the recommendation, unfortunately our login process is more complex and won't work as you suggested. Because of the problems that Appcelerator is having with logging, we are unable to trouble shoot the problem in more detail. We've tried several different recommendations and unfortunately none of them have been successful. ", "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-19T17:40:01.000+0000", "updated": "2016-09-19T17:40:01.000+0000" }, { "id": "396642", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can someone provide an update on the status of this issue? ", "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-20T13:27:19.000+0000", "updated": "2016-09-20T13:27:19.000+0000" }, { "id": "396654", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~bfreid] We didn't hear any open issue since TIMOB-23904 was fixed. If you still have issues with ti.facebook 5.2.7, please provide a test-case that is reproducible and we can take a look. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-20T14:14:26.000+0000", "updated": "2016-09-20T14:14:26.000+0000" }, { "id": "396673", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Hans Knoechel we are having same issues on 5.2.7 as we had on 5.2.6. This is not done on a simulator, it is on a live app. the first time you install the application it works, from there on every time after will open login page and go back to the app and show it's loading till the login is prompted a 2nd time. the only way to get it work the first time thereafter is to uninstall/reinstall the app or reboot the device.\r\n", "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-20T15:27:15.000+0000", "updated": "2016-09-20T15:27:15.000+0000" }, { "id": "396677", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~bfreid] Once again, we cannot reproduce your issue without a valid demo-code to debug. Please provide one (isolated, runnable through a single app.js if possible) and we can speed-up the review of it. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-20T15:38:21.000+0000", "updated": "2016-09-20T15:38:21.000+0000" }, { "id": "396711", "author": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "bfreid", "key": "bfreid", "displayName": "Brian Freid", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-20T20:14:59.000+0000", "updated": "2016-09-20T20:14:59.000+0000" }, { "id": "396712", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~bfreid], very happy to hear that, thank you!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-20T20:18:49.000+0000", "updated": "2016-09-20T20:18:49.000+0000" }, { "id": "396960", "author": { "name": "mitch.starnes@bnsf.com", "key": "mitch.starnes@bnsf.com", "displayName": "Mitch Starnes", "active": true, "timeZone": "America/Chicago" }, "body": "@Brian Freid: We have a very similar problem with a URL scheme. What was the fix for you?", "updateAuthor": { "name": "mitch.starnes@bnsf.com", "key": "mitch.starnes@bnsf.com", "displayName": "Mitch Starnes", "active": true, "timeZone": "America/Chicago" }, "created": "2016-09-22T17:29:09.000+0000", "updated": "2016-09-22T17:29:09.000+0000" }, { "id": "397059", "author": { "name": "mitch.starnes@bnsf.com", "key": "mitch.starnes@bnsf.com", "displayName": "Mitch Starnes", "active": true, "timeZone": "America/Chicago" }, "body": "What was the issue?", "updateAuthor": { "name": "mitch.starnes@bnsf.com", "key": "mitch.starnes@bnsf.com", "displayName": "Mitch Starnes", "active": true, "timeZone": "America/Chicago" }, "created": "2016-09-23T17:45:13.000+0000", "updated": "2016-09-23T17:45:13.000+0000" }, { "id": "399482", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "body": "Hi guys, I was still facing the error with the module's facebook button even with module version 5.2.7 . I replaced it with a normal button and it worked.", "updateAuthor": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2016-10-20T11:56:42.000+0000", "updated": "2016-10-20T11:56:42.000+0000" }, { "id": "399485", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~hini] It's confirmed to be working so it must be something with your environment. Make sure to follow the guide in the [Ti.Facebook docs|http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook] to migrate and ensure to use at least 5.5.1.GA (both CLI and SDK) with Xcode 8 and iOS 10. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-20T12:48:11.000+0000", "updated": "2016-10-20T12:48:11.000+0000" }, { "id": "399486", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "body": "Thanks for replying Hans. I see from the thread that what was tested is using a normal button, not the module's facebook login buggon.\r\nI can confirm that using a normal button worked fine, but my initial code which uses the module's login button still causes the same behavior\r\n\r\nThis works: \r\n{code}\r\nvar fbloginbutton = Ti.UI.createImageView({\r\n\timage:'/images/loginwithfb.png',\r\n\theight: Ti.UI.SIZE,\r\n\tright: 25, left:25\r\n //title: \"Login with Facebook\"\r\n});\r\n \r\nfbloginbutton.addEventListener(\"click\", function() {\r\n fb.authorize();\r\n});\r\n\r\n{code}\r\n\r\nbut this shows the blank safari screen and a warining in the logs: \"Warning :-Presenting view controllers on detached view controllers is discouraged:\"\r\n\r\n{code}\r\nfb.createLoginButton({\r\n\treadPermissions : ['user_friends', 'email'],\r\n \ttop : 10,\r\n \twidth : '88%',\r\n \theight : '50',\r\n })\r\n{code}", "updateAuthor": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2016-10-20T13:09:33.000+0000", "updated": "2016-10-20T13:09:33.000+0000" }, { "id": "401345", "author": { "name": "cerw", "key": "cerw", "displayName": "Petr Cervenka", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Thanks last post worked for me too!", "updateAuthor": { "name": "cerw", "key": "cerw", "displayName": "Petr Cervenka", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2016-11-17T08:16:44.000+0000", "updated": "2016-11-17T08:16:44.000+0000" } ], "maxResults": 54, "total": 54, "startAt": 0 } } }