Modifier

Partager via


UIApplicationDelegate.WillContinueUserActivity(UIApplication, String) Method

Definition

Informs the app that the user is attempting to continue a userActivityType action for which data might not be available, and returns to notify the user that the app will continue the activity.

[Foundation.Export("application:willContinueUserActivityWithType:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual bool WillContinueUserActivity (UIKit.UIApplication application, string userActivityType);
abstract member WillContinueUserActivity : UIKit.UIApplication * string -> bool
override this.WillContinueUserActivity : UIKit.UIApplication * string -> bool

Parameters

application
UIApplication

The UIApplication singleton for the app.

userActivityType
String

The user activity identifier.

Returns

true if this app is prepared to continue the activity.

Attributes

Remarks

This method is a re-entry point for user activities (e.g., Handoff activities). An application indicates interest in a particular userActivityType by adding the value to it's info.plist as a T:System.String value in an array called NSUserActivityType. By convention, the activity type begins with a domain-reversed string identifying the developer:

<key>NSUserActivityTypes</key>
<array>
<string>com.xamarin.HandOffDemo.verb</string>
</array>              

A client app initiates a Handoff-related user activity by calling, for instance, UpdateUserActivity(String, NSDictionary, NSUrl) with a matching userActivityType. This WillContinueUserActivity(UIApplication, String) method begins the Handoff-related re-entry to the app.

App devs should override this method to return a Boolean indicating whether or not the app is capable of completing the user activity. If this method returns true, the system will shortly call the method M:UIKit.UIApplication.ContinueUserActivity*.

Applies to