I’m using handleOpenURL() for a Custom URL Scheme to launch my app from a link in an email. Works perfectly and I can do stuff in my app based on the URL parameters in the link.
The problem is handleOpenURL() doesn’t seem to get call when my app does a cold start (not running in the background). Is there another handler that I can use for a cold start vs an already running instance?
OR
Is there a global variable that I can read that will tell me what the invoke URL was? I read about invokeString, but it never seems to be set?
I’m using PhoneGap 2.0
if you read carefully the comment above the application:handleOpenURL method, you will probably understand:
This methods will not be called if the application is not running. My solution was to tweak project with the following changes:
MainViewController.h
MainViewController.m
AppDelegate.m
Hope that helps.
Cyril
Additional note: when testing make sure you stop xcode. When xcode was running application would throw an exception. if I stop the xcode this solution works fine.