[TIMOB-23896] iOS: Add Ti.App.iOS "handleurl" event to handle incoming URL schemes
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-09-13T00:01:12.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.5.0 |
Components | iOS |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2016-09-12T17:02:30.000+0000 |
Updated | 2016-09-14T22:14:33.000+0000 |
Description
We should be able to get notified when a new URL scheme is handled by the application delegate.
Will be fixed as part of TIMOB-23890 and also provides a solution for TIMOB-23884.
Demo-code: https://gist.github.com/hansemannn/d2263475b40469d3f2e4b82f03cc345c
Updated the sample code here:
[~hansknoechel] But when i click on "Open Test App", I get "Safari cannot open the page because the address is invalid". Not sure what to expect here?
Your tiapp.xml must be able to handle the url-scheme
safaritest://
, so you need the following in there:APPROVED. CR and FT passed.
Would this be available to test via a nightly build? If so which one? I gave 5.5.0.v20160913000746 a try this morning and I'm not getting the handleurl event. Will this require more than just using the right SDK?
It's there. Use the following event:
Just checked the build-server as well, just to be sure. Also check that you selected the correct SDK version in your tiapp.xml.
It worked. Thank you. I was missing the iOS part.
Verified fixed, using: MacOS 10.12 (16A313a) Studio 4.7.1.201609100950 Ti SDK 5.5.0.GA Appc NPM 4.2.7 Appc CLI 5.5.0 Alloy 1.9.2 Xcode 8.0 (8A218a) handleurl event is fired and correctly handled. Tested using the provided test code as well as modified versions of it. The event was fired and caught properly.