appsprint-react-native 1.1.9 → 1.1.11

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.
Files changed (34) hide show
  1. package/README.md +2 -0
  2. package/android/libs/appsprint-sdk.aar +0 -0
  3. package/ios/AppSprintBridge.swift +3 -0
  4. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/AppSprintSDK +0 -0
  5. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Info.plist +0 -0
  6. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.abi.json +532 -193
  7. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.package.swiftinterface +14 -40
  8. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +14 -40
  9. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  10. package/ios/AppSprintSDK.xcframework/ios-arm64/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios.swiftinterface +14 -40
  11. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/AppSprintSDK +0 -0
  12. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Info.plist +0 -0
  13. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +532 -193
  14. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +14 -40
  15. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +14 -40
  16. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  17. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +14 -40
  18. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +532 -193
  19. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +14 -40
  20. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +14 -40
  21. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  22. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/Modules/AppSprintSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +14 -40
  23. package/ios/AppSprintSDK.xcframework/ios-arm64_x86_64-simulator/AppSprintSDK.framework/_CodeSignature/CodeResources +1 -1
  24. package/lib/commonjs/AppSprintAppleAds.js +46 -0
  25. package/lib/commonjs/index.js +7 -0
  26. package/lib/module/AppSprintAppleAds.js +42 -0
  27. package/lib/module/index.js +1 -0
  28. package/lib/typescript/AppSprintAppleAds.d.ts +16 -0
  29. package/lib/typescript/index.d.ts +2 -0
  30. package/lib/typescript/types.d.ts +1 -0
  31. package/package.json +1 -1
  32. package/src/AppSprintAppleAds.ts +54 -0
  33. package/src/index.ts +4 -0
  34. package/src/types.ts +2 -1
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appsprint-react-native",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "AppSprint mobile attribution SDK for React Native",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -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,
package/src/types.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  export interface AppSprintConfig {
2
2
  apiKey: string;
3
3
  apiUrl?: string; // defaults to https://api.appsprint.app
4
- endpointBaseUrl?: string; // Appstack-compatible alias for apiUrl
4
+ endpointBaseUrl?: string; // alias for apiUrl
5
5
  enableAppleAdsAttribution?: boolean;
6
6
  isDebug?: boolean;
7
7
  logLevel?: 0 | 1 | 2 | 3; // 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR
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