-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handleOpenURL not firing on iOS cold start #93
Comments
tried to change the version to 3.6.3, still its not working on IOS. |
have you found a solution? I have the same problem |
Same problem here on Android 5.1 and possibly lower versions too. |
Same with Android 5.0.1 |
If anyone can reproduce this problem with a vanilla cli generated project then I'd be more than happy to take a look. With something like Meteor in the mix you're on your own. |
I'm having the same issue with Ionic framework, tried different tips that I've found on web but none of them are working; my scenario throws this error: |
I am using cordova 4.0.0-dev and still have this issue. Any progress? |
@martindrapeau see my comment of July 9th. That offer still stands. |
Fair enough - I think we are all using frameworks and wrappers. Cocoon.io in my case. I will see what I can do and get back to you... |
As usual, adding a little delay solves the problem, at least for me...
(i'm on angular 1.3.13 / ionic 1.0.1 / react 0.13.3, lots' of 3's there...) |
still not working @possan |
What's your setup like? The more details the better. |
I don't understand the question, sorry eddy :( I build with Intel XDK cordova solution. It work for android, and not for iOS when the app is shut. Works when the app in in background. Setup is ipa |
@xale76 You're describing the symptoms of an issue in Cordova-iOS 3.7.0 - which version are you using? |
cordova cli? |
No Cordova-iOS, please check it and move to anything else than 3.7.0. |
where I can find this information? |
I don't use XDK and please don't mistake me for Google :) |
Same problem, someone fixed it? |
i got the same problem, someone solved it? |
@vhuerta thanks for asking twice. What version of cordova-ios are you on? Not cordova-cli. |
Im using the 3.9.1 version |
Can you share your code with me perhaps? |
sure there is, im using Meteor but basically when i open the app from cold always im getting the index page window.handleOpenURL = function handleOpenURL(url) {
setTimeout(function() {
if(Meteor.isCordova) {
var host = window.location.protocol + "//" + window.location.host;
if(url.indexOf('?external')) {
Router.go(url.replace('saxmovil://', ''));
}
}
}, 500);
}; |
Ah Meteor again. Anything in the adb log or js console? |
Setting a 500 timeout worked for me. |
setTimeout does not work for me too. Does anybody have a different solution? |
@mmBs here is my modified meteor_cordova_loader. https://gist.github.com/Exilz/3d50cf7614b982157faa Cold start works like a charm on Android/iOS regardless of versions and phone's swiftness since it doesn't depend on timeout. I guess it's quite risky for Meteor, though... |
@Exilz thanks for that. I will try to adapt this approach to my implementation - i use backbone.js |
I also HAD problems with handleOpenURL not being called on cold start. It worked fine on the iOS simulator but not on the actual device. In my case I solved it by placing my handleOpenURL()-implementation in a script-element inside the body. Like so:
On rare occasions it still doesn't work but I haven't been able to reproduce those bugs yet... (Oh, and @EddyVerbruggen, thanks for this awesome plugin!) |
Applying this fix from @easym0de seems to fix the problem completely: #2 (comment) Could this get implemented? Adding the used URL as a global variable seems like a decent fallback (or even default!). In contrary to the openURL-function you can actually rely on the window being defined. |
Nothing here worked for me, but then I deleted this line and everything started working properly It seems like the initial cold start handler calls too early but it resets the url to nil, so when the warm start handler is called afterwards there is no url. Not sure if this is a good solution or not but it works every time for both cold start and warm start |
Nothing here worked for me too. I fixed it with call the HandleOpenURLNotification after 0.5s in application:openUrl
|
Same happening to me on Cordova iOS 3.9. I imagine this would be fixed if |
happens to me too.. cold start does not fire.. running ios 3.9.1 and straight up cordova build no frameworks other then my own js framework for loading views. could this be related to the fact that i am using the wkwebview plugin? warm start works.. cold start no go |
Me on IOS 4. Cold start does not seem to work.
` <script> function handleOpenURL(url) { setTimeout(function() { window.localStorage.setItem("externalLoad", JSON.stringify(url)); }, 0); } </script> ` ``` |
I am using Ember and have found something interesting. I was not able to trigger the |
I'm on Cordova 3.8.0 and my handleOpenURL function is not firing on a cold start of the app. It works fine if the app is already open, and works great on Android.
I'm assuming it's related to https://issues.apache.org/jira/browse/CB-7606.
The text was updated successfully, but these errors were encountered: