Does iOS Calendar support a URL scheme? - ios

Is there any URL scheme that will launch the Calendar app on iOS?
I use Prowl to push Growl notifications to my phone. They just added support to launch an app with a URL based on the notification. I tried cal:// caldav:// and ical:// without any luck.

Try this. it works for me. Here is the link
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"calshow://"]];

Update: you can now use the calshow:// URL to open the Calendar app on iOS.
See this question: Apple does not list this application on its Apple URL Scheme Reference.

Related

Opening TestFlight app from another app and deep link to specific app

How do i find the scheme of another app and deep link to it from my own iOS app?
More specifically, I want to deep link to the Testflight app upon certain conditions (set by my code). I'm assuming the person has Testflight installed, (which might be a bad assumption but we can live with that assumption).
I know that on Android, you can query for apps and send intents to deep link to someone else's app. What would be the equivalent on iOS?
There are two things you need to do. First, check to see if TestFlight is installed. Then create a new link to your app.
NSURL *customAppURL = [NSURL URLWithString:#"itms-beta://"];
if ([[UIApplication sharedApplication] canOpenURL:customAppURL]) {
// TestFlight is installed
// Special link that includes the app's Apple ID
customAppURL = [NSURL URLWithString:#"https://beta.itunes.apple.com/v1/app/978489855"];
[[UIApplication sharedApplication] openURL:customAppURL];
}
This special https://beta.itunes.apple.com URL will be opened directly in TestFlight.
Finally, if you are using iOS 9 (or later), you need to make an addition to your Info.plist to get the canOpenURL: method to work.
If your app is linked on or after iOS 9.0, you must declare the URL
schemes you want to pass to this method. Do this by using the
LSApplicationQueriesSchemes array in your Xcode project’s Info.plist
file. For each URL scheme you want your app to use with this method,
add it as a string in this array.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>itms-beta</string>
</array>
From looking at the plist the URL scheme for TestFlight is "itms-beta://" I can't manage to get it deep linking yet, I've tried passing it the Apple ID, with and without a ? along with prefixing it with appleid= I will try bundle ID next.
To open the TestFlight app on the users device you can use:
NSURL *customAppURL = [NSURL URLWithString:#"itms-beta://"];
if ([[UIApplication sharedApplication] canOpenURL:customAppURL]) {
[[UIApplication sharedApplication] openURL:customAppURL];
}
Swift 3/4 answer:
if let customAppURL = URL(string: "itms-beta://"){
if(UIApplication.shared.canOpenURL(customAppURL)){
UIApplication.shared.open(customAppURL, options: [:], completionHandler: nil)
}
}
Most of the built-in applications Apple provides respond to custom URL schemes; for example, the Maps, Mail, YouTube, iTunes, and App Store applications will all open in response to custom URLs. However, there are also many established third-party applications with published URL schemes that you can use in your own application. You can search the applications schemes on
http://handleopenurl.com/
http://wiki.akosma.com/IPhone_URL_Schemes – both have a great list of URL schemes
Once you got the custom URL scheme then you can deep link to that app using the same schema,
NSURL *customAppURL = [NSURL URLWithString:#"urlscheme://"];
//Eg: NSURL *whatsappURL = [NSURL URLWithString:#"whatsapp://send?text=Hello%20World!"];
if ([[UIApplication sharedApplication] canOpenURL:whatsAppURL]) {
[[UIApplication sharedApplication] openURL:whatsAppURL]]];
}
Another way to invoke either one app or another:
- (IBAction)go:(id)sender {
NSString *cnnAppURL = #"cnn://";
NSString *mapsAppURL = #"maps://";
BOOL canOpenURL = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:cnnAppURL]];
NSString *url = canOpenURL ? cnnAppURL : mapsAppURL;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
}
Please read "UseYourLoaf's recent blog post on using URLschemes with canOpenURL. This relates to new security concerns and solutions. Quote:
"This is useful but developers including Twitter and Facebook were using this mechanism to discover the list of Apps installed on a device so they can deliver “tailored content”. Apple decided this is a privacy violation and so in iOS 9 restricted the querying of URL schemes. If you build and link against the iOS 9 SDK you need to whitelist the schemes your app will query. What is important to understand is that this policy can also impact older Apps that have not yet been rebuilt with the iOS 9 SDK."
Please read this link on issues related to the canOpenURL function
Read #picciano's last point - this won't work without modifying your app's plist.

How can I open Google Maps URL Scheme on iOS?

AS google map SDK doc description, we can use the code below to call native google maps to finish directions. But how can I test these code on my Xcode? it always return "can't use comgooglemaps://"?
if ([[UIApplication sharedApplication] canOpenURL:
[NSURL URLWithString:#"comgooglemaps://"]]) {
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:#"comgooglemaps://?center=40.765819,-73.975866&zoom=14&views=traffic"]];
} else {NSLog(#"Can't use comgooglemaps://");
}
If it is iOS 9 you might want to try this: under info
custom iOS taget properties, LSApplicationQueriesSchemes. add comgooglemaps
Apple Dev Notes say "NO if no app is available that will accept the URL; otherwise, returns YES."
Make sure you have Google Maps installed, not the default Apple maps App.
Opening that URL requires the Google Maps app to be installed. You can't install apps from the app store on the simulator (they aren't compiled for x86 as a start), so you will need to test on an actual device

How to open any iOS App from my own App

What I want to do is open any iOS Application (Evernote, safari, Facebook, etc) from my own iOS application. For example, I have created my app with two simple buttons, the first one is named "Evernote" and the second one is named "Safari", so when I click on the "Evernote" button I want that the Evernote App launch on my iOS device, the same when I click on the "Safari" button I want that the button opens my Safari App. How can I do that? It is that possible? If it is, please tell me how. Thank you very much.
yes it possible if you known this app scheme reference URL.
Example call Tel app:
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"tel://"]]){
NSString *tell = [#"tel://" stringByAppendingString:phoneNumber];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:tell]];
}
Safari and other is same way.
List common schemes Url here : http://wiki.akosma.com/IPhone_URL_Schemes
Hope this link helps you.
http://code.tutsplus.com/tutorials/ios-sdk-working-with-url-schemes--mobile-6629
If you need to open external apps from your app then follow the above link. Or if you need to open the iOS native apps like phone, mail, safari, etc, you can use URL schemes for opening the app.

Open App store through iPhone Application

Is there any way to Open Apple AppStore with my iPhone Application ?
Yes, You Can do this Using :
If you have your application URLthen.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:
#"itms-apps://YourApplicationLink"]];
else you can create the URL with this.
Link Maker
Thanks
please see this apple QA Link https://developer.apple.com/library/ios/#qa/qa1633/_index.html
provided by
Company Name
http://itunes.com/apps/<companyname>
for example, http://itunes.com/apps/smule
Application Name
http://itunes.com/apps/<applicationname>
for example, http://itunes.com/apps/ocarina
Application by Company
http://itunes.com/apps/<companyname>/<applicationname>
for example, http://itunes.com/apps/smule/ocarina
Launching the App Store from an iPhone application
https://developer.apple.com/library/ios/#qa/qa2008/qa1629.html
In iOS6 there is the new SKStoreProductViewController http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/SKITunesProductViewController_Ref/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011852
Use the itms-apps: or itms-appss: URL scheme.

Open setting from my app

I am using iCloud for core data. if user is not logged in on iCloud i want to take him to setting page, is it possible in ios.
Thanks
If you are writing app for iOS < 5.1 then you can use custom URL schemes - find list here.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: myUrlString ]]; //find myUrlString in link above
But this feature was removed in iOS 5.1 and most likely won't available in the feature

Resources