appsprint-react-native 1.1.8 → 1.1.10
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/README.md +4 -2
- package/ios/AppSprintBridge.swift +3 -0
- package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/AppSprintSDK +0 -0
- package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Info.plist +0 -0
- package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.abi.json +377 -45
- package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.package.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/PrivacyInfo.xcprivacy +11 -15
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/AppSprintSDK +0 -0
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Info.plist +0 -0
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +377 -45
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +377 -45
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +11 -1
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/PrivacyInfo.xcprivacy +11 -15
- package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/_CodeSignature/CodeResources +1 -1
- package/lib/commonjs/AppSprintAppleAds.js +46 -0
- package/lib/commonjs/index.js +7 -0
- package/lib/module/AppSprintAppleAds.js +42 -0
- package/lib/module/index.js +1 -0
- package/lib/typescript/AppSprintAppleAds.d.ts +16 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/AppSprintAppleAds.ts +54 -0
- package/src/index.ts +4 -0
- package/src/types.ts +1 -0
|
@@ -43,6 +43,14 @@ import os
|
|
|
43
43
|
@_Concurrency.MainActor final public func destroy()
|
|
44
44
|
@objc deinit
|
|
45
45
|
}
|
|
46
|
+
@_Concurrency.MainActor public enum AppSprintAppleAds {
|
|
47
|
+
@_Concurrency.MainActor public static func configure(apiKey: Swift.String, apiURL: Foundation.URL? = nil, isDebug: Swift.Bool = false) async
|
|
48
|
+
@_Concurrency.MainActor public static func getAppSprintId() -> Swift.String?
|
|
49
|
+
@_Concurrency.MainActor public static func getAttributionParams() -> [Swift.String : Swift.String]
|
|
50
|
+
@_Concurrency.MainActor public static func getAttribution() -> AppSprintSDK.AttributionResult?
|
|
51
|
+
@discardableResult
|
|
52
|
+
@_Concurrency.MainActor public static func refreshAttribution() async -> AppSprintSDK.AttributionResult?
|
|
53
|
+
}
|
|
46
54
|
public struct AppSprintConfig : Swift.Sendable {
|
|
47
55
|
public static let defaultAPIURL: Foundation.URL
|
|
48
56
|
public var apiKey: Swift.String
|
|
@@ -53,8 +61,9 @@ public struct AppSprintConfig : Swift.Sendable {
|
|
|
53
61
|
public var customerUserId: Swift.String?
|
|
54
62
|
public var autoTrackSessions: Swift.Bool
|
|
55
63
|
public var autoRefreshAttribution: Swift.Bool
|
|
64
|
+
public var eventTrackingEnabled: Swift.Bool
|
|
56
65
|
public var googleAdsConsent: AppSprintSDK.GoogleAdsConsent?
|
|
57
|
-
public init(apiKey: Swift.String, apiURL: Foundation.URL = AppSprintConfig.defaultAPIURL, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil, autoTrackSessions: Swift.Bool = true, autoRefreshAttribution: Swift.Bool = true, googleAdsConsent: AppSprintSDK.GoogleAdsConsent? = nil)
|
|
66
|
+
public init(apiKey: Swift.String, apiURL: Foundation.URL = AppSprintConfig.defaultAPIURL, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil, autoTrackSessions: Swift.Bool = true, autoRefreshAttribution: Swift.Bool = true, eventTrackingEnabled: Swift.Bool = true, googleAdsConsent: AppSprintSDK.GoogleAdsConsent? = nil)
|
|
58
67
|
}
|
|
59
68
|
public enum AppSprintNative {
|
|
60
69
|
@_Concurrency.MainActor public static func getDeviceInfo() -> AppSprintSDK.DeviceInfo
|
|
@@ -256,6 +265,7 @@ public struct AnySendable : @unchecked Swift.Sendable, Swift.Equatable {
|
|
|
256
265
|
public static func == (lhs: AppSprintSDK.AnySendable, rhs: AppSprintSDK.AnySendable) -> Swift.Bool
|
|
257
266
|
}
|
|
258
267
|
extension AppSprintSDK.AppSprint : Swift.Sendable {}
|
|
268
|
+
extension AppSprintSDK.AppSprintAppleAds : Swift.Sendable {}
|
|
259
269
|
extension AppSprintSDK.AppSprintAttStatus : Swift.Equatable {}
|
|
260
270
|
extension AppSprintSDK.AppSprintAttStatus : Swift.Hashable {}
|
|
261
271
|
extension AppSprintSDK.AppSprintAttStatus : Swift.RawRepresentable {}
|
|
@@ -43,6 +43,14 @@ import os
|
|
|
43
43
|
@_Concurrency.MainActor final public func destroy()
|
|
44
44
|
@objc deinit
|
|
45
45
|
}
|
|
46
|
+
@_Concurrency.MainActor public enum AppSprintAppleAds {
|
|
47
|
+
@_Concurrency.MainActor public static func configure(apiKey: Swift.String, apiURL: Foundation.URL? = nil, isDebug: Swift.Bool = false) async
|
|
48
|
+
@_Concurrency.MainActor public static func getAppSprintId() -> Swift.String?
|
|
49
|
+
@_Concurrency.MainActor public static func getAttributionParams() -> [Swift.String : Swift.String]
|
|
50
|
+
@_Concurrency.MainActor public static func getAttribution() -> AppSprintSDK.AttributionResult?
|
|
51
|
+
@discardableResult
|
|
52
|
+
@_Concurrency.MainActor public static func refreshAttribution() async -> AppSprintSDK.AttributionResult?
|
|
53
|
+
}
|
|
46
54
|
public struct AppSprintConfig : Swift.Sendable {
|
|
47
55
|
public static let defaultAPIURL: Foundation.URL
|
|
48
56
|
public var apiKey: Swift.String
|
|
@@ -53,8 +61,9 @@ public struct AppSprintConfig : Swift.Sendable {
|
|
|
53
61
|
public var customerUserId: Swift.String?
|
|
54
62
|
public var autoTrackSessions: Swift.Bool
|
|
55
63
|
public var autoRefreshAttribution: Swift.Bool
|
|
64
|
+
public var eventTrackingEnabled: Swift.Bool
|
|
56
65
|
public var googleAdsConsent: AppSprintSDK.GoogleAdsConsent?
|
|
57
|
-
public init(apiKey: Swift.String, apiURL: Foundation.URL = AppSprintConfig.defaultAPIURL, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil, autoTrackSessions: Swift.Bool = true, autoRefreshAttribution: Swift.Bool = true, googleAdsConsent: AppSprintSDK.GoogleAdsConsent? = nil)
|
|
66
|
+
public init(apiKey: Swift.String, apiURL: Foundation.URL = AppSprintConfig.defaultAPIURL, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil, autoTrackSessions: Swift.Bool = true, autoRefreshAttribution: Swift.Bool = true, eventTrackingEnabled: Swift.Bool = true, googleAdsConsent: AppSprintSDK.GoogleAdsConsent? = nil)
|
|
58
67
|
}
|
|
59
68
|
public enum AppSprintNative {
|
|
60
69
|
@_Concurrency.MainActor public static func getDeviceInfo() -> AppSprintSDK.DeviceInfo
|
|
@@ -256,6 +265,7 @@ public struct AnySendable : @unchecked Swift.Sendable, Swift.Equatable {
|
|
|
256
265
|
public static func == (lhs: AppSprintSDK.AnySendable, rhs: AppSprintSDK.AnySendable) -> Swift.Bool
|
|
257
266
|
}
|
|
258
267
|
extension AppSprintSDK.AppSprint : Swift.Sendable {}
|
|
268
|
+
extension AppSprintSDK.AppSprintAppleAds : Swift.Sendable {}
|
|
259
269
|
extension AppSprintSDK.AppSprintAttStatus : Swift.Equatable {}
|
|
260
270
|
extension AppSprintSDK.AppSprintAttStatus : Swift.Hashable {}
|
|
261
271
|
extension AppSprintSDK.AppSprintAttStatus : Swift.RawRepresentable {}
|
|
@@ -43,6 +43,14 @@ import os
|
|
|
43
43
|
@_Concurrency.MainActor final public func destroy()
|
|
44
44
|
@objc deinit
|
|
45
45
|
}
|
|
46
|
+
@_Concurrency.MainActor public enum AppSprintAppleAds {
|
|
47
|
+
@_Concurrency.MainActor public static func configure(apiKey: Swift.String, apiURL: Foundation.URL? = nil, isDebug: Swift.Bool = false) async
|
|
48
|
+
@_Concurrency.MainActor public static func getAppSprintId() -> Swift.String?
|
|
49
|
+
@_Concurrency.MainActor public static func getAttributionParams() -> [Swift.String : Swift.String]
|
|
50
|
+
@_Concurrency.MainActor public static func getAttribution() -> AppSprintSDK.AttributionResult?
|
|
51
|
+
@discardableResult
|
|
52
|
+
@_Concurrency.MainActor public static func refreshAttribution() async -> AppSprintSDK.AttributionResult?
|
|
53
|
+
}
|
|
46
54
|
public struct AppSprintConfig : Swift.Sendable {
|
|
47
55
|
public static let defaultAPIURL: Foundation.URL
|
|
48
56
|
public var apiKey: Swift.String
|
|
@@ -53,8 +61,9 @@ public struct AppSprintConfig : Swift.Sendable {
|
|
|
53
61
|
public var customerUserId: Swift.String?
|
|
54
62
|
public var autoTrackSessions: Swift.Bool
|
|
55
63
|
public var autoRefreshAttribution: Swift.Bool
|
|
64
|
+
public var eventTrackingEnabled: Swift.Bool
|
|
56
65
|
public var googleAdsConsent: AppSprintSDK.GoogleAdsConsent?
|
|
57
|
-
public init(apiKey: Swift.String, apiURL: Foundation.URL = AppSprintConfig.defaultAPIURL, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil, autoTrackSessions: Swift.Bool = true, autoRefreshAttribution: Swift.Bool = true, googleAdsConsent: AppSprintSDK.GoogleAdsConsent? = nil)
|
|
66
|
+
public init(apiKey: Swift.String, apiURL: Foundation.URL = AppSprintConfig.defaultAPIURL, enableAppleAdsAttribution: Swift.Bool = true, isDebug: Swift.Bool = false, logLevel: AppSprintSDK.AppSprintLogLevel = .warn, customerUserId: Swift.String? = nil, autoTrackSessions: Swift.Bool = true, autoRefreshAttribution: Swift.Bool = true, eventTrackingEnabled: Swift.Bool = true, googleAdsConsent: AppSprintSDK.GoogleAdsConsent? = nil)
|
|
58
67
|
}
|
|
59
68
|
public enum AppSprintNative {
|
|
60
69
|
@_Concurrency.MainActor public static func getDeviceInfo() -> AppSprintSDK.DeviceInfo
|
|
@@ -256,6 +265,7 @@ public struct AnySendable : @unchecked Swift.Sendable, Swift.Equatable {
|
|
|
256
265
|
public static func == (lhs: AppSprintSDK.AnySendable, rhs: AppSprintSDK.AnySendable) -> Swift.Bool
|
|
257
266
|
}
|
|
258
267
|
extension AppSprintSDK.AppSprint : Swift.Sendable {}
|
|
268
|
+
extension AppSprintSDK.AppSprintAppleAds : Swift.Sendable {}
|
|
259
269
|
extension AppSprintSDK.AppSprintAttStatus : Swift.Equatable {}
|
|
260
270
|
extension AppSprintSDK.AppSprintAttStatus : Swift.Hashable {}
|
|
261
271
|
extension AppSprintSDK.AppSprintAttStatus : Swift.RawRepresentable {}
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
22
22
|
<true/>
|
|
23
23
|
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
24
|
-
<
|
|
24
|
+
<false/>
|
|
25
25
|
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
26
26
|
<array>
|
|
27
27
|
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
28
|
-
<string>
|
|
28
|
+
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
|
|
29
29
|
</array>
|
|
30
30
|
</dict>
|
|
31
31
|
<dict>
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
35
35
|
<true/>
|
|
36
36
|
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
37
|
-
<
|
|
37
|
+
<false/>
|
|
38
38
|
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
39
39
|
<array>
|
|
40
40
|
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
41
|
-
<string>
|
|
41
|
+
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
|
|
42
42
|
</array>
|
|
43
43
|
</dict>
|
|
44
44
|
<dict>
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
48
48
|
<true/>
|
|
49
49
|
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
50
|
-
<
|
|
50
|
+
<false/>
|
|
51
51
|
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
52
52
|
<array>
|
|
53
53
|
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
54
|
-
<string>
|
|
54
|
+
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
|
|
55
55
|
</array>
|
|
56
56
|
</dict>
|
|
57
57
|
<dict>
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
61
61
|
<true/>
|
|
62
62
|
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
63
|
-
<
|
|
63
|
+
<false/>
|
|
64
64
|
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
65
65
|
<array>
|
|
66
66
|
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
67
|
-
<string>
|
|
67
|
+
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
|
|
68
68
|
</array>
|
|
69
69
|
</dict>
|
|
70
70
|
<dict>
|
|
@@ -73,19 +73,15 @@
|
|
|
73
73
|
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
74
74
|
<true/>
|
|
75
75
|
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
76
|
-
<
|
|
76
|
+
<false/>
|
|
77
77
|
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
78
78
|
<array>
|
|
79
79
|
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
80
|
-
<string>
|
|
80
|
+
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
|
|
81
81
|
</array>
|
|
82
82
|
</dict>
|
|
83
83
|
</array>
|
|
84
84
|
<key>NSPrivacyTracking</key>
|
|
85
|
-
<
|
|
86
|
-
<key>NSPrivacyTrackingDomains</key>
|
|
87
|
-
<array>
|
|
88
|
-
<string>api.appsprint.app</string>
|
|
89
|
-
</array>
|
|
85
|
+
<false/>
|
|
90
86
|
</dict>
|
|
91
87
|
</plist>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AppSprintAppleAds = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _AppSprint = require("./AppSprint");
|
|
9
|
+
function assertIos() {
|
|
10
|
+
if (_reactNative.Platform.OS !== "ios") {
|
|
11
|
+
throw new Error("AppSprintAppleAds is only supported on iOS.");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
class AppSprintAppleAdsSDK {
|
|
15
|
+
async configure(config) {
|
|
16
|
+
assertIos();
|
|
17
|
+
return _AppSprint.AppSprint.configure({
|
|
18
|
+
apiKey: config.apiKey,
|
|
19
|
+
apiUrl: config.apiUrl,
|
|
20
|
+
enableAppleAdsAttribution: true,
|
|
21
|
+
isDebug: config.isDebug ?? false,
|
|
22
|
+
customerUserId: null,
|
|
23
|
+
autoTrackSessions: false,
|
|
24
|
+
autoRefreshAttribution: false,
|
|
25
|
+
eventTrackingEnabled: false
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
async getAppSprintId() {
|
|
29
|
+
assertIos();
|
|
30
|
+
return _AppSprint.AppSprint.getAppSprintId();
|
|
31
|
+
}
|
|
32
|
+
async getAttributionParams() {
|
|
33
|
+
assertIos();
|
|
34
|
+
return _AppSprint.AppSprint.getAttributionParams();
|
|
35
|
+
}
|
|
36
|
+
async getAttribution() {
|
|
37
|
+
assertIos();
|
|
38
|
+
return _AppSprint.AppSprint.getAttribution();
|
|
39
|
+
}
|
|
40
|
+
async refreshAttribution() {
|
|
41
|
+
assertIos();
|
|
42
|
+
return _AppSprint.AppSprint.refreshAttribution();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const AppSprintAppleAds = exports.AppSprintAppleAds = new AppSprintAppleAdsSDK();
|
|
46
|
+
//# sourceMappingURL=AppSprintAppleAds.js.map
|
package/lib/commonjs/index.js
CHANGED
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "AppSprint", {
|
|
|
9
9
|
return _AppSprint.AppSprint;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "AppSprintAppleAds", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _AppSprintAppleAds.AppSprintAppleAds;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "NativeAppSprint", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function () {
|
|
@@ -16,5 +22,6 @@ Object.defineProperty(exports, "NativeAppSprint", {
|
|
|
16
22
|
}
|
|
17
23
|
});
|
|
18
24
|
var _AppSprint = require("./AppSprint");
|
|
25
|
+
var _AppSprintAppleAds = require("./AppSprintAppleAds");
|
|
19
26
|
var _NativeAppSprint = require("./NativeAppSprint");
|
|
20
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from "react-native";
|
|
4
|
+
import { AppSprint } from "./AppSprint";
|
|
5
|
+
function assertIos() {
|
|
6
|
+
if (Platform.OS !== "ios") {
|
|
7
|
+
throw new Error("AppSprintAppleAds is only supported on iOS.");
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
class AppSprintAppleAdsSDK {
|
|
11
|
+
async configure(config) {
|
|
12
|
+
assertIos();
|
|
13
|
+
return AppSprint.configure({
|
|
14
|
+
apiKey: config.apiKey,
|
|
15
|
+
apiUrl: config.apiUrl,
|
|
16
|
+
enableAppleAdsAttribution: true,
|
|
17
|
+
isDebug: config.isDebug ?? false,
|
|
18
|
+
customerUserId: null,
|
|
19
|
+
autoTrackSessions: false,
|
|
20
|
+
autoRefreshAttribution: false,
|
|
21
|
+
eventTrackingEnabled: false
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
async getAppSprintId() {
|
|
25
|
+
assertIos();
|
|
26
|
+
return AppSprint.getAppSprintId();
|
|
27
|
+
}
|
|
28
|
+
async getAttributionParams() {
|
|
29
|
+
assertIos();
|
|
30
|
+
return AppSprint.getAttributionParams();
|
|
31
|
+
}
|
|
32
|
+
async getAttribution() {
|
|
33
|
+
assertIos();
|
|
34
|
+
return AppSprint.getAttribution();
|
|
35
|
+
}
|
|
36
|
+
async refreshAttribution() {
|
|
37
|
+
assertIos();
|
|
38
|
+
return AppSprint.refreshAttribution();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export const AppSprintAppleAds = new AppSprintAppleAdsSDK();
|
|
42
|
+
//# sourceMappingURL=AppSprintAppleAds.js.map
|
package/lib/module/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AttributionParams, AttributionResult } from "./types";
|
|
2
|
+
export interface AppSprintAppleAdsConfig {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
apiUrl?: string;
|
|
5
|
+
isDebug?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare class AppSprintAppleAdsSDK {
|
|
8
|
+
configure(config: AppSprintAppleAdsConfig): Promise<boolean>;
|
|
9
|
+
getAppSprintId(): Promise<string | null>;
|
|
10
|
+
getAttributionParams(): Promise<AttributionParams>;
|
|
11
|
+
getAttribution(): Promise<AttributionResult | null>;
|
|
12
|
+
refreshAttribution(): Promise<AttributionResult | null>;
|
|
13
|
+
}
|
|
14
|
+
export declare const AppSprintAppleAds: AppSprintAppleAdsSDK;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=AppSprintAppleAds.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { AppSprint } from "./AppSprint";
|
|
2
|
+
export { AppSprintAppleAds } from "./AppSprintAppleAds";
|
|
2
3
|
export { NativeAppSprint } from "./NativeAppSprint";
|
|
4
|
+
export type { AppSprintAppleAdsConfig, } from "./AppSprintAppleAds";
|
|
3
5
|
export type { AppSprintConfig, AppSprintOptions, EventType, EventParams, AttributionResult, InstallResponse, DeviceInfo, LogLevel, TestEventResult, NativeAppSprintModule, } from "./types";
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -8,6 +8,7 @@ export interface AppSprintConfig {
|
|
|
8
8
|
customerUserId?: string | null;
|
|
9
9
|
autoTrackSessions?: boolean;
|
|
10
10
|
autoRefreshAttribution?: boolean;
|
|
11
|
+
eventTrackingEnabled?: boolean;
|
|
11
12
|
googleAdsConsent?: GoogleAdsConsent | null;
|
|
12
13
|
}
|
|
13
14
|
export type AppSprintOptions = Omit<AppSprintConfig, "apiKey">;
|
package/package.json
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Platform } from "react-native";
|
|
2
|
+
|
|
3
|
+
import { AppSprint } from "./AppSprint";
|
|
4
|
+
import type { AttributionParams, AttributionResult } from "./types";
|
|
5
|
+
|
|
6
|
+
export interface AppSprintAppleAdsConfig {
|
|
7
|
+
apiKey: string;
|
|
8
|
+
apiUrl?: string;
|
|
9
|
+
isDebug?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function assertIos() {
|
|
13
|
+
if (Platform.OS !== "ios") {
|
|
14
|
+
throw new Error("AppSprintAppleAds is only supported on iOS.");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class AppSprintAppleAdsSDK {
|
|
19
|
+
async configure(config: AppSprintAppleAdsConfig): Promise<boolean> {
|
|
20
|
+
assertIos();
|
|
21
|
+
return AppSprint.configure({
|
|
22
|
+
apiKey: config.apiKey,
|
|
23
|
+
apiUrl: config.apiUrl,
|
|
24
|
+
enableAppleAdsAttribution: true,
|
|
25
|
+
isDebug: config.isDebug ?? false,
|
|
26
|
+
customerUserId: null,
|
|
27
|
+
autoTrackSessions: false,
|
|
28
|
+
autoRefreshAttribution: false,
|
|
29
|
+
eventTrackingEnabled: false,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async getAppSprintId(): Promise<string | null> {
|
|
34
|
+
assertIos();
|
|
35
|
+
return AppSprint.getAppSprintId();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async getAttributionParams(): Promise<AttributionParams> {
|
|
39
|
+
assertIos();
|
|
40
|
+
return AppSprint.getAttributionParams();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async getAttribution(): Promise<AttributionResult | null> {
|
|
44
|
+
assertIos();
|
|
45
|
+
return AppSprint.getAttribution();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async refreshAttribution(): Promise<AttributionResult | null> {
|
|
49
|
+
assertIos();
|
|
50
|
+
return AppSprint.refreshAttribution();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const AppSprintAppleAds = new AppSprintAppleAdsSDK();
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { AppSprint } from "./AppSprint";
|
|
2
|
+
export { AppSprintAppleAds } from "./AppSprintAppleAds";
|
|
2
3
|
export { NativeAppSprint } from "./NativeAppSprint";
|
|
4
|
+
export type {
|
|
5
|
+
AppSprintAppleAdsConfig,
|
|
6
|
+
} from "./AppSprintAppleAds";
|
|
3
7
|
export type {
|
|
4
8
|
AppSprintConfig,
|
|
5
9
|
AppSprintOptions,
|