LoadURL from IOS?

I have two questions.

  1. Can you call a webpage (URL) from the action of a button in IOS? I’m trying to jump to a website from the app that I’m building.

  2. If you submit this to the app store, does it permit you to do this?

If I understand you correctly, this is shown in the examples. Examples -> iOS -> Declares -> ShowURL. The relevant code is:

[code]Function ShowURL(url As Text) As Boolean
// NSString* launchUrl = @“http://www.xojo.com/”;
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString: launchUrl]];

Declare Function NSClassFromString Lib “Foundation” (name As CFStringRef) As Ptr
Declare Function sharedApplication Lib “UIKit” Selector “sharedApplication” (obj As Ptr) As Ptr
Dim sharedApp As Ptr = sharedApplication(NSClassFromString(“UIApplication”))

// https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/#//apple_ref/occ/clm/NSURL/URLWithString:
Declare Function URLWithString Lib “Foundation” Selector “URLWithString:” ( id As Ptr, URLString As CFStringRef ) As Ptr
Dim nsURL As Ptr = URLWithString(NSClassFromString(“NSURL”), url)

// https://developer.apple.com/Library/ios/documentation/UIKit/Reference/UIApplication_Class/index.html#//apple_ref/occ/instm/UIApplication/openURL:
Declare Function openURL Lib “UIKit” Selector “openURL:” (id As Ptr, nsurl As Ptr) As Boolean
Return openURL(sharedApp, nsURL)
End Function

Thanks Jason. Didn’t see that in the examples.

Of course.