Contents

confirmAcquired(in:completionHandler:)

Checks whether an App Clip invocation happened at an expected physical location.

Declaration

func confirmAcquired(in region: CLRegion, completionHandler: @escaping  @Sendable (Bool, (any Error)?) -> Void)
func confirmAcquired(in region: CLRegion) async throws -> Bool

Parameters

  • region:

    The expected physical location at the time of the App Clip invocation.

  • completionHandler:

    A closure called when the platform confirms the expected physical location at the time of the App Clip invocation.

    The closure takes the following parameters:

    inRegion

    A Boolean value that indicates whether the App Clip invocation happened at the expected physical location.

    error

    The error object that describes why the platform couldn’t confirm the user’s physical location.

    This parameter is nil if the platform was able to determine the user’s physical location at the time of the App Clip invocation.

Mentioned in

Discussion

Confirm the user’s location at the time of the App Clip invocation if the App Clip is associated with a physical location. The request to confirm the location fails with disallowed if the source of the invocation isn’t an NFC tag or visual code.

For the platform to accept the request to confirm the user’s location, you need to make modifications to the Info.plist file of the App Clip. For more information, see Enabling notifications in App Clips.