In some free apps there is a button for buy pro version of app that if you touch it app store app will open how can i do that from code ?
The iPhone/iPad will automatically recognize an AppStore URL if you just:
- (IBAction)OpenAppInAppStore {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"itms://itunes.apple.com/us/app/wolframalpha/id334989259?mt=8"]];
}
or if you open any URL that has "itms://" and only on the device
Launch iTunes on your computer.
Search for the item you want to link to.
Right-click or control-click on the item's name in iTunes, then choose "Copy iTunes Store URL" from the pop-up menu.
Open the modified URL using an NSURL object and the -[UIApplication openURL] method.
Read Technical Q&A QA1629. They also offer a method how you can add your iTunes Affiliate link without redirecting from your app to safari to the appstore
Use the function openURL from UIApplication with the iTunes URL link of your App.
Related
Using the iTunes Link Maker, and with reference to this answer, I've created a test app that can launch the iTunes app and list the episodes of a given podcast:
NSString *address = #"itms://itunes.apple.com/<country code>/podcast/<podcast name>/id<numeric ID>?uo=4";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:address]];
But what else is possible?
From my app, can I launch the iTunes app to start downloading a particular podcast episode?
From my app, can I launch the iTunes app to start streaming a particular podcast episode?
From my app, can I launch Apple's new Podcasts app if the user has it installed?
[3]. Yes, you can. Just change
itms://[url]
To any of these forms:
itms-pcast://[url]
itms-pcasts://[url]
itms-podcast://[url]
itms-podcasts://[url]
I am using Xcode to develop an iOS app and I need to know how to link a website to a button to open with in the app. I want o have a drop down bar that has buttons to return to a separate screen and a button to save the link to another place. Is there a way to open a website or a link to safari with my app?
You can open a website directly by using a UIWebView object in your app.
You can get Safari to open a web site by invoking something like [[UIApplication sharedApplication] openURL:myURL].
I am opening an another app using openUrl of url scheme.Now I want to back to my source app getting some information from target app.Can anyone know how it will be done?
I am able to open other app using apple url scheme but not getting how it will be returned to previous app.I am using following code to open target app.
[[UIApplication sharedApplication] openURL:url];
You can't, only if the app you are opening knows how to app your app, end knows that your app is the one that opened it will it be able to open your app again.
There is no standaard URL scheme that can tell an other app to open your again.
if the target app yours as well, or it is not but it supports calling back out?
If so, you pass it your URL as a parameter:
url = #"otherapp://?return=myapp";
Latest update from iOS 9:
Now apple provide back button by default when you navigate to any app using url schemes.
Here you go:
http://appleinsider.com/articles/15/08/09/how-to-use-the-new-back-button-in-ios-9
I have 2 versions of an app. Lite and Paid.
I want to have a button in Lite version which when clicked opens App Store application on iPhone and shows the page for Paid version of the app.
How do I do this?
I DONT want to open Paid version iTunes page in Safari. It should open in App Store application only.
Thanks!
This should work always (all OS):
http://itunes.apple.com/app/idYOUR_PAID_APP_ID
Code snippet (you can just copy & paste it):
#define YOUR_PAID_APP_ID 553834731 // replace with your paid app ID
static NSString *const iOSAppStoreURLFormat = #"http://itunes.apple.com/app/id%d"; // General link to the App Store
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: iOSAppStoreURLFormat,YOUR_PAID_APP_ID ]]]; // Would open the right link
When a user clicks the "SHow me more" button in my app, I want to open iTunes on the iPad to that app so they can buy it too.
How is this done in Objective-C (or Monotouch)
just openURL to your user id, for instance, mine is http://itunes.apple.com/us/artist/wrightscs/id387614647
You can goto one of your apps in iTunes, click on your name and all of your apps will come up, right-click on your name and copy the link.
NSString *urlText = #"http://itunes.apple.com/us/artist/vendor/id000000";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlText]];
Follow WrightCS's url convention to construct your own url, and then use this line of code to open it. Don't worry, iOS is smart enough to open the iTunes app for you.
//aUrl is a NSURL instance
[[UIApplication sharedApplication] openURL:aUrl];
For a complete list on how to construct those urls, check this great post: How can I link to my app in the App Store (iTunes)?