[TIMOB-3198] iOS: Facebook module authorize crashes when Safari Restricted
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:01:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Sprint-2011-08 |
Components | iOS |
Labels | feature, ios, release-1.7.0, reported-1.6.0, rplist |
Reporter | Jon Alter |
Assignee | Ralf Pfeiffer |
Created | 2011-04-15T03:39:13.000+0000 |
Updated | 2011-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
File | Date | Size |
---|---|---|
test3_2011-02-22-160654_jeff-haynies-iphone.crash | 2011-04-15T03:39:13.000+0000 | 17301 |
test3_2011-02-22-163241_opendoc.crash | 2011-04-15T03:39:14.000+0000 | 22926 |
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.
and 4.2.1 crash log
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-...
(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...
(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...
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