Edit in GitHubLog an issue

Currently, CLBeacon is only available on iOS. The sample code contains the necessary checks to ensure OS compatibility.

This example uses static constant strings that were provided in the trackBeacon code sample above.

Swift

Copied to your clipboard
#if os(iOS)
class func clearCurrentBeacon() {
UserProfile.removeUserAttributes(attributeNames: [BEACON_MAJOR, BEACON_MINOR, BEACON_UUID, BEACON_PROXIMITY])
}
#endif

Objective-C

Copied to your clipboard
#if TARGET_OS_IOS
+ (void) clearCurrentBeacon {
[AEPMobileUserProfile removeUserAttributesWithAttributeNames: @[BEACON_MAJOR, BEACON_MINOR, BEACON_UUID, BEACON_PROXIMITY]];
}
#endif
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.