@adshift/react-native-plugin 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdShiftReactNativePlugin.podspec +11 -7
- package/CHANGELOG.md +122 -0
- package/README.md +506 -542
- package/android/build.gradle +17 -3
- package/android/consumer-rules.pro +21 -0
- package/android/src/main/java/com/adshift/reactnativeplugin/AdShiftReactNativePluginModule.kt +786 -229
- package/android/src/test/java/com/adshift/reactnativeplugin/ConsentSnapshotTest.kt +180 -0
- package/android/src/test/java/com/adshift/reactnativeplugin/DeepLinkDeliveryTest.kt +146 -0
- package/android/src/test/java/com/adshift/reactnativeplugin/InitializeOrderingTest.kt +111 -0
- package/android/src/test/java/com/adshift/reactnativeplugin/IntentLinkDedupTest.kt +168 -0
- package/android/src/test/java/com/adshift/reactnativeplugin/LaunchIntentForwardingTest.kt +106 -0
- package/android/src/test/java/com/adshift/reactnativeplugin/ModuleTestSupport.kt +167 -0
- package/android/src/test/java/com/adshift/reactnativeplugin/StartVerdictTest.kt +164 -0
- package/ios/AdShiftReactNativePlugin.h +7 -7
- package/ios/AdShiftReactNativePlugin.mm +200 -181
- package/ios/AdShiftReactNativePluginHelper.swift +584 -286
- package/ios/Core/BridgeRules.swift +82 -0
- package/lib/commonjs/Adshift.js +1135 -0
- package/lib/commonjs/Adshift.js.map +1 -0
- package/lib/commonjs/NativeAdShiftReactNativePlugin.js +22 -0
- package/lib/commonjs/NativeAdShiftReactNativePlugin.js.map +1 -0
- package/lib/commonjs/index.js +94 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/jest/index.js +164 -0
- package/lib/commonjs/jest/index.js.map +1 -0
- package/lib/commonjs/nativeSdkVersions.js +17 -0
- package/lib/commonjs/nativeSdkVersions.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types/AdshiftAdRevenue.js +47 -0
- package/lib/commonjs/types/AdshiftAdRevenue.js.map +1 -0
- package/lib/commonjs/types/AdshiftConfig.js +45 -0
- package/lib/commonjs/types/AdshiftConfig.js.map +1 -0
- package/lib/commonjs/types/AdshiftConsent.js +113 -0
- package/lib/commonjs/types/AdshiftConsent.js.map +1 -0
- package/lib/commonjs/types/AdshiftConsentSnapshot.js +69 -0
- package/lib/commonjs/types/AdshiftConsentSnapshot.js.map +1 -0
- package/lib/commonjs/types/AdshiftDeepLink.js +154 -0
- package/lib/commonjs/types/AdshiftDeepLink.js.map +1 -0
- package/lib/commonjs/types/AdshiftError.js +91 -0
- package/lib/commonjs/types/AdshiftError.js.map +1 -0
- package/lib/commonjs/types/AdshiftEventParam.js +140 -0
- package/lib/commonjs/types/AdshiftEventParam.js.map +1 -0
- package/lib/commonjs/types/AdshiftEventType.js +88 -0
- package/lib/commonjs/types/AdshiftEventType.js.map +1 -0
- package/lib/commonjs/types/AdshiftThirdPartySharing.js +70 -0
- package/lib/commonjs/types/AdshiftThirdPartySharing.js.map +1 -0
- package/lib/commonjs/types/index.js +123 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/version.js +9 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/Adshift.js +959 -296
- package/lib/module/Adshift.js.map +1 -1
- package/lib/module/NativeAdShiftReactNativePlugin.js +10 -7
- package/lib/module/NativeAdShiftReactNativePlugin.js.map +1 -1
- package/lib/module/index.js +26 -25
- package/lib/module/index.js.map +1 -1
- package/lib/module/jest/index.js +144 -0
- package/lib/module/jest/index.js.map +1 -0
- package/lib/module/nativeSdkVersions.js +13 -0
- package/lib/module/nativeSdkVersions.js.map +1 -0
- package/lib/module/types/AdshiftAdRevenue.js +43 -0
- package/lib/module/types/AdshiftAdRevenue.js.map +1 -0
- package/lib/module/types/AdshiftConfig.js +23 -26
- package/lib/module/types/AdshiftConfig.js.map +1 -1
- package/lib/module/types/AdshiftConsent.js +57 -50
- package/lib/module/types/AdshiftConsent.js.map +1 -1
- package/lib/module/types/AdshiftConsentSnapshot.js +65 -0
- package/lib/module/types/AdshiftConsentSnapshot.js.map +1 -0
- package/lib/module/types/AdshiftDeepLink.js +97 -67
- package/lib/module/types/AdshiftDeepLink.js.map +1 -1
- package/lib/module/types/AdshiftError.js +87 -0
- package/lib/module/types/AdshiftError.js.map +1 -0
- package/lib/module/types/AdshiftEventParam.js +135 -0
- package/lib/module/types/AdshiftEventParam.js.map +1 -0
- package/lib/module/types/AdshiftEventType.js +11 -36
- package/lib/module/types/AdshiftEventType.js.map +1 -1
- package/lib/module/types/AdshiftThirdPartySharing.js +65 -0
- package/lib/module/types/AdshiftThirdPartySharing.js.map +1 -0
- package/lib/module/types/index.js +9 -7
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/version.js +5 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/Adshift.d.ts +311 -0
- package/lib/typescript/commonjs/src/Adshift.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NativeAdShiftReactNativePlugin.d.ts +102 -0
- package/lib/typescript/commonjs/src/NativeAdShiftReactNativePlugin.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +51 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/jest/index.d.ts +103 -0
- package/lib/typescript/commonjs/src/jest/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/nativeSdkVersions.d.ts +11 -0
- package/lib/typescript/commonjs/src/nativeSdkVersions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/AdshiftAdRevenue.d.ts +56 -0
- package/lib/typescript/commonjs/src/types/AdshiftAdRevenue.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/AdshiftConfig.d.ts +104 -0
- package/lib/typescript/commonjs/src/types/AdshiftConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/AdshiftConsent.d.ts +76 -0
- package/lib/typescript/commonjs/src/types/AdshiftConsent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/AdshiftConsentSnapshot.d.ts +56 -0
- package/lib/typescript/commonjs/src/types/AdshiftConsentSnapshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/AdshiftDeepLink.d.ts +89 -0
- package/lib/typescript/commonjs/src/types/AdshiftDeepLink.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/AdshiftError.d.ts +57 -0
- package/lib/typescript/commonjs/src/types/AdshiftError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/AdshiftEventParam.d.ts +111 -0
- package/lib/typescript/commonjs/src/types/AdshiftEventParam.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/types/AdshiftEventType.d.ts +12 -35
- package/lib/typescript/commonjs/src/types/AdshiftEventType.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/AdshiftThirdPartySharing.d.ts +53 -0
- package/lib/typescript/commonjs/src/types/AdshiftThirdPartySharing.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +2 -0
- package/lib/typescript/commonjs/src/version.d.ts.map +1 -0
- package/lib/typescript/module/src/Adshift.d.ts +311 -0
- package/lib/typescript/module/src/Adshift.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeAdShiftReactNativePlugin.d.ts +102 -0
- package/lib/typescript/module/src/NativeAdShiftReactNativePlugin.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +51 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/jest/index.d.ts +103 -0
- package/lib/typescript/module/src/jest/index.d.ts.map +1 -0
- package/lib/typescript/module/src/nativeSdkVersions.d.ts +11 -0
- package/lib/typescript/module/src/nativeSdkVersions.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftAdRevenue.d.ts +56 -0
- package/lib/typescript/module/src/types/AdshiftAdRevenue.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftConfig.d.ts +104 -0
- package/lib/typescript/module/src/types/AdshiftConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftConsent.d.ts +76 -0
- package/lib/typescript/module/src/types/AdshiftConsent.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftConsentSnapshot.d.ts +56 -0
- package/lib/typescript/module/src/types/AdshiftConsentSnapshot.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftDeepLink.d.ts +89 -0
- package/lib/typescript/module/src/types/AdshiftDeepLink.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftError.d.ts +57 -0
- package/lib/typescript/module/src/types/AdshiftError.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftEventParam.d.ts +111 -0
- package/lib/typescript/module/src/types/AdshiftEventParam.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftEventType.d.ts +64 -0
- package/lib/typescript/module/src/types/AdshiftEventType.d.ts.map +1 -0
- package/lib/typescript/module/src/types/AdshiftThirdPartySharing.d.ts +53 -0
- package/lib/typescript/module/src/types/AdshiftThirdPartySharing.d.ts.map +1 -0
- package/lib/typescript/module/src/types/index.d.ts +17 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +2 -0
- package/lib/typescript/module/src/version.d.ts.map +1 -0
- package/package.json +49 -10
- package/src/Adshift.ts +1273 -342
- package/src/NativeAdShiftReactNativePlugin.ts +81 -115
- package/src/index.tsx +40 -25
- package/src/jest/index.ts +224 -0
- package/src/nativeSdkVersions.ts +10 -0
- package/src/types/AdshiftAdRevenue.ts +58 -0
- package/src/types/AdshiftConfig.ts +101 -53
- package/src/types/AdshiftConsent.ts +75 -72
- package/src/types/AdshiftConsentSnapshot.ts +103 -0
- package/src/types/AdshiftDeepLink.ts +123 -102
- package/src/types/AdshiftError.ts +107 -0
- package/src/types/AdshiftEventParam.ts +216 -0
- package/src/types/AdshiftEventType.ts +13 -35
- package/src/types/AdshiftThirdPartySharing.ts +63 -0
- package/src/types/index.ts +38 -6
- package/src/version.ts +2 -0
- package/lib/typescript/src/Adshift.d.ts +0 -335
- package/lib/typescript/src/Adshift.d.ts.map +0 -1
- package/lib/typescript/src/NativeAdShiftReactNativePlugin.d.ts +0 -143
- package/lib/typescript/src/NativeAdShiftReactNativePlugin.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -47
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/types/AdshiftConfig.d.ts +0 -74
- package/lib/typescript/src/types/AdshiftConfig.d.ts.map +0 -1
- package/lib/typescript/src/types/AdshiftConsent.d.ts +0 -88
- package/lib/typescript/src/types/AdshiftConsent.d.ts.map +0 -1
- package/lib/typescript/src/types/AdshiftDeepLink.d.ts +0 -93
- package/lib/typescript/src/types/AdshiftDeepLink.d.ts.map +0 -1
- package/lib/typescript/src/types/AdshiftEventType.d.ts.map +0 -1
- package/lib/typescript/src/types/index.d.ts +0 -5
- package/lib/typescript/src/types/index.d.ts.map +0 -1
- /package/lib/typescript/{package.json → module/package.json} +0 -0
|
@@ -10,20 +10,24 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package["license"]
|
|
11
11
|
s.authors = package["author"]
|
|
12
12
|
|
|
13
|
-
s.platforms = { :ios => '15.
|
|
14
|
-
s.source = { :git => "https://github.com/AdShift/
|
|
15
|
-
s.swift_version = '5.
|
|
13
|
+
s.platforms = { :ios => '15.1' }
|
|
14
|
+
s.source = { :git => "https://github.com/AdShift/react_native_plugin.git", :tag => "v#{s.version}" }
|
|
15
|
+
s.swift_version = '5.9'
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift,cpp}"
|
|
18
18
|
s.private_header_files = "ios/**/*.h"
|
|
19
|
+
# The Swift package around ios/Core exists to test the bridge rules on their
|
|
20
|
+
# own; the app compiles those sources through this podspec instead.
|
|
21
|
+
s.exclude_files = ["ios/Package.swift", "ios/Tests/**/*", "ios/.build/**/*"]
|
|
19
22
|
|
|
20
|
-
# Native AdShift iOS SDK
|
|
21
|
-
s.dependency 'AdshiftSDK', '
|
|
23
|
+
# Native AdShift iOS SDK (binary xcframework; exact pin, bumped with each plugin release)
|
|
24
|
+
s.dependency 'AdshiftSDK', '2.2.0'
|
|
25
|
+
s.static_framework = true
|
|
22
26
|
|
|
23
|
-
# Build settings for Swift/ObjC++ interop
|
|
24
27
|
s.pod_target_xcconfig = {
|
|
25
28
|
'DEFINES_MODULE' => 'YES',
|
|
26
|
-
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++20'
|
|
29
|
+
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++20',
|
|
30
|
+
'OTHER_SWIFT_FLAGS' => '$(inherited) -strict-concurrency=complete'
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
install_modules_dependencies(s)
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## Native SDK matrix
|
|
9
|
+
|
|
10
|
+
| Plugin | Android SDK | iOS SDK |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| 2.0.0 | 3.1.0 | 2.2.0 |
|
|
13
|
+
| 1.0.0 | 2.0.3 | ~> 1.0 |
|
|
14
|
+
|
|
15
|
+
## [2.0.0] - Unreleased
|
|
16
|
+
|
|
17
|
+
Breaking release targeting Android SDK 3.1.0 and iOS SDK 2.2.0. See "Upgrading from 1.x" in the README.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- `Adshift.logAdRevenue(params)` with `AdshiftMediationNetwork` and `AdshiftEventType.AdRevenue`.
|
|
21
|
+
- `Adshift.getAdShiftDeviceId()`.
|
|
22
|
+
- `Adshift.setBrandedDomains(domains)`, `Adshift.setMetaAppId(appId)`.
|
|
23
|
+
- `Adshift.setOaidData(oaid)` for Android devices without Google Play services; no-op on iOS.
|
|
24
|
+
- Push notification deep links: `Adshift.handlePushNotification(payload)`, `Adshift.addPushNotificationDeepLinkPath(path)`, `AdshiftConfig.pushDeepLinkPaths`.
|
|
25
|
+
- Automatic deep link forwarding (`AdshiftConfig.autoHandleDeepLinks`, default `true`): launch Intent and new Intents on Android, `Linking` on iOS.
|
|
26
|
+
- `AdshiftConfig.brandedDomains`, `AdshiftConfig.metaAppId`.
|
|
27
|
+
- A release build with `minifyEnabled true` on Android needs no keep rules of your own: the native SDK ships the ones its JSON layer requires, and they arrive with the dependency. Those rules keep its public API and the models that go on the wire and leave the rest to R8, so SDK frames in your crash reports arrive obfuscated — upload the `mapping.txt` your release build produces, which Crashlytics and the Play Console do for you once configured. Do not add `-keep class com.adshift.sdk.** { *; }`: it is not needed and it forces the whole native SDK into your APK unshrunk.
|
|
28
|
+
- Typed errors: `AdshiftError`, `AdshiftErrorCode`, `isAdshiftError`; native codes in `userInfo.nativeCode` / `userInfo.nativeDomain`.
|
|
29
|
+
- `ConsentSnapshot` returned by `refreshConsent()`; `ConsentFlag` tri-state consent.
|
|
30
|
+
- `Adshift.enableGPPDataCollection(enabled)`, forwarding the IAB GPP string a CMP wrote for US state privacy. Its own axis: it rides alongside whatever decides the GDPR axis and does not gate the advertising identifier.
|
|
31
|
+
- `Adshift.setThirdPartySharing(sharing)` and `Adshift.clearThirdPartySharing()` with `AdshiftThirdPartySharing.optedOut()` / `.allowed()`, for an answer the app collected on its own screen. Absent means sharing is allowed, so this axis reads a missing answer the opposite way to consent, and clearing is not the same as allowing.
|
|
32
|
+
- `ConsentSnapshot.source` reports the GPP axis as `gpp` on both platforms. Android names it `GPP_US_NAT` natively, but that is one section of the framework, so a CMP writing a state section instead would make the name wrong; which section was read is a separate fact.
|
|
33
|
+
- `ConsentSnapshot.cmpDetected`, which tells a CMP that has not been answered from no CMP at all — states every other field reports identically and which are fixed by opposite actions.
|
|
34
|
+
- `AdshiftDeepLink.isFirstSession`, `AdshiftDeepLink.params` typed as `Record<string, string>`.
|
|
35
|
+
- `AdshiftEventParam` with the 81 standard parameter names reports aggregate, `getAllEventParams()` and the `AdshiftEventParamValue` type. In development, `trackEvent` and the extra parameters of `logAdRevenue` warn once per name when a value carries the plain spelling of a standard name (`price`, `contentId`) instead of the constant. Values are always sent exactly as given.
|
|
36
|
+
- `PLUGIN_VERSION` and `Adshift.getInfo().nativeSdkVersions`.
|
|
37
|
+
- `AdshiftConfig.onError`: reports invalid arguments, a refused configuration and an API key the backend rejected, in every build.
|
|
38
|
+
- Jest mock: `@adshift/react-native-plugin/jest`.
|
|
39
|
+
- Deep link results are buffered (up to 20) until the first `onDeepLink` listener is registered.
|
|
40
|
+
- `trackEvent`, `trackPurchase` and `logAdRevenue` called before `start()` are queued (up to 100) and dispatched after a successful start.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
- `start()` resolves after the local start with `{ success, apiKeyValidationStatus?, errorCode?, errorMessage? }` and never rejects. `StartResult.message` removed.
|
|
44
|
+
- `handleDeepLink(url)` returns `Promise<void>`; results are delivered only through `onDeepLink`.
|
|
45
|
+
- No method raises any more. Promises reject as before; methods that return nothing skip the call and report it through `AdshiftConfig.onError`.
|
|
46
|
+
- Setters called before `initialize()` are kept and applied with the configuration instead of failing.
|
|
47
|
+
- `onDeepLink` and `isStarted()` work before `initialize()`.
|
|
48
|
+
- `initialize()` keeps the first configuration; later calls are ignored.
|
|
49
|
+
- `start()` reports what the SDK answered, so a device excluded from tracking resolves `OPTED_OUT` instead of looking like a successful start.
|
|
50
|
+
- The URL that opened the app is forwarded once per process, so reloading JavaScript no longer books the same link again. A second tap on the same link is still forwarded.
|
|
51
|
+
- `trackEvent` rejects `app_install` and `app_open` with `INVALID_ARGUMENT`: the SDK sends them itself.
|
|
52
|
+
- Calls waiting for `start()` reject when the start failed for a reason retrying cannot fix (rejected key, excluded device, SDK not initialized). Any other failure keeps them waiting for the next attempt.
|
|
53
|
+
- `AdshiftConsent.forGDPRUser()` accepts partial input; undecided flags are `null` and are not sent. `forNonGDPRUser()` sends no individual flags. `isConsentGranted` requires explicit `true`.
|
|
54
|
+
- Errors after `stop()` use `NOT_STARTED`; backend rejections use `INVALID_API_KEY` and `OPTED_OUT`.
|
|
55
|
+
- Minimum iOS 15.1 and Xcode 16.1; minimum Android API 24. React Native 0.82+ (New Architecture only).
|
|
56
|
+
- Public API is limited to `src/index.tsx`; internal helpers are no longer exported.
|
|
57
|
+
|
|
58
|
+
### Removed
|
|
59
|
+
- `NativeAdShiftReactNativePlugin`, `AdShiftNativeSpec`, `configToMap`, `consentToMap`, `deepLinkToMap` exports.
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
- `initialize()` no longer raises when the config carries a value the bridge cannot convert; only declared options are sent.
|
|
63
|
+
- A deep link arriving while buffered results wait for their first listener no longer overtakes them.
|
|
64
|
+
- A URL passed to `handleDeepLink()` is no longer forwarded a second time by automatic forwarding.
|
|
65
|
+
- A rejected API key is reported once, not twice.
|
|
66
|
+
- Deep link delivery is now exactly-once regardless of listener registration timing and JS reloads.
|
|
67
|
+
- `getInfo()` reports the real plugin version.
|
|
68
|
+
- A deferred deep link on iOS is delivered as `status: 'found'` with `isDeferred: true`, matching Android.
|
|
69
|
+
- `start()` reports `apiKeyValidationStatus` on Android too, instead of always `pending`.
|
|
70
|
+
- A tracking call on a device excluded from tracking rejects with `OPTED_OUT` on iOS, matching Android.
|
|
71
|
+
- `ConsentSnapshot.hasConsent` is replaced by `adIdentifiersAllowed`, which each platform derives with the rule it applies to the consent flags.
|
|
72
|
+
- A failed `start()` carries `nativeCode` (and `nativeDomain` on iOS) for support requests, whether the native side answered with a failure or rejected.
|
|
73
|
+
- The Jest mock reports the platform the test runs on and the native SDK versions the plugin is pinned to, instead of a fixed pair of values.
|
|
74
|
+
- `__reset()` on the Jest mock also drops recorded calls and per-test behaviour, so state no longer leaks between tests.
|
|
75
|
+
|
|
76
|
+
## [1.0.0] - 2026-01-05
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
#### SDK Lifecycle
|
|
81
|
+
- `Adshift.initialize(config)` - Configure SDK with API key and options
|
|
82
|
+
- `Adshift.start()` - Start tracking (returns Promise)
|
|
83
|
+
- `Adshift.stop()` - Stop tracking
|
|
84
|
+
- `Adshift.isStarted()` - Check if SDK is running
|
|
85
|
+
|
|
86
|
+
#### Event Tracking
|
|
87
|
+
- `Adshift.trackEvent(eventName, values?)` - Track in-app events
|
|
88
|
+
- `Adshift.trackPurchase(params)` - Track purchase events for SKAdNetwork
|
|
89
|
+
- 30+ predefined event types (`AdshiftEventType`)
|
|
90
|
+
|
|
91
|
+
#### Consent Management (GDPR/DMA)
|
|
92
|
+
- `Adshift.setConsentData(consent)` - Set manual consent
|
|
93
|
+
- `Adshift.enableTCFDataCollection(enabled)` - Enable TCF 2.2 auto-collection
|
|
94
|
+
- `Adshift.refreshConsent()` - Refresh consent state
|
|
95
|
+
- `AdshiftConsent.forGDPRUser(options)` - Create GDPR consent object
|
|
96
|
+
- `AdshiftConsent.forNonGDPRUser()` - Create non-GDPR consent object
|
|
97
|
+
|
|
98
|
+
#### Deep Linking
|
|
99
|
+
- `Adshift.onDeepLink(callback)` - Listen for deep links (direct + deferred)
|
|
100
|
+
- `Adshift.handleDeepLink(url)` - Process incoming URL
|
|
101
|
+
|
|
102
|
+
#### Configuration
|
|
103
|
+
- `Adshift.setCustomerUserId(userId)` - Set customer user ID
|
|
104
|
+
- `Adshift.setDebugEnabled(enabled)` - Enable/disable debug logs
|
|
105
|
+
- `Adshift.setAppOpenDebounceMs(ms)` - Set app_open event debounce
|
|
106
|
+
|
|
107
|
+
#### TypeScript Support
|
|
108
|
+
- Full TypeScript definitions
|
|
109
|
+
- `AdshiftConfig` - Configuration interface
|
|
110
|
+
- `AdshiftConsent` - Consent interface with factory methods
|
|
111
|
+
- `AdshiftDeepLink` - Deep link response interface
|
|
112
|
+
- `AdshiftEventType` - Predefined event constants
|
|
113
|
+
|
|
114
|
+
### Platform Support
|
|
115
|
+
- **iOS**: 15.0+ (Swift via Objective-C++ bridge)
|
|
116
|
+
- **Android**: API 21+ (Kotlin)
|
|
117
|
+
- **React Native**: 0.82+ (New Architecture / Turbo Modules only)
|
|
118
|
+
|
|
119
|
+
### Native SDK Dependencies
|
|
120
|
+
- iOS: `AdshiftSDK ~> 1.0`
|
|
121
|
+
- Android: `com.adshift:android-sdk:2.0.3`
|
|
122
|
+
|