Open ezhes opened 9 years ago
This is a great idea and would indeed speed up workflow but one question that remains is how would the user's application have such a URL scheme in the first place? Is it something that you'd want Dringend to do automatically or something the user would do manually?
Also as of iOS 9 the functionality of canOpenURL:
has been significantly reduced such that it can be only used to query 50 pre-defined schemes.
I think it would be best to create something like an advanced user menu in settings which could link to a github page or just a website that explains how to add the logging framework and integrate the url scheme. The URL scheme could just be $projectName://
because the project names are all URL safe. Instead, you could let the user specify their URL scheme, however that would require a settings menu for projects which would make sense as Dringend expands.
I've just tested running openURL
on a device with the app installing and the URL scheme doesn't work until the app has finished installing, which while it is a bad and hacky implementation, Apple hasn't really left us any choice if the did completely restrict the canOpenURL:
function.
Also, I have access to beta documentation but I couldn't find the place where it talks about canOpenURL changes. Was this in a talk in WWDC that I missed or is it somewhere else?
I agree with the idea of documentation describing to to the user how they can set up these advanced features themselves. Sounds like a good idea, thank you.
It's not mentioned in the main documentation but I've noticed it and it has been reported on here for example: http://www.macstories.net/linked/ios-9-bringing-changes-to-url-schemes/
By implementing a custom URL scheme into the applications, we can actually autolaunch applications from Dringend. It would require an update, so this should be labeled as an enhancement.
All this would require is after triggering the install alert (as we can't know when the user taps install because it's a system thing) we could just continuously check if this
[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"xxxxxx://"]];
returns true in the background. Once it does, we can then just run
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"xxxxxx://"]];
which will autolaunch our app for us. This would though require some user configuration or something else. I really think this would be useful to help speed up workflow and just fix that annoying iOS 8 change.