Editar

Compartir a través de


UIApplication.OpenUrl Method

Definition

Overloads

OpenUrl(NSUrl)

Opens the specified URL, launching the app that's registered to handle the scheme.

OpenUrl(NSUrl, NSDictionary, Action<Boolean>)

Opens the specified URL, launching the app that's registered to handle the scheme.

OpenUrl(NSUrl, UIApplicationOpenUrlOptions, Action<Boolean>)

Opens the specified URL, launching the app that is registered to handle the scheme.

OpenUrl(NSUrl)

Opens the specified URL, launching the app that's registered to handle the scheme.

[Foundation.Export("openURL:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.None, "Please use the overload instead.")]
public virtual bool OpenUrl (Foundation.NSUrl url);
abstract member OpenUrl : Foundation.NSUrl -> bool
override this.OpenUrl : Foundation.NSUrl -> bool

Parameters

url
NSUrl

Represents a URL.

Returns

true if the URL was successfully opened.

Attributes

Remarks

If another app is registered to handle the URL scheme, calling this method will launch the other application, which may cause the current application to quit or at least be sent to the background.

This member is not available to Extensions.

See also

  • <xref:UIKit.UIApplication.CanOpenUrl>
  • <xref:UIKit.UIApplicationDelegate.HandleOpenUrl>

Applies to

OpenUrl(NSUrl, NSDictionary, Action<Boolean>)

Opens the specified URL, launching the app that's registered to handle the scheme.

[Foundation.Export("openURL:options:completionHandler:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void OpenUrl (Foundation.NSUrl url, Foundation.NSDictionary options, Action<bool> completion);
abstract member OpenUrl : Foundation.NSUrl * Foundation.NSDictionary * Action<bool> -> unit
override this.OpenUrl : Foundation.NSUrl * Foundation.NSDictionary * Action<bool> -> unit

Parameters

url
NSUrl

The URL to be opened.

options
NSDictionary

Launch options.

completion
Action<Boolean>

Asynchronously called after launch.

This parameter can be null.

Attributes

Remarks

If another app is registered to handle the URL scheme, calling this method will launch the other application, which may cause the current application to quit or at least be sent to the background.

This member is not available to Extensions.

See also

  • <xref:UIKit.UIApplication.CanOpenUrl>
  • <xref:UIKit.UIApplicationDelegate.HandleOpenUrl>

Applies to

OpenUrl(NSUrl, UIApplicationOpenUrlOptions, Action<Boolean>)

Opens the specified URL, launching the app that is registered to handle the scheme.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public void OpenUrl (Foundation.NSUrl url, UIKit.UIApplicationOpenUrlOptions options, Action<bool> completion);
member this.OpenUrl : Foundation.NSUrl * UIKit.UIApplicationOpenUrlOptions * Action<bool> -> unit

Parameters

url
NSUrl

The URL to be opened.

options
UIApplicationOpenUrlOptions

Launch options.

completion
Action<Boolean>

Asynchronously called after launch.

This parameter can be null.

Attributes

Applies to