@capacitor-community/advertising-id
v6.0.0
Published
Allows access to the IDFA (iOS) and AAID (Android)
Downloads
24,317
Maintainers
Readme
@capacitor-community/advertising-id
Allows access to the IDFA (iOS) and GAID (Android)
Install
npm install @capacitor-community/advertising-id
npx cap sync
iOS
iOS requires the following usage description be added and filled out for your app in Info.plist
to use the requestTracking()
method:
NSUserTrackingUsageDescription
(Privacy - Tracking Usage Description
)
API
requestTracking()
requestTracking() => Promise<{ value: AdvertisingStatus; }>
Returns: Promise<{ value: AdvertisingStatus; }>
getAdvertisingId()
getAdvertisingId() => Promise<{ id: string; status: AdvertisingStatus; }>
Returns: Promise<{ id: string; status: AdvertisingStatus; }>
getAdvertisingStatus()
getAdvertisingStatus() => Promise<{ status: AdvertisingStatus; }>
Returns: Promise<{ status: AdvertisingStatus; }>
Type Aliases
AdvertisingStatus
'Authorized' | 'Denied' | 'Not Determined' | 'Restricted'