[TIMOB-19906] iOS: SafariDialog close event crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-11-10T18:46:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.1.0 |
Components | iOS |
Labels | crash, ios, safaridialog |
Reporter | Sebastian Klaus |
Assignee | Hans Knöchel |
Created | 2015-11-10T15:01:11.000+0000 |
Updated | 2015-11-10T21:10:23.000+0000 |
Description
SafariaDialog crashes the app after opening with an URL containing spaces
var self = Ti.UI.createWindow({
title: L('Test')
});
self.addEventListener('open', function () {
var SafariDialog = require('ti.safaridialog');
SafariDialog.open({
url: 'http://www.amazon.com/s/field-keywords=Transformers 4', // works not
//url: 'http://www.amazon.com/s/field-keywords=Transformers+4', // works
title: 'Search'
});
SafariDialog.addEventListener('close', function (e) {
console.log(e);
});
});
self.open();
[~hansknoechel] shouldn't we fix this before it is released with 5.1?
PR (Ti.SafariDialog/master): https://github.com/appcelerator-modules/Ti.SafariDialog/pull/3 PR (titanium_mobile/master): https://github.com/appcelerator/titanium_mobile/pull/7415 PR (titanium_mobile/5_1_X): https://github.com/appcelerator/titanium_mobile/pull/7416 Demo:
OK with me. Merge away.
PR approved and Merged
Closing ticket as fixed. Using the above demo code, verified the following: * On a iOS 9.1 device,
safariDialog.supported
,afariDialog.getSupported()
, andsafariDialog.isSupported()
returns true on launch of the app. * On a iOS 9.1 device, if I press the"Open SafariDialog!"
button and close the SafariDialog multiple times, then the app does not crash. * On a iOS 8.2 device,safariDialog.supported
,afariDialog.getSupported()
, andsafariDialog.isSupported()
returns false on launch of the app. Tested on: Appcelerator Studio, build: 4.4.0.201511101919 Appc CLI NPM: 4.2.1 Appc CLI Core: 5.1.0-44 Arrow: 1.3.19 SDK: 5.1.0.v20151110110428 ti.safaridialog: 1.0.2 Node: v4.2.1 OS: El Capitan (10.11.1) Xcode: 7.1.1 Devices: iphone 6s plus (9.1), iphone 6 (8.2)Very fast reaction. Thank you all.