airbridge-react-native-sdk-restricted 2.8.8 → 2.9.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.
Files changed (143) hide show
  1. package/airbridge-react-native-sdk-restricted.podspec +1 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/co/ab180/airbridge/reactnative/AirbridgeInAppPurchase.java +32 -0
  4. package/android/src/main/java/co/ab180/airbridge/reactnative/AirbridgeRN.java +2 -1
  5. package/changelog.md +10 -0
  6. package/index.d.ts +40 -0
  7. package/ios/AirbridgeRN/ARNConfigReader.m +18 -15
  8. package/ios/AirbridgeRN/AirbridgeInAppPurchase.h +16 -0
  9. package/ios/AirbridgeRN/AirbridgeInAppPurchase.m +30 -0
  10. package/ios/AirbridgeRN/AirbridgeRN.m +3 -0
  11. package/ios/AirbridgeRN.xcodeproj/project.pbxproj +16 -0
  12. package/ios/copy-config.rb +1 -1
  13. package/package.json +1 -1
  14. package/src/Airbridge.js +25 -0
  15. package/src/InAppPurchase.js +38 -0
  16. package/src/WebInterface.js +1 -1
  17. package/.github/actions/add-github-check/action.yml +0 -78
  18. package/.github/actions/add-github-comment/action.yml +0 -48
  19. package/.github/actions/add-slack-message/action.yml +0 -32
  20. package/.github/actions/edit-github-check/action.yml +0 -59
  21. package/.github/actions/edit-github-comment/action.yml +0 -41
  22. package/.github/pull_request_template.md +0 -5
  23. package/.github/readme.md +0 -53
  24. package/.github/workflows/build.yml +0 -367
  25. package/.github/workflows/gitflow.yml +0 -20
  26. package/.github/workflows/release-restricted.yml +0 -35
  27. package/.github/workflows/release.yml +0 -32
  28. package/qa/.bundle/config +0 -2
  29. package/qa/.eslintrc.js +0 -4
  30. package/qa/.prettierrc.js +0 -7
  31. package/qa/.watchmanconfig +0 -1
  32. package/qa/Gemfile +0 -9
  33. package/qa/Gemfile.lock +0 -105
  34. package/qa/__tests__/App.test.tsx +0 -17
  35. package/qa/airbridge.json +0 -7
  36. package/qa/android/app/build.gradle +0 -130
  37. package/qa/android/app/debug.keystore +0 -0
  38. package/qa/android/app/google-services.json +0 -29
  39. package/qa/android/app/proguard-rules.pro +0 -10
  40. package/qa/android/app/src/debug/AndroidManifest.xml +0 -9
  41. package/qa/android/app/src/main/AndroidManifest.xml +0 -65
  42. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/ConfigurationLoader.kt +0 -49
  43. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/MainActivity.kt +0 -35
  44. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/MainApplication.kt +0 -46
  45. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/DeviceInfoInteractor.kt +0 -60
  46. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/DeviceInfoUtils.kt +0 -115
  47. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/IdentifiersInteractor.kt +0 -83
  48. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/InstallReferrerInteractor.kt +0 -91
  49. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/ModuleInjector.kt +0 -22
  50. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/PermissionInteractor.kt +0 -55
  51. package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/UserInfoInteractor.kt +0 -74
  52. package/qa/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
  53. package/qa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  54. package/qa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  55. package/qa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  56. package/qa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  57. package/qa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  58. package/qa/android/app/src/main/res/values/strings.xml +0 -3
  59. package/qa/android/app/src/main/res/values/styles.xml +0 -9
  60. package/qa/android/build.gradle +0 -28
  61. package/qa/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  62. package/qa/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  63. package/qa/android/gradle.properties +0 -41
  64. package/qa/android/gradlew +0 -249
  65. package/qa/android/gradlew.bat +0 -92
  66. package/qa/android/settings.gradle +0 -4
  67. package/qa/app.json +0 -4
  68. package/qa/babel.config.js +0 -3
  69. package/qa/index.js +0 -5
  70. package/qa/ios/.xcode.env +0 -11
  71. package/qa/ios/AirbridgeQA/AirbridgeQA.entitlements +0 -17
  72. package/qa/ios/AirbridgeQA/AppDelegate.h +0 -6
  73. package/qa/ios/AirbridgeQA/AppDelegate.mm +0 -123
  74. package/qa/ios/AirbridgeQA/DeviceInfoInteractor.m +0 -14
  75. package/qa/ios/AirbridgeQA/DeviceInfoInteractor.swift +0 -151
  76. package/qa/ios/AirbridgeQA/IdentifiersInteractor.m +0 -14
  77. package/qa/ios/AirbridgeQA/IdentifiersInteractor.swift +0 -40
  78. package/qa/ios/AirbridgeQA/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  79. package/qa/ios/AirbridgeQA/Images.xcassets/Contents.json +0 -6
  80. package/qa/ios/AirbridgeQA/Info.plist +0 -66
  81. package/qa/ios/AirbridgeQA/LaunchScreen.storyboard +0 -47
  82. package/qa/ios/AirbridgeQA/PermissionInteractor.m +0 -14
  83. package/qa/ios/AirbridgeQA/PermissionInteractor.swift +0 -19
  84. package/qa/ios/AirbridgeQA/PrivacyInfo.xcprivacy +0 -39
  85. package/qa/ios/AirbridgeQA/UserInfoInteractor.m +0 -57
  86. package/qa/ios/AirbridgeQA/UserInfoInteractor.swift +0 -49
  87. package/qa/ios/AirbridgeQA/main.m +0 -10
  88. package/qa/ios/AirbridgeQA.xcodeproj/project.pbxproj +0 -771
  89. package/qa/ios/AirbridgeQA.xcodeproj/xcshareddata/xcschemes/AirbridgeQA.xcscheme +0 -88
  90. package/qa/ios/AirbridgeQA.xcworkspace/contents.xcworkspacedata +0 -10
  91. package/qa/ios/AirbridgeQA.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  92. package/qa/ios/AirbridgeQATests/AirbridgeQATests.m +0 -66
  93. package/qa/ios/AirbridgeQATests/Info.plist +0 -24
  94. package/qa/ios/GoogleService-Info.plist +0 -30
  95. package/qa/ios/Library/airbridge-ios-sdk-qa-library.podspec +0 -26
  96. package/qa/ios/Podfile +0 -44
  97. package/qa/ios/Podfile.lock +0 -1634
  98. package/qa/jest.config.js +0 -3
  99. package/qa/metro.config.js +0 -67
  100. package/qa/package-lock.json +0 -14289
  101. package/qa/package.json +0 -47
  102. package/qa/resource/arrow_back.png +0 -0
  103. package/qa/resource/home.png +0 -0
  104. package/qa/resource/info.png +0 -0
  105. package/qa/resource/link.png +0 -0
  106. package/qa/resource/refresh.png +0 -0
  107. package/qa/resource/token.png +0 -0
  108. package/qa/source/App.js +0 -58
  109. package/qa/source/common/Colors.js +0 -20
  110. package/qa/source/common/FCMService.js +0 -94
  111. package/qa/source/common/Native.ts +0 -39
  112. package/qa/source/common/Storage.js +0 -13
  113. package/qa/source/common/Styles.js +0 -39
  114. package/qa/source/component/AttributeEntryInputDialog.js +0 -117
  115. package/qa/source/component/AttributeTypeInputDialog.js +0 -100
  116. package/qa/source/component/ConfirmDialog.js +0 -72
  117. package/qa/source/component/CustomButton.js +0 -50
  118. package/qa/source/component/CustomEventParamsDialog.js +0 -150
  119. package/qa/source/component/CustomTextInput.js +0 -40
  120. package/qa/source/component/EntryInputDialog.js +0 -89
  121. package/qa/source/component/HorizontalPreference.js +0 -46
  122. package/qa/source/component/ImageButton.js +0 -35
  123. package/qa/source/component/InjectInputDialog.js +0 -80
  124. package/qa/source/component/MessageDialog.js +0 -81
  125. package/qa/source/component/UrlInputDialog.js +0 -80
  126. package/qa/source/component/ValueInputDialog.js +0 -80
  127. package/qa/source/component/VerticalPreference.js +0 -42
  128. package/qa/source/navigations/Stack.js +0 -110
  129. package/qa/source/pages/Browse.js +0 -118
  130. package/qa/source/pages/DeviceInfo.js +0 -135
  131. package/qa/source/pages/Event.js +0 -171
  132. package/qa/source/pages/Home.js +0 -136
  133. package/qa/source/pages/Identifiers.js +0 -108
  134. package/qa/source/pages/InstallReferrer.js +0 -64
  135. package/qa/source/pages/Placement.js +0 -38
  136. package/qa/source/pages/RequestPermissions.tsx +0 -41
  137. package/qa/source/pages/UserInfo.js +0 -168
  138. package/qa/source/pages/appInfo.js +0 -22
  139. package/qa/tsconfig.json +0 -3
  140. package/scripts/addiOSFramework.js +0 -48
  141. package/scripts/build-qa.sh +0 -64
  142. package/scripts/change_restricted.sh +0 -21
  143. package/scripts/update_native_version.sh +0 -104
@@ -26,7 +26,7 @@ Pod::Spec.new do |s|
26
26
  s.public_header_files = 'ios/AirbridgeRN/AirbridgeRN.h'
27
27
 
28
28
  s.dependency 'React'
29
- s.dependency 'AirBridgeRestricted', '1.37.3'
29
+ s.dependency 'AirBridgeRestricted', '1.40.1'
30
30
 
31
31
  s.pod_target_xcconfig = {
32
32
  'DEFINES_MODULE' => 'YES'
@@ -25,7 +25,7 @@ rootProject.allprojects {
25
25
 
26
26
  dependencies {
27
27
  implementation 'com.facebook.react:react-native:+'
28
- api 'io.airbridge:sdk-android-restricted:2.25.0'
28
+ api 'io.airbridge:sdk-android-restricted:2.27.0'
29
29
  implementation 'com.android.installreferrer:installreferrer:2.1'
30
30
  }
31
31
 
@@ -0,0 +1,32 @@
1
+ package co.ab180.airbridge.reactnative;
2
+
3
+ import androidx.annotation.NonNull;
4
+
5
+ import com.facebook.react.bridge.ReactApplicationContext;
6
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
7
+ import com.facebook.react.bridge.ReactMethod;
8
+
9
+ import co.ab180.airbridge.Airbridge;
10
+
11
+ public class AirbridgeInAppPurchase extends ReactContextBaseJavaModule {
12
+
13
+ public AirbridgeInAppPurchase(ReactApplicationContext reactContext) {
14
+ super(reactContext);
15
+ }
16
+
17
+ @ReactMethod
18
+ public void startInAppPurchaseTracking() {
19
+ Airbridge.startInAppPurchaseTracking();
20
+ }
21
+
22
+ @ReactMethod
23
+ public void stopInAppPurchaseTracking() {
24
+ Airbridge.stopInAppPurchaseTracking();
25
+ }
26
+
27
+ @NonNull
28
+ @Override
29
+ public String getName() {
30
+ return "AirbridgeInAppPurchase";
31
+ }
32
+ }
@@ -95,7 +95,8 @@ public class AirbridgeRN implements ReactPackage {
95
95
  new AirbridgeState(reactContext),
96
96
  new AirbridgePlacement(reactContext),
97
97
  new AirbridgeAttribution(reactContext),
98
- new AirbridgeLifecycle(reactContext)
98
+ new AirbridgeLifecycle(reactContext),
99
+ new AirbridgeInAppPurchase(reactContext)
99
100
  );
100
101
  }
101
102
 
package/changelog.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 2.9.0
2
+
3
+ **ADDED**
4
+ * Add interface for IAP event tracking.
5
+
6
+ ## 2.8.9
7
+
8
+ **FIXED**
9
+ * Solve issue that setAttributionListener is not working if airbridge.json is not exist.
10
+
1
11
  ## 2.8.8
2
12
 
3
13
  **FIXED**
package/index.d.ts CHANGED
@@ -8,6 +8,7 @@ declare module "airbridge-react-native-sdk-restricted" {
8
8
  deeplink: Deeplink;
9
9
  state: State;
10
10
  placement: Placement;
11
+ inAppPurchase: InAppPurchase;
11
12
 
12
13
  /**
13
14
  * Set device alias
@@ -50,6 +51,24 @@ declare module "airbridge-react-native-sdk-restricted" {
50
51
  webToken: string,
51
52
  postCommandFunction: (command: string) => string,
52
53
  ): WebInterface;
54
+
55
+ /**
56
+ * make airbridge start in-app purchase tracking
57
+ * This function is experimental and may change in future versions.
58
+ * Use it with caution.
59
+ *
60
+ * @experimental
61
+ */
62
+ startInAppPurchaseTracking(): void;
63
+
64
+ /**
65
+ * make airbridge stop in-app purchase tracking
66
+ * This function is experimental and may change in future versions.
67
+ * Use it with caution.
68
+ *
69
+ * @experimental
70
+ */
71
+ stopInAppPurchaseTracking(): void;
53
72
  }
54
73
 
55
74
  /**
@@ -189,6 +208,27 @@ declare module "airbridge-react-native-sdk-restricted" {
189
208
  handle(command: string): void;
190
209
  }
191
210
 
211
+ class InAppPurchase {
212
+
213
+ /**
214
+ * make airbridge start in-app purchase tracking
215
+ * This function is experimental and may change in future versions.
216
+ * Use it with caution.
217
+ *
218
+ * @experimental
219
+ */
220
+ startInAppPurchaseTracking(): void;
221
+
222
+ /**
223
+ * make airbridge stop in-app purchase tracking
224
+ * This function is experimental and may change in future versions.
225
+ * Use it with caution.
226
+ *
227
+ * @experimental
228
+ */
229
+ stopInAppPurchaseTracking(): void;
230
+ }
231
+
192
232
  /**
193
233
  * @property {string} [action] event group name 1
194
234
  * @property {string} [label] event group name 2
@@ -8,7 +8,6 @@
8
8
 
9
9
  #import "ARNConfigReader.h"
10
10
 
11
- #import "AirbridgeAttribution.h"
12
11
  #import "ARNGet.h"
13
12
 
14
13
  #import <AirBridge/AirBridge.h>
@@ -58,20 +57,24 @@
58
57
  }
59
58
 
60
59
  NSString* logLevel = [ARNGet type:NSString.class dictionary:dictionary key:@"logLevel"] ?: @"";
61
- [AirBridge setLogLevel:(
62
- [@{
63
- @"debug": @(AB_LOG_DEBUG),
64
- @"info": @(AB_LOG_INFO),
65
- @"warning": @(AB_LOG_WARNING),
66
- @"error": @(AB_LOG_CRITICAL),
67
- @"fault": @(AB_LOG_CRASH)
68
- } objectForKey: [logLevel lowercaseString]
69
- ] ?: @(AB_LOG_WARNING)
70
- )];
71
-
72
- [AirBridge.state setSDKDevelopmentPlatform:@"react_native"];
73
-
74
- [AirbridgeAttribution setInitialAttributionCallback];
60
+ if ([logLevel isEqualToString:@"debug"]) {
61
+ [AirBridge setLogLevel:AB_LOG_DEBUG];
62
+ }
63
+ else if ([logLevel isEqualToString:@"info"]) {
64
+ [AirBridge setLogLevel:AB_LOG_INFO];
65
+ }
66
+ else if ([logLevel isEqualToString:@"warning"]) {
67
+ [AirBridge setLogLevel:AB_LOG_WARNING];
68
+ }
69
+ else if ([logLevel isEqualToString:@"error"]) {
70
+ [AirBridge setLogLevel:AB_LOG_CRITICAL];
71
+ }
72
+ else if ([logLevel isEqualToString:@"fault"]) {
73
+ [AirBridge setLogLevel:AB_LOG_CRASH];
74
+ }
75
+ else {
76
+ [AirBridge setLogLevel:AB_LOG_WARNING];
77
+ }
75
78
  }
76
79
 
77
80
  @end
@@ -0,0 +1,16 @@
1
+ //
2
+ // AirbridgeInAppPurchase.h
3
+ // Pods
4
+ //
5
+ // Created by ab180 on 3/6/25.
6
+ //
7
+
8
+ #import <React/RCTBridgeModule.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ @interface AirbridgeInAppPurchase : NSObject <RCTBridgeModule>
13
+
14
+ @end
15
+
16
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,30 @@
1
+ //
2
+ // AirbridgeInAppPurchase.m
3
+ // airbridge-react-native-sdk
4
+ //
5
+ // Created by ab180 on 3/6/25.
6
+ //
7
+
8
+ #import "AirbridgeInAppPurchase.h"
9
+
10
+ #import <Foundation/Foundation.h>
11
+
12
+ #import <AirBridge/AirBridge.h>
13
+
14
+ @implementation AirbridgeInAppPurchase
15
+
16
+ //
17
+ // react native method
18
+ //
19
+
20
+ RCT_EXPORT_MODULE();
21
+
22
+ RCT_EXPORT_METHOD(startInAppPurchaseTracking) {
23
+ [AirBridge startInAppPurchaseTracking];
24
+ }
25
+
26
+ RCT_EXPORT_METHOD(stopInAppPurchaseTracking) {
27
+ [AirBridge stopInAppPurchaseTracking];
28
+ }
29
+
30
+ @end
@@ -8,6 +8,7 @@
8
8
 
9
9
  #import "AirbridgeRN.h"
10
10
 
11
+ #import "AirbridgeAttribution.h"
11
12
  #import "AirbridgeDeeplink.h"
12
13
 
13
14
  // Airbridge
@@ -50,6 +51,8 @@ static AirbridgeRN* instance;
50
51
  withLaunchOptions:(nullable NSDictionary*)launchOptions
51
52
  {
52
53
  [ARNConfigReader apply:airbridgeJSON];
54
+ [AirBridge.state setSDKDevelopmentPlatform:@"react_native"];
55
+ [AirbridgeAttribution setInitialAttributionCallback];
53
56
 
54
57
  [AirBridge getInstance:appToken appName:appName withLaunchOptions:launchOptions];
55
58
  [AirbridgeDeeplink setInitialDeeplinkCallback];
@@ -7,6 +7,10 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
+ 633D2E2C2D79B84B00130326 /* AirbridgeInAppPurchase.h in Headers */ = {isa = PBXBuildFile; fileRef = 633D2E2A2D79B84B00130326 /* AirbridgeInAppPurchase.h */; };
11
+ 633D2E2D2D79B84B00130326 /* AirbridgeInAppPurchase.m in Sources */ = {isa = PBXBuildFile; fileRef = 633D2E2B2D79B84B00130326 /* AirbridgeInAppPurchase.m */; };
12
+ 633D2E302D79B85700130326 /* AirbridgeAttribution.h in Headers */ = {isa = PBXBuildFile; fileRef = 633D2E2E2D79B85700130326 /* AirbridgeAttribution.h */; };
13
+ 633D2E312D79B85700130326 /* AirbridgeAttribution.m in Sources */ = {isa = PBXBuildFile; fileRef = 633D2E2F2D79B85700130326 /* AirbridgeAttribution.m */; };
10
14
  9F2C4C132B9EC9EE0064A9B7 /* ARNHex.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F2C4C112B9EC9EE0064A9B7 /* ARNHex.m */; };
11
15
  9F2C4C142B9EC9EE0064A9B7 /* ARNHex.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F2C4C122B9EC9EE0064A9B7 /* ARNHex.h */; };
12
16
  C300721F24A0B6C3003F8073 /* ARNConfigReader.h in Headers */ = {isa = PBXBuildFile; fileRef = C300721D24A0B6C3003F8073 /* ARNConfigReader.h */; };
@@ -55,6 +59,10 @@
55
59
 
56
60
  /* Begin PBXFileReference section */
57
61
  134814201AA4EA6300B7C361 /* libAirbridgeRN.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAirbridgeRN.a; sourceTree = BUILT_PRODUCTS_DIR; };
62
+ 633D2E2A2D79B84B00130326 /* AirbridgeInAppPurchase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AirbridgeInAppPurchase.h; sourceTree = "<group>"; };
63
+ 633D2E2B2D79B84B00130326 /* AirbridgeInAppPurchase.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AirbridgeInAppPurchase.m; sourceTree = "<group>"; };
64
+ 633D2E2E2D79B85700130326 /* AirbridgeAttribution.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AirbridgeAttribution.h; sourceTree = "<group>"; };
65
+ 633D2E2F2D79B85700130326 /* AirbridgeAttribution.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AirbridgeAttribution.m; sourceTree = "<group>"; };
58
66
  9F2C4C112B9EC9EE0064A9B7 /* ARNHex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ARNHex.m; sourceTree = "<group>"; };
59
67
  9F2C4C122B9EC9EE0064A9B7 /* ARNHex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARNHex.h; sourceTree = "<group>"; };
60
68
  C300721D24A0B6C3003F8073 /* ARNConfigReader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ARNConfigReader.h; sourceTree = "<group>"; };
@@ -114,6 +122,10 @@
114
122
  C3BF1EDF2264485C00271B03 /* AirbridgeRN */ = {
115
123
  isa = PBXGroup;
116
124
  children = (
125
+ 633D2E2E2D79B85700130326 /* AirbridgeAttribution.h */,
126
+ 633D2E2F2D79B85700130326 /* AirbridgeAttribution.m */,
127
+ 633D2E2A2D79B84B00130326 /* AirbridgeInAppPurchase.h */,
128
+ 633D2E2B2D79B84B00130326 /* AirbridgeInAppPurchase.m */,
117
129
  9F2C4C122B9EC9EE0064A9B7 /* ARNHex.h */,
118
130
  9F2C4C112B9EC9EE0064A9B7 /* ARNHex.m */,
119
131
  C34284B42266E7040060226A /* AirbridgeRN.h */,
@@ -146,8 +158,10 @@
146
158
  C34284B62266E7040060226A /* AirbridgeRN.h in Headers */,
147
159
  C39C1CD123029BD100CECBD8 /* AirbridgePlacement.h in Headers */,
148
160
  C355603C226427C000D6D240 /* AirbridgeEvent.h in Headers */,
161
+ 633D2E2C2D79B84B00130326 /* AirbridgeInAppPurchase.h in Headers */,
149
162
  C35560342264267700D6D240 /* AirbridgeDeeplink.h in Headers */,
150
163
  C35819CA2273324400DCD619 /* AirbridgeState.h in Headers */,
164
+ 633D2E302D79B85700130326 /* AirbridgeAttribution.h in Headers */,
151
165
  C300721F24A0B6C3003F8073 /* ARNConfigReader.h in Headers */,
152
166
  );
153
167
  runOnlyForDeploymentPostprocessing = 0;
@@ -236,9 +250,11 @@
236
250
  C355603D226427C000D6D240 /* AirbridgeEvent.m in Sources */,
237
251
  C39C1CD223029BD100CECBD8 /* AirbridgePlacement.m in Sources */,
238
252
  C35819CB2273324400DCD619 /* AirbridgeState.m in Sources */,
253
+ 633D2E312D79B85700130326 /* AirbridgeAttribution.m in Sources */,
239
254
  C300722024A0B6C3003F8073 /* ARNConfigReader.m in Sources */,
240
255
  C37E9CFA249856EC00BC790F /* ARNGet.m in Sources */,
241
256
  9F2C4C132B9EC9EE0064A9B7 /* ARNHex.m in Sources */,
257
+ 633D2E2D2D79B84B00130326 /* AirbridgeInAppPurchase.m in Sources */,
242
258
  C34284B72266E7040060226A /* AirbridgeRN.m in Sources */,
243
259
  C35560352264267700D6D240 /* AirbridgeDeeplink.m in Sources */,
244
260
  );
@@ -10,7 +10,7 @@ ios_project_file=File.join(
10
10
 
11
11
  project = Xcodeproj::Project.open(ios_project_file)
12
12
  target = project.targets.first
13
- phase = target.shell_script_build_phases().bsearch {|phase| phase.name == "[Airbridge] Copy airbridge.json"}
13
+ phase = target.shell_script_build_phases().select {|phase| phase.name == "[Airbridge] Copy airbridge.json"}[0]
14
14
  script = (
15
15
  "if [ -r ${SRCROOT}/../airbridge.json ]; then" + "\n" \
16
16
  + " cp ${SRCROOT}/../airbridge.json ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/airbridge.json" + "\n" \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airbridge-react-native-sdk-restricted",
3
- "version": "2.8.8",
3
+ "version": "2.9.0",
4
4
  "description": "Airbridge SDK for React Native",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/src/Airbridge.js CHANGED
@@ -3,6 +3,7 @@ import Deeplink from './Deeplink';
3
3
  import State from './State';
4
4
  import Placement from './Placement';
5
5
  import WebInterface from './WebInterface';
6
+ import InAppPurchase from './InAppPurchase';
6
7
 
7
8
  /**
8
9
  * @class Airbridge
@@ -21,6 +22,8 @@ class Airbridge {
21
22
  this.state = State;
22
23
  /** @type {Placement} */
23
24
  this.placement = Placement;
25
+ /** @type {InAppPurchase} */
26
+ this.inAppPurchase = InAppPurchase
24
27
  }
25
28
 
26
29
  /**
@@ -77,6 +80,28 @@ class Airbridge {
77
80
  createWebInterface(webToken, postCommandFunction) {
78
81
  return new WebInterface(webToken, postCommandFunction, this.state, this.event);
79
82
  }
83
+
84
+ /**
85
+ * make airbridge start in-app purchase tracking
86
+ * This function is experimental and may change in future versions.
87
+ * Use it with caution.
88
+ *
89
+ * @experimental
90
+ */
91
+ startInAppPurchaseTracking() {
92
+ this.inAppPurchase.startInAppPurchaseTracking();
93
+ }
94
+
95
+ /**
96
+ * make airbridge stop in-app purchase tracking
97
+ * This function is experimental and may change in future versions.
98
+ * Use it with caution.
99
+ *
100
+ * @experimental
101
+ */
102
+ stopInAppPurchaseTracking() {
103
+ this.inAppPurchase.stopInAppPurchaseTracking();
104
+ }
80
105
  }
81
106
 
82
107
  export default new Airbridge();
@@ -0,0 +1,38 @@
1
+ import { NativeModules } from 'react-native';
2
+ import _ from './tool/_';
3
+
4
+ const { AirbridgeInAppPurchase } = NativeModules;
5
+
6
+ /**
7
+ * class for In-app Purhcase tracking (singleton)
8
+ */
9
+ class InAppPurchase {
10
+ /**
11
+ * @hideconstructor
12
+ */
13
+ constructor() {}
14
+
15
+ /**
16
+ * make airbridge start in-app purchase tracking
17
+ * This function is experimental and may change in future versions.
18
+ * Use it with caution.
19
+ *
20
+ * @experimental
21
+ */
22
+ startInAppPurchaseTracking() {
23
+ AirbridgeInAppPurchase.startInAppPurchaseTracking();
24
+ }
25
+
26
+ /**
27
+ * make airbridge stop in-app purchase tracking
28
+ * This function is experimental and may change in future versions.
29
+ * Use it with caution.
30
+ *
31
+ * @experimental
32
+ */
33
+ stopInAppPurchaseTracking() {
34
+ AirbridgeInAppPurchase.stopInAppPurchaseTracking();
35
+ }
36
+ }
37
+
38
+ export default new InAppPurchase();
@@ -26,7 +26,7 @@ class WebInterface {
26
26
 
27
27
  const getScript = function (webToken, postCommand) {
28
28
  const jsonSchemaVersion = 4;
29
- const sdkVersion = '2.8.8';
29
+ const sdkVersion = '2.9.0';
30
30
 
31
31
  return `
32
32
  AirbridgeNative = {};
@@ -1,78 +0,0 @@
1
- name: 'Add GitHub check'
2
- description: Add GitHub check
3
-
4
- inputs:
5
- owner:
6
- description: Owner of repository
7
- type: string
8
- default: ${context.repo.owner}
9
- required: false
10
- repository:
11
- description: Repository of release
12
- type: string
13
- default: ${context.repo.repo}
14
- required: false
15
- name:
16
- description: Name of check
17
- type: string
18
- default: ${{ github.workflow }}
19
- required: false
20
- pull-request-number:
21
- description: Pull request of check
22
- type: string
23
- default: ${context.issue.number}
24
- required: false
25
- detail-url:
26
- description: Detail URL of check
27
- type: string
28
- default: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
29
- required: false
30
- conclusion:
31
- description: Conclusion of check if status is completed (success, failure)
32
- type: string
33
- default: 'success'
34
- required: false
35
- token:
36
- description: GitHub Token
37
- type: string
38
- required: false
39
- status:
40
- description: Status of check (queued, in_progress, completed)
41
- type: string
42
- required: true
43
-
44
- outputs:
45
- check-id:
46
- description: ID of added check
47
- value: ${{ steps.add-check.outputs.result }}
48
- runs:
49
- using: 'composite'
50
- steps:
51
- - name: Add check
52
- id: add-check
53
- uses: actions/github-script@v7
54
- with:
55
- script: |
56
- const { data: { id: id } } = await github.rest.checks.create({
57
- owner: `${{ inputs.owner }}`,
58
- repo: `${{ inputs.repository }}`,
59
- name: `${{ inputs.name }}`,
60
- head_sha: await (async () => {
61
- const { data: { head: { sha: sha } } } = await github.rest.pulls.get({
62
- owner: `${{ inputs.owner }}`,
63
- repo: `${{ inputs.repository }}`,
64
- pull_number: `${{ inputs.pull-request-number }}`,
65
- })
66
- return sha
67
- })(),
68
- details_url: `${{ inputs.detail-url }}`,
69
- status: `${{ inputs.status }}`,
70
- conclusion: (() => {
71
- if (`${{ inputs.status }}` !== 'completed') {
72
- return undefined
73
- }
74
- return `${{ inputs.conclusion }}`
75
- })(),
76
- })
77
- return id
78
- github-token: ${{ inputs.token || env.GITHUB_TOKEN || github.token }}
@@ -1,48 +0,0 @@
1
- name: 'Add GitHub comment'
2
- description: Add GitHub comment
3
-
4
- inputs:
5
- issue-number:
6
- description: Issue to comment
7
- type: string
8
- default: ${context.issue.number}
9
- required: false
10
- owner:
11
- description: Owner of repository
12
- type: string
13
- default: ${context.repo.owner}
14
- required: false
15
- repository:
16
- description: Repository of release
17
- type: string
18
- default: ${context.repo.repo}
19
- required: false
20
- token:
21
- description: GitHub Token
22
- type: string
23
- required: false
24
- comment:
25
- description: Comment
26
- type: string
27
- required: true
28
-
29
- outputs:
30
- comment-id:
31
- description: ID of added comment
32
- value: ${{ steps.add-comment.outputs.result }}
33
- runs:
34
- using: 'composite'
35
- steps:
36
- - name: Add comment
37
- id: add-comment
38
- uses: actions/github-script@v7
39
- with:
40
- script: |
41
- const { data: { id: id } } = await github.rest.issues.createComment({
42
- issue_number: `${{ inputs.issue-number }}`,
43
- owner: `${{ inputs.owner }}`,
44
- repo: `${{ inputs.repository }}`,
45
- body: `${{ inputs.comment }}`,
46
- })
47
- return id
48
- github-token: ${{ inputs.token || env.GITHUB_TOKEN || github.token }}
@@ -1,32 +0,0 @@
1
- name: 'Add Slack message'
2
- description: Add Slack message
3
-
4
- inputs:
5
- incoming-webhook-url:
6
- description: Slack incoming webhook url to add message
7
- type: string
8
- required: true
9
- message:
10
- description: Message
11
- type: string
12
- required: true
13
-
14
- runs:
15
- using: 'composite'
16
- steps:
17
- - name: Add Slack message
18
- uses: slackapi/slack-github-action@v1.25.0
19
- with:
20
- payload: |
21
- {
22
- "blocks": [{
23
- "type": "section",
24
- "text": {
25
- "type": "mrkdwn",
26
- "text": "${{ inputs.message }}"
27
- }
28
- }]
29
- }
30
- env:
31
- SLACK_WEBHOOK_URL: ${{ inputs.incoming-webhook-url }}
32
- SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
@@ -1,59 +0,0 @@
1
- name: 'Edit GitHub check'
2
- description: Edit GitHub check
3
-
4
- inputs:
5
- owner:
6
- description: Owner of repository
7
- type: string
8
- default: ${context.repo.owner}
9
- required: false
10
- repository:
11
- description: Repository of release
12
- type: string
13
- default: ${context.repo.repo}
14
- required: false
15
- check-id:
16
- description: Check id to edit
17
- type: string
18
- required: true
19
- detail-url:
20
- description: Detail URL of check
21
- type: string
22
- default: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
23
- required: false
24
- conclusion:
25
- description: Conclusion of check if status is completed (success, failure)
26
- type: string
27
- default: 'success'
28
- required: false
29
- token:
30
- description: GitHub Token
31
- type: string
32
- required: false
33
- status:
34
- description: Status of check (queued, in_progress, completed)
35
- type: string
36
- required: true
37
-
38
- runs:
39
- using: 'composite'
40
- steps:
41
- - name: Edit check
42
- id: edit-check
43
- uses: actions/github-script@v7
44
- with:
45
- script: |
46
- await github.rest.checks.update({
47
- owner: `${{ inputs.owner }}`,
48
- repo: `${{ inputs.repository }}`,
49
- check_run_id: `${{ inputs.check-id }}`,
50
- details_url: `${{ inputs.detail-url }}`,
51
- status: `${{ inputs.status }}`,
52
- conclusion: (() => {
53
- if (`${{ inputs.status }}` !== `completed`) {
54
- return undefined
55
- }
56
- return `${{ inputs.conclusion }}`
57
- })(),
58
- })
59
- github-token: ${{ inputs.token || env.GITHUB_TOKEN || github.token }}