I found a page (http://itunes.apple.com/linkmaker) to get the iTunes url for a specific page which I assume should direct the user out of my app and into the corresponding page in the app store.
I have never done this or any other UIWebView stuff but after some searching I found some code that I thought would work that uses UIApplication.h.
My code is:
#import <UIApplication.h>
//...in a tableView....
case 8:
- (BOOL)openURL:(NSURL *) http://itunes.apple.com/us/app/lockbox-pro/id288460603?mt=8&uo=4;
break;
openURL has an error saying that it is undeclared - but I imported the UIApplication.h file. Then I saw that the UIApplication import also had an error on it. I don't think that I want to use UIWebView because from what I understand, that opens up the URL in the app itself - I want to direct the user to the App Store. Where am I going wrong?
EDIT: Okay, I changed it to a simple button that is supposed to close the app and bring the user to the itunes page:
- (IBAction) pressedFull {
[[UIApplication sharedApplication] openURL:[NSURL urlWithString:@"http://www.google.com"]];
}
I linked it in IB - it still crashes the app when the user clicks on it.