Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3198] iOS: Facebook module authorize crashes when Safari Restricted

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:01:09.000+0000
Affected Version/sn/a
Fix Version/sSprint-2011-08
ComponentsiOS
Labelsfeature, ios, release-1.7.0, reported-1.6.0, rplist
ReporterJon Alter
AssigneeRalf Pfeiffer
Created2011-04-15T03:39:13.000+0000
Updated2011-04-17T02:01:09.000+0000

Description

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

To Reproduce

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

var win = Titanium.UI.createWindow({  
    backgroundColor:'#fff'
});

// need to change the APPID before you run
Titanium.Facebook.appid = 'APPID';

var fbAuthButton = Titanium.UI.createButton({
    title: 'authorize()',
    bottom: 100,
    width: 300,
    height: 60
});
fbAuthButton.addEventListener('click', function(e) {
    Titanium.Facebook.authorize();
});

var fbButton = Titanium.Facebook.createLoginButton({
    'style': 'wide',
    'sessionProxy': 'http://api.appcelerator.net/p/fbconnect/',
    bottom: 50,
    height: 30,
    width: 300
});

win.add(fbAuthButton);
win.add(fbButton);
win.open();

Tested

TiSDK 1.6.0RC1, iOS SDK 4.2, iPhone4 iOS 4.2.1

Workaround

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

Associated Helpdesk Ticket(s)

http://developer.appcelerator.com/helpdesk/view/74491">http://developer.appcelerator.com/helpdesk/view/74491
http://developer.appcelerator.com/helpdesk/view/74771">http://developer.appcelerator.com/helpdesk/view/74771

Attachments

FileDateSize
test3_2011-02-22-160654_jeff-haynies-iphone.crash2011-04-15T03:39:13.000+000017301
test3_2011-02-22-163241_opendoc.crash2011-04-15T03:39:14.000+000022926

Comments

  1. Thomas Huelbert 2011-04-15

    occurs on 3.1.3 - 4.X.X

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

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

  2. Thomas Huelbert 2011-04-15

    and 4.2.1 crash log

  3. Jon Alter 2011-04-15

    Associated Lighthouse Tickets

    https://appcelerator.lighthouseapp.com/projects/32238/tickets/3148-new-facebook-module-crashes-on-non-multi-tasking-device-16-rc1"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/3148-...
    https://appcelerator.lighthouseapp.com/projects/32238/tickets/3150-facebook-module-in-rc1-mobile-fbdialog-like-option-needed"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/3150-...
    https://appcelerator.lighthouseapp.com/projects/32238/tickets/3149-facebook-module-in-rc1-mobile-safari-restricted"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/3149-...

  4. Jeff Haynie 2011-04-15

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

  5. Jeff Haynie 2011-04-15

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

  6. Natalie Huynh 2011-04-15

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

JSON Source