I am using URL Schemes to be able to open my app using a url. It is working fine when the receiver app is running.
The problem however, is if the app is closed. If I type in the url into Safari for example, the app launches and immediately crashes and I’m given:
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
Thread 1: Program received signal: “SIGKILL”
I have put an NSLog in didFinishLaunchingWithOptions but it looks like that never gets fired, neither does handleOpenURL.
Why does it do this?
I’d suggest two things:
Then – I’d launch the app from XCode and it will wait until you enter the URL in Safari. At this point you’re in the debugger and you might be able to get more information.
When this happens to me it’s usually some memory thing that I haven’t properly initialized in one of the code execution paths.
Lastly -if this is happening on a device (not just in the simulator) sometimes there is more information in the Organizer’s console.