How to launch App Store from my iPhone application?
2010-08-11 17:14
603 查看
Thisiseasy.Justfollowthestepsbelowandyouwillbeoverinlessthenminute.
LaunchiTunesonyourMac.
Searchfortheitemyouwanttolinkto.
Right-clickorcontrol-clickontheitem’snameiniTunes,thenchoose“CopyiTunesStoreURL”fromthepop-upmenu.
ThereturnedURLisanitunes.apple.comlink.However,iPhonerequiresphobosURLsfordirectlinkingtotheAppStore.
Therefore,youmustreplaceituneswithphobosinthereturnedURL.
OpenthemodifiedURLusinganNSURLobjectandthe-[UIApplicationopenURL]method.
viewsourceprint?
NowwhenyoupressbuttonlinkedwithappStoreLinkIBAction,AppStoreapplicationwillopenandyouwillseeDivineOfficeapplication.That’sall.
LaunchiTunesonyourMac.
Searchfortheitemyouwanttolinkto.
Right-clickorcontrol-clickontheitem’snameiniTunes,thenchoose“CopyiTunesStoreURL”fromthepop-upmenu.
ThereturnedURLisanitunes.apple.comlink.However,iPhonerequiresphobosURLsfordirectlinkingtotheAppStore.
Therefore,youmustreplaceituneswithphobosinthereturnedURL.
OpenthemodifiedURLusinganNSURLobjectandthe-[UIApplicationopenURL]method.
1.
-(IBAction)appStoreLink{
2.
3.
[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@
"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=301349397&;amp;amp;amp;amp;mt=8"
]];
4.
5.
}
NowwhenyoupressbuttonlinkedwithappStoreLinkIBAction,AppStoreapplicationwillopenandyouwillseeDivineOfficeapplication.That’sall.
相关文章推荐
- How Can I Launch The Appstore App Directly from my Application
- How to launch AppStore application with request?
- How do i prevent end users from connecting to the database other than my application?", version 8.1.5
- How to launch Windows applications (Notepad) / Call Batch files from a C#/.NET console application.
- Launching the App Store from an iPhone application
- How to launch application to start->run
- How to open application with notification from LocalNotifications plugin in PhoneGap
- Assigning to 'AppDelegate *' from incompatible type 'id<UIApplicationDelegate>'
- How to resolve "your security settings have blocked an untrusted application from running
- Preparing and Submitting an Application to the App Store with xCode4.2 and iOS5 SDK
- How to read one column from SQLite and store in Array
- Publishing an iOS App to App Store from Xcode 5
- java.lang.RuntimeException: Unable to instantiate application app.dawnling.app.app.MyApplication: ja
- How to create a custom directory for app files inside the ~/Library/Application Support directory.
- How To Create A Socket Based iPhone App and Server[mark]
- How to Properly Remove Datastore or LUN from ESXi 5.x hosts
- This application is currently offline. To enable the application, remove the app_offline.htm file from the application root dire
- How to drag a virtual file from your app into Windows Explorer
- How to discover memory usage of my application in Android
- How are the icon files in my application bundle used on iPad and iPhone?