{ "id": "63830", "key": "TIMOB-3198", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "11256", "description": "", "name": "Sprint-2011-08", "archived": true, "released": true, "releaseDate": "2011-02-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T02:01:09.000+0000", "created": "2011-04-15T03:39:13.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "feature", "ios", "release-1.7.0", "reported-1.6.0", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T02:01:09.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": "{html}

The application crashes when you use\nTitanium.Facebook.authorize(); when Safari is restricted\n(settings->General->Restrictions).

\n

To Reproduce

\n

Step 1: restrict Safari via\n(settings->General->Restrictions)
\nStep 2: install app to device
\nStep 3: tap the 'authorize()' button

\n
\nvar win = Titanium.UI.createWindow({  \n    backgroundColor:'#fff'\n});\n\n// need to change the APPID before you run\nTitanium.Facebook.appid = 'APPID';\n\nvar fbAuthButton = Titanium.UI.createButton({\n    title: 'authorize()',\n    bottom: 100,\n    width: 300,\n    height: 60\n});\nfbAuthButton.addEventListener('click', function(e) {\n    Titanium.Facebook.authorize();\n});\n\nvar fbButton = Titanium.Facebook.createLoginButton({\n    'style': 'wide',\n    'sessionProxy': 'http://api.appcelerator.net/p/fbconnect/',\n    bottom: 50,\n    height: 30,\n    width: 300\n});\n\nwin.add(fbAuthButton);\nwin.add(fbButton);\nwin.open();\n
\n

Tested

\n

TiSDK 1.6.0RC1, iOS SDK 4.2, iPhone4 iOS 4.2.1

\n

Workaround

\n

Titanium.Facebook.createLoginButton() will still work the\nclassic way with a window inside the app even when Safari is\nrestricted

\n

Associated Helpdesk Ticket(s)

\n

http://developer.appcelerator.com/helpdesk/view/74491
\nhttp://developer.appcelerator.com/helpdesk/view/74771

{html}", "attachment": [ { "id": "18275", "filename": "test3_2011-02-22-160654_jeff-haynies-iphone.crash", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:13.000+0000", "size": 17301, "mimeType": "application/octet-stream" }, { "id": "18276", "filename": "test3_2011-02-22-163241_opendoc.crash", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:14.000+0000", "size": 22926, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "iOS: Facebook module authorize crashes when Safari Restricted", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130264", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

occurs on 3.1.3 - 4.X.X

\n

attaching crash logs. Basically install app and tap \"authorize\"\nbutton, app will crash.

\n

Assigning to Stramer as per Blain. There is a work around (use\nfb log in button) fwiw. Could be cherry picked back in 1.6.X if\nneeded (as per Blain). 1.7.0, high priority.

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:14.000+0000", "updated": "2011-04-15T03:39:14.000+0000" }, { "id": "130265", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

and 4.2.1 crash log

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:14.000+0000", "updated": "2011-04-15T03:39:14.000+0000" }, { "id": "130266", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Associated Lighthouse Tickets

\n

\nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/3148-...
\n\nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/3150-...
\n\nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/3149-...

{html}", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:14.000+0000", "updated": "2011-04-15T03:39:14.000+0000" }, { "id": "130267", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [a3d2f8cb68bec4be6796d6733ded90b374bea403])\n[#3198 state:fixed-in-qa] Add facebook login to\nthings that have to be done on the main thread. Hat tip to Blain.\n\nhttps://github.com/appcelerator/titanium_mobile/commit/a3d2f8cb68be...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:14.000+0000", "updated": "2011-04-15T03:39:14.000+0000" }, { "id": "130268", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [e7b65f6606ca7e0e984bd3c4b7346e609d1fd445])\n[#3198 state:fixed-in-qa] Add facebook login to\nthings that have to be done on the main thread. Hat tip to Blain.\n\nhttps://github.com/appcelerator/titanium_mobile/commit/e7b65f6606ca...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:14.000+0000", "updated": "2011-04-15T03:39:14.000+0000" }, { "id": "130269", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Tested with Titanium SDK version: 1.7.0 (03/02/11 13:57 5d8c78a)\non
\niPhone 4 OS 4.2.1
\niPhone 3g OS 3.1.2

{html}", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:39:16.000+0000", "updated": "2011-04-15T03:39:16.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }