gomarketme-react-native 4.0.0 → 5.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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +89 -51
  3. package/android/build.gradle +46 -0
  4. package/android/libs/core-5.0.0.jar +0 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/java/co/gomarketme/reactnative/GoMarketMeReactNativeModule.kt +184 -0
  7. package/android/src/main/java/co/gomarketme/reactnative/GoMarketMeReactNativePackage.kt +16 -0
  8. package/gomarketme-react-native.podspec +18 -0
  9. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/Info.plist +44 -0
  10. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64/GoMarketMeAppleCoreKit.framework/GoMarketMeAppleCoreKit +0 -0
  11. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64/GoMarketMeAppleCoreKit.framework/Info.plist +0 -0
  12. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios.abi.json +2932 -0
  13. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios.package.swiftinterface +86 -0
  14. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios.private.swiftinterface +86 -0
  15. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  16. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios.swiftinterface +86 -0
  17. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/GoMarketMeAppleCoreKit +0 -0
  18. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Info.plist +0 -0
  19. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios-simulator.abi.json +2932 -0
  20. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +86 -0
  21. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +86 -0
  22. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  23. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +86 -0
  24. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +2932 -0
  25. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +86 -0
  26. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +86 -0
  27. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  28. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/Modules/GoMarketMeAppleCoreKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +86 -0
  29. package/ios/Frameworks/GoMarketMeAppleCoreKit.xcframework/ios-arm64_x86_64-simulator/GoMarketMeAppleCoreKit.framework/_CodeSignature/CodeResources +101 -0
  30. package/ios/GoMarketMeReactNative.swift +133 -0
  31. package/ios/GoMarketMeReactNativeBridge.m +17 -0
  32. package/{dist → lib}/index.d.ts +27 -30
  33. package/lib/index.js +172 -0
  34. package/package.json +41 -18
  35. package/react-native.config.js +12 -0
  36. package/.editorconfig +0 -15
  37. package/.gitattributes +0 -3
  38. package/.github/actions/setup/action.yml +0 -27
  39. package/.github/workflows/ci.yml +0 -157
  40. package/.nvmrc +0 -1
  41. package/.watchmanconfig +0 -1
  42. package/.yarn/releases/yarn-4.3.1-git.20240705.hash-35167b2.cjs +0 -894
  43. package/.yarnrc.yml +0 -5
  44. package/dist/index.js +0 -544
  45. package/lefthook.yml +0 -35
  46. package/src/index.tsx +0 -392
  47. package/tsconfig.json +0 -19
@@ -0,0 +1,86 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
3
+ // swift-module-flags: -target x86_64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -module-name GoMarketMeAppleCoreKit -package-name apple
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
5
+ import Foundation
6
+ import StoreKit
7
+ import Swift
8
+ import UIKit
9
+ import _Concurrency
10
+ import _StringProcessing
11
+ import _SwiftConcurrencyShims
12
+ final public class GoMarketMeAppleApiClient : @unchecked Swift.Sendable {
13
+ public init(session: Foundation.URLSession = .shared)
14
+ final public func postSDKInitialization(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration) async throws
15
+ #if compiler(>=5.3) && $NonescapableTypes
16
+ final public func postSystemInfo(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, payload: [Swift.String : Any]) async throws -> [Swift.String : Any]?
17
+ #endif
18
+ final public func sendPurchaseEvent(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, event: GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) async throws
19
+ @objc deinit
20
+ }
21
+ public struct GoMarketMeAppleCurrentPurchaseSyncResult : Swift.Sendable {
22
+ public let fetchedCount: Swift.Int
23
+ public let sentCount: Swift.Int
24
+ public let failedCount: Swift.Int
25
+ public let success: Swift.Bool
26
+ public init(fetchedCount: Swift.Int, sentCount: Swift.Int, failedCount: Swift.Int, success: Swift.Bool)
27
+ }
28
+ @available(iOS 15.0, *)
29
+ final public class GoMarketMeAppleCore : @unchecked Swift.Sendable {
30
+ public static let isDebugLoggingEnabled: Swift.Bool
31
+ final public var onPurchase: ((GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) -> Swift.Void)?
32
+ final public var onError: ((any Swift.Error) -> Swift.Void)?
33
+ public init(apiClient: GoMarketMeAppleCoreKit.GoMarketMeAppleApiClient = GoMarketMeAppleApiClient())
34
+ #if compiler(>=5.3) && $NonescapableTypes
35
+ final public func prepareAttribution(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration) async -> (configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, affiliateMarketingData: [Swift.String : Any]?)
36
+ #endif
37
+ final public func configure(_ configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration)
38
+ final public func start()
39
+ final public func stop()
40
+ final public func syncAllTransactions() async -> GoMarketMeAppleCoreKit.GoMarketMeAppleCurrentPurchaseSyncResult
41
+ final public func currentPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
42
+ final public func unfinishedPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
43
+ final public func allPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
44
+ final public func send(_ event: GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) async
45
+ final public func debugAllTransactions() async -> [[Swift.String : Any]]
46
+ @objc deinit
47
+ }
48
+ public enum GoMarketMeAppleCoreEndpoints {
49
+ public static let sdkInitialization: Foundation.URL
50
+ public static let systemInfo: Foundation.URL
51
+ public static let event: Foundation.URL
52
+ }
53
+ public struct GoMarketMeAppleCoreConfiguration : Swift.Sendable {
54
+ public let apiKey: Swift.String
55
+ public let affiliateCampaignCode: Swift.String?
56
+ public let deviceId: Swift.String?
57
+ public let sourceName: Swift.String
58
+ public let sdkType: Swift.String?
59
+ public let sdkVersion: Swift.String?
60
+ public let packageName: Swift.String?
61
+ public let eventEndpoint: Foundation.URL
62
+ public let sdkInitializationEndpoint: Foundation.URL
63
+ public let systemInfoEndpoint: Foundation.URL
64
+ public let isProduction: Swift.Bool?
65
+ #if compiler(>=5.3) && $NonescapableTypes
66
+ public init(apiKey: Swift.String, affiliateCampaignCode: Swift.String? = nil, deviceId: Swift.String? = nil, sourceName: Swift.String = "app_store", sdkType: Swift.String? = nil, sdkVersion: Swift.String? = nil, packageName: Swift.String? = nil, eventEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.event, sdkInitializationEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.sdkInitialization, systemInfoEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.systemInfo, isProduction: Swift.Bool? = nil)
67
+ #endif
68
+ #if compiler(>=5.3) && $NonescapableTypes
69
+ public func withAttribution(affiliateCampaignCode: Swift.String?, deviceId: Swift.String?, packageName: Swift.String?) -> GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration
70
+ #endif
71
+ }
72
+ @available(iOS 15.0, *)
73
+ public struct GoMarketMeApplePurchaseEvent {
74
+ public let productID: Swift.String
75
+ public let transactionID: Swift.String
76
+ public let originalTransactionID: Swift.String
77
+ public let signedTransaction: Swift.String?
78
+ public let purchaseDate: Foundation.Date
79
+ public let expirationDate: Foundation.Date?
80
+ public let productType: Swift.String
81
+ public let products: [[Swift.String : Any]]
82
+ #if compiler(>=5.3) && $NonescapableTypes
83
+ public init(productID: Swift.String, transactionID: Swift.String, originalTransactionID: Swift.String, signedTransaction: Swift.String?, purchaseDate: Foundation.Date, expirationDate: Foundation.Date?, productType: Swift.String, products: [[Swift.String : Any]] = [])
84
+ #endif
85
+ public func toDictionary() -> [Swift.String : Any]
86
+ }
@@ -0,0 +1,86 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
3
+ // swift-module-flags: -target x86_64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -module-name GoMarketMeAppleCoreKit -package-name apple
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
5
+ import Foundation
6
+ import StoreKit
7
+ import Swift
8
+ import UIKit
9
+ import _Concurrency
10
+ import _StringProcessing
11
+ import _SwiftConcurrencyShims
12
+ final public class GoMarketMeAppleApiClient : @unchecked Swift.Sendable {
13
+ public init(session: Foundation.URLSession = .shared)
14
+ final public func postSDKInitialization(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration) async throws
15
+ #if compiler(>=5.3) && $NonescapableTypes
16
+ final public func postSystemInfo(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, payload: [Swift.String : Any]) async throws -> [Swift.String : Any]?
17
+ #endif
18
+ final public func sendPurchaseEvent(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, event: GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) async throws
19
+ @objc deinit
20
+ }
21
+ public struct GoMarketMeAppleCurrentPurchaseSyncResult : Swift.Sendable {
22
+ public let fetchedCount: Swift.Int
23
+ public let sentCount: Swift.Int
24
+ public let failedCount: Swift.Int
25
+ public let success: Swift.Bool
26
+ public init(fetchedCount: Swift.Int, sentCount: Swift.Int, failedCount: Swift.Int, success: Swift.Bool)
27
+ }
28
+ @available(iOS 15.0, *)
29
+ final public class GoMarketMeAppleCore : @unchecked Swift.Sendable {
30
+ public static let isDebugLoggingEnabled: Swift.Bool
31
+ final public var onPurchase: ((GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) -> Swift.Void)?
32
+ final public var onError: ((any Swift.Error) -> Swift.Void)?
33
+ public init(apiClient: GoMarketMeAppleCoreKit.GoMarketMeAppleApiClient = GoMarketMeAppleApiClient())
34
+ #if compiler(>=5.3) && $NonescapableTypes
35
+ final public func prepareAttribution(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration) async -> (configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, affiliateMarketingData: [Swift.String : Any]?)
36
+ #endif
37
+ final public func configure(_ configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration)
38
+ final public func start()
39
+ final public func stop()
40
+ final public func syncAllTransactions() async -> GoMarketMeAppleCoreKit.GoMarketMeAppleCurrentPurchaseSyncResult
41
+ final public func currentPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
42
+ final public func unfinishedPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
43
+ final public func allPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
44
+ final public func send(_ event: GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) async
45
+ final public func debugAllTransactions() async -> [[Swift.String : Any]]
46
+ @objc deinit
47
+ }
48
+ public enum GoMarketMeAppleCoreEndpoints {
49
+ public static let sdkInitialization: Foundation.URL
50
+ public static let systemInfo: Foundation.URL
51
+ public static let event: Foundation.URL
52
+ }
53
+ public struct GoMarketMeAppleCoreConfiguration : Swift.Sendable {
54
+ public let apiKey: Swift.String
55
+ public let affiliateCampaignCode: Swift.String?
56
+ public let deviceId: Swift.String?
57
+ public let sourceName: Swift.String
58
+ public let sdkType: Swift.String?
59
+ public let sdkVersion: Swift.String?
60
+ public let packageName: Swift.String?
61
+ public let eventEndpoint: Foundation.URL
62
+ public let sdkInitializationEndpoint: Foundation.URL
63
+ public let systemInfoEndpoint: Foundation.URL
64
+ public let isProduction: Swift.Bool?
65
+ #if compiler(>=5.3) && $NonescapableTypes
66
+ public init(apiKey: Swift.String, affiliateCampaignCode: Swift.String? = nil, deviceId: Swift.String? = nil, sourceName: Swift.String = "app_store", sdkType: Swift.String? = nil, sdkVersion: Swift.String? = nil, packageName: Swift.String? = nil, eventEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.event, sdkInitializationEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.sdkInitialization, systemInfoEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.systemInfo, isProduction: Swift.Bool? = nil)
67
+ #endif
68
+ #if compiler(>=5.3) && $NonescapableTypes
69
+ public func withAttribution(affiliateCampaignCode: Swift.String?, deviceId: Swift.String?, packageName: Swift.String?) -> GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration
70
+ #endif
71
+ }
72
+ @available(iOS 15.0, *)
73
+ public struct GoMarketMeApplePurchaseEvent {
74
+ public let productID: Swift.String
75
+ public let transactionID: Swift.String
76
+ public let originalTransactionID: Swift.String
77
+ public let signedTransaction: Swift.String?
78
+ public let purchaseDate: Foundation.Date
79
+ public let expirationDate: Foundation.Date?
80
+ public let productType: Swift.String
81
+ public let products: [[Swift.String : Any]]
82
+ #if compiler(>=5.3) && $NonescapableTypes
83
+ public init(productID: Swift.String, transactionID: Swift.String, originalTransactionID: Swift.String, signedTransaction: Swift.String?, purchaseDate: Foundation.Date, expirationDate: Foundation.Date?, productType: Swift.String, products: [[Swift.String : Any]] = [])
84
+ #endif
85
+ public func toDictionary() -> [Swift.String : Any]
86
+ }
@@ -0,0 +1,86 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
3
+ // swift-module-flags: -target x86_64-apple-ios15.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -module-name GoMarketMeAppleCoreKit -package-name apple
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2
5
+ import Foundation
6
+ import StoreKit
7
+ import Swift
8
+ import UIKit
9
+ import _Concurrency
10
+ import _StringProcessing
11
+ import _SwiftConcurrencyShims
12
+ final public class GoMarketMeAppleApiClient : @unchecked Swift.Sendable {
13
+ public init(session: Foundation.URLSession = .shared)
14
+ final public func postSDKInitialization(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration) async throws
15
+ #if compiler(>=5.3) && $NonescapableTypes
16
+ final public func postSystemInfo(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, payload: [Swift.String : Any]) async throws -> [Swift.String : Any]?
17
+ #endif
18
+ final public func sendPurchaseEvent(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, event: GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) async throws
19
+ @objc deinit
20
+ }
21
+ public struct GoMarketMeAppleCurrentPurchaseSyncResult : Swift.Sendable {
22
+ public let fetchedCount: Swift.Int
23
+ public let sentCount: Swift.Int
24
+ public let failedCount: Swift.Int
25
+ public let success: Swift.Bool
26
+ public init(fetchedCount: Swift.Int, sentCount: Swift.Int, failedCount: Swift.Int, success: Swift.Bool)
27
+ }
28
+ @available(iOS 15.0, *)
29
+ final public class GoMarketMeAppleCore : @unchecked Swift.Sendable {
30
+ public static let isDebugLoggingEnabled: Swift.Bool
31
+ final public var onPurchase: ((GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) -> Swift.Void)?
32
+ final public var onError: ((any Swift.Error) -> Swift.Void)?
33
+ public init(apiClient: GoMarketMeAppleCoreKit.GoMarketMeAppleApiClient = GoMarketMeAppleApiClient())
34
+ #if compiler(>=5.3) && $NonescapableTypes
35
+ final public func prepareAttribution(configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration) async -> (configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration, affiliateMarketingData: [Swift.String : Any]?)
36
+ #endif
37
+ final public func configure(_ configuration: GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration)
38
+ final public func start()
39
+ final public func stop()
40
+ final public func syncAllTransactions() async -> GoMarketMeAppleCoreKit.GoMarketMeAppleCurrentPurchaseSyncResult
41
+ final public func currentPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
42
+ final public func unfinishedPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
43
+ final public func allPurchases() async throws -> [GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent]
44
+ final public func send(_ event: GoMarketMeAppleCoreKit.GoMarketMeApplePurchaseEvent) async
45
+ final public func debugAllTransactions() async -> [[Swift.String : Any]]
46
+ @objc deinit
47
+ }
48
+ public enum GoMarketMeAppleCoreEndpoints {
49
+ public static let sdkInitialization: Foundation.URL
50
+ public static let systemInfo: Foundation.URL
51
+ public static let event: Foundation.URL
52
+ }
53
+ public struct GoMarketMeAppleCoreConfiguration : Swift.Sendable {
54
+ public let apiKey: Swift.String
55
+ public let affiliateCampaignCode: Swift.String?
56
+ public let deviceId: Swift.String?
57
+ public let sourceName: Swift.String
58
+ public let sdkType: Swift.String?
59
+ public let sdkVersion: Swift.String?
60
+ public let packageName: Swift.String?
61
+ public let eventEndpoint: Foundation.URL
62
+ public let sdkInitializationEndpoint: Foundation.URL
63
+ public let systemInfoEndpoint: Foundation.URL
64
+ public let isProduction: Swift.Bool?
65
+ #if compiler(>=5.3) && $NonescapableTypes
66
+ public init(apiKey: Swift.String, affiliateCampaignCode: Swift.String? = nil, deviceId: Swift.String? = nil, sourceName: Swift.String = "app_store", sdkType: Swift.String? = nil, sdkVersion: Swift.String? = nil, packageName: Swift.String? = nil, eventEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.event, sdkInitializationEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.sdkInitialization, systemInfoEndpoint: Foundation.URL = GoMarketMeAppleCoreEndpoints.systemInfo, isProduction: Swift.Bool? = nil)
67
+ #endif
68
+ #if compiler(>=5.3) && $NonescapableTypes
69
+ public func withAttribution(affiliateCampaignCode: Swift.String?, deviceId: Swift.String?, packageName: Swift.String?) -> GoMarketMeAppleCoreKit.GoMarketMeAppleCoreConfiguration
70
+ #endif
71
+ }
72
+ @available(iOS 15.0, *)
73
+ public struct GoMarketMeApplePurchaseEvent {
74
+ public let productID: Swift.String
75
+ public let transactionID: Swift.String
76
+ public let originalTransactionID: Swift.String
77
+ public let signedTransaction: Swift.String?
78
+ public let purchaseDate: Foundation.Date
79
+ public let expirationDate: Foundation.Date?
80
+ public let productType: Swift.String
81
+ public let products: [[Swift.String : Any]]
82
+ #if compiler(>=5.3) && $NonescapableTypes
83
+ public init(productID: Swift.String, transactionID: Swift.String, originalTransactionID: Swift.String, signedTransaction: Swift.String?, purchaseDate: Foundation.Date, expirationDate: Foundation.Date?, productType: Swift.String, products: [[Swift.String : Any]] = [])
84
+ #endif
85
+ public func toDictionary() -> [Swift.String : Any]
86
+ }
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>files</key>
6
+ <dict>
7
+ <key>Info.plist</key>
8
+ <data>
9
+ Rc1+/vsJ/wHJUwdPatviVV27UIM=
10
+ </data>
11
+ </dict>
12
+ <key>files2</key>
13
+ <dict/>
14
+ <key>rules</key>
15
+ <dict>
16
+ <key>^.*</key>
17
+ <true/>
18
+ <key>^.*\.lproj/</key>
19
+ <dict>
20
+ <key>optional</key>
21
+ <true/>
22
+ <key>weight</key>
23
+ <real>1000</real>
24
+ </dict>
25
+ <key>^.*\.lproj/locversion.plist$</key>
26
+ <dict>
27
+ <key>omit</key>
28
+ <true/>
29
+ <key>weight</key>
30
+ <real>1100</real>
31
+ </dict>
32
+ <key>^Base\.lproj/</key>
33
+ <dict>
34
+ <key>weight</key>
35
+ <real>1010</real>
36
+ </dict>
37
+ <key>^version.plist$</key>
38
+ <true/>
39
+ </dict>
40
+ <key>rules2</key>
41
+ <dict>
42
+ <key>.*\.dSYM($|/)</key>
43
+ <dict>
44
+ <key>weight</key>
45
+ <real>11</real>
46
+ </dict>
47
+ <key>^(.*/)?\.DS_Store$</key>
48
+ <dict>
49
+ <key>omit</key>
50
+ <true/>
51
+ <key>weight</key>
52
+ <real>2000</real>
53
+ </dict>
54
+ <key>^.*</key>
55
+ <true/>
56
+ <key>^.*\.lproj/</key>
57
+ <dict>
58
+ <key>optional</key>
59
+ <true/>
60
+ <key>weight</key>
61
+ <real>1000</real>
62
+ </dict>
63
+ <key>^.*\.lproj/locversion.plist$</key>
64
+ <dict>
65
+ <key>omit</key>
66
+ <true/>
67
+ <key>weight</key>
68
+ <real>1100</real>
69
+ </dict>
70
+ <key>^Base\.lproj/</key>
71
+ <dict>
72
+ <key>weight</key>
73
+ <real>1010</real>
74
+ </dict>
75
+ <key>^Info\.plist$</key>
76
+ <dict>
77
+ <key>omit</key>
78
+ <true/>
79
+ <key>weight</key>
80
+ <real>20</real>
81
+ </dict>
82
+ <key>^PkgInfo$</key>
83
+ <dict>
84
+ <key>omit</key>
85
+ <true/>
86
+ <key>weight</key>
87
+ <real>20</real>
88
+ </dict>
89
+ <key>^embedded\.provisionprofile$</key>
90
+ <dict>
91
+ <key>weight</key>
92
+ <real>20</real>
93
+ </dict>
94
+ <key>^version\.plist$</key>
95
+ <dict>
96
+ <key>weight</key>
97
+ <real>20</real>
98
+ </dict>
99
+ </dict>
100
+ </dict>
101
+ </plist>
@@ -0,0 +1,133 @@
1
+ import Foundation
2
+ import React
3
+ import GoMarketMeAppleCoreKit
4
+
5
+ @objc(GoMarketMeReactNative)
6
+ class GoMarketMeReactNative: NSObject {
7
+ private var core: Any?
8
+ private let isDebugLoggingEnabled = false
9
+
10
+ @objc
11
+ static func requiresMainQueueSetup() -> Bool {
12
+ false
13
+ }
14
+
15
+ @objc(initialize:sdkType:sdkVersion:isProduction:resolver:rejecter:)
16
+ func initialize(
17
+ apiKey: String,
18
+ sdkType: String,
19
+ sdkVersion: String,
20
+ isProduction: Bool,
21
+ resolve: @escaping RCTPromiseResolveBlock,
22
+ reject: @escaping RCTPromiseRejectBlock
23
+ ) {
24
+ if isDebugLoggingEnabled {
25
+ NSLog("[GoMarketMe React Native iOS] initialize called")
26
+ }
27
+
28
+ guard #available(iOS 15.0, *) else {
29
+ reject("unsupported_ios", "GoMarketMe core requires iOS 15.0+", nil)
30
+ return
31
+ }
32
+
33
+ let trimmedApiKey = apiKey.trimmingCharacters(in: .whitespacesAndNewlines)
34
+
35
+ guard !trimmedApiKey.isEmpty else {
36
+ reject("invalid_arguments", "apiKey is required", nil)
37
+ return
38
+ }
39
+
40
+ let initialConfiguration = GoMarketMeAppleCoreConfiguration(
41
+ apiKey: trimmedApiKey,
42
+ sdkType: sdkType.isEmpty ? "ReactNative" : sdkType,
43
+ sdkVersion: sdkVersion.isEmpty ? nil : sdkVersion,
44
+ isProduction: isProduction
45
+ )
46
+
47
+ let appleCore = (core as? GoMarketMeAppleCore) ?? GoMarketMeAppleCore()
48
+
49
+ if isDebugLoggingEnabled {
50
+ appleCore.onPurchase = { event in
51
+ NSLog(
52
+ "[GoMarketMe React Native iOS] purchase observed by core: %@",
53
+ String(describing: event.toDictionary())
54
+ )
55
+ }
56
+
57
+ appleCore.onError = { error in
58
+ NSLog("[GoMarketMe React Native iOS] core error: %@", error.localizedDescription)
59
+ }
60
+ } else {
61
+ appleCore.onPurchase = nil
62
+ appleCore.onError = nil
63
+ }
64
+
65
+ Task {
66
+ let prepared = await appleCore.prepareAttribution(configuration: initialConfiguration)
67
+
68
+ appleCore.configure(prepared.configuration)
69
+
70
+ if isDebugLoggingEnabled {
71
+ NSLog("[GoMarketMe React Native iOS] starting Apple core")
72
+ }
73
+
74
+ appleCore.start()
75
+ self.core = appleCore
76
+
77
+ let response: [String: Any] = [
78
+ "initialized": true,
79
+ "platform": "ios",
80
+ "source": prepared.configuration.sourceName,
81
+ "affiliateMarketingData": prepared.affiliateMarketingData ?? [:]
82
+ ]
83
+
84
+ DispatchQueue.main.async {
85
+ resolve(response)
86
+ }
87
+ }
88
+ }
89
+
90
+ @objc(syncAllTransactions:rejecter:)
91
+ func syncAllTransactions(
92
+ resolve: @escaping RCTPromiseResolveBlock,
93
+ reject: @escaping RCTPromiseRejectBlock
94
+ ) {
95
+ guard #available(iOS 15.0, *) else {
96
+ reject("unsupported_ios", "GoMarketMe transaction sync requires iOS 15.0+", nil)
97
+ return
98
+ }
99
+
100
+ guard let appleCore = core as? GoMarketMeAppleCore else {
101
+ reject("not_initialized", "GoMarketMe SDK must be initialized before syncing transactions", nil)
102
+ return
103
+ }
104
+
105
+ if isDebugLoggingEnabled {
106
+ NSLog("[GoMarketMe React Native iOS] syncAllTransactions called")
107
+ }
108
+
109
+ Task {
110
+ let result = await appleCore.syncAllTransactions()
111
+
112
+ let response: [String: Any] = [
113
+ "fetchedCount": result.fetchedCount,
114
+ "sentCount": result.sentCount,
115
+ "failedCount": result.failedCount,
116
+ "success": result.success
117
+ ]
118
+
119
+ DispatchQueue.main.async {
120
+ resolve(response)
121
+ }
122
+ }
123
+ }
124
+
125
+ @objc
126
+ func stop() {
127
+ if #available(iOS 15.0, *), let appleCore = core as? GoMarketMeAppleCore {
128
+ appleCore.stop()
129
+ }
130
+
131
+ core = nil
132
+ }
133
+ }
@@ -0,0 +1,17 @@
1
+ #import <React/RCTBridgeModule.h>
2
+
3
+ @interface RCT_EXTERN_MODULE(GoMarketMeReactNative, NSObject)
4
+
5
+ RCT_EXTERN_METHOD(initialize:(NSString *)apiKey
6
+ sdkType:(NSString *)sdkType
7
+ sdkVersion:(NSString *)sdkVersion
8
+ isProduction:(BOOL)isProduction
9
+ resolver:(RCTPromiseResolveBlock)resolve
10
+ rejecter:(RCTPromiseRejectBlock)reject)
11
+
12
+ RCT_EXTERN_METHOD(syncAllTransactions:(RCTPromiseResolveBlock)resolve
13
+ rejecter:(RCTPromiseRejectBlock)reject)
14
+
15
+ RCT_EXTERN_METHOD(stop)
16
+
17
+ @end
@@ -1,3 +1,15 @@
1
+ export type InitializeResponse = {
2
+ initialized: boolean;
3
+ platform: 'ios' | 'android';
4
+ source: 'app_store' | 'google_play' | string;
5
+ affiliateMarketingData?: Record<string, unknown> | null;
6
+ };
7
+ export type SyncAllTransactionsResponse = {
8
+ fetchedCount: number;
9
+ sentCount: number;
10
+ failedCount: number;
11
+ success: boolean;
12
+ };
1
13
  export declare class GoMarketMeAffiliateMarketingData {
2
14
  campaign: Campaign;
3
15
  affiliate: Affiliate;
@@ -6,7 +18,8 @@ export declare class GoMarketMeAffiliateMarketingData {
6
18
  deviceId: string;
7
19
  offerCode?: string;
8
20
  constructor(campaign: Campaign, affiliate: Affiliate, saleDistribution: SaleDistribution, affiliateCampaignCode: string, deviceId: string, offerCode?: string);
9
- static fromJson(json: Record<string, any>): GoMarketMeAffiliateMarketingData | null;
21
+ static fromJson(json?: Record<string, unknown> | null): GoMarketMeAffiliateMarketingData | null;
22
+ toJson(): Record<string, unknown>;
10
23
  }
11
24
  export declare class Campaign {
12
25
  id: string;
@@ -15,7 +28,8 @@ export declare class Campaign {
15
28
  type: string;
16
29
  publicLinkUrl?: string;
17
30
  constructor(id: string, name: string, status: string, type: string, publicLinkUrl?: string);
18
- static fromJson(json: Record<string, any>): Campaign;
31
+ static fromJson(json: Record<string, unknown>): Campaign;
32
+ toJson(): Record<string, unknown>;
19
33
  }
20
34
  export declare class Affiliate {
21
35
  id: string;
@@ -26,46 +40,29 @@ export declare class Affiliate {
26
40
  tiktokAccount: string;
27
41
  xAccount: string;
28
42
  constructor(id: string, firstName: string, lastName: string, countryCode: string, instagramAccount: string, tiktokAccount: string, xAccount: string);
29
- static fromJson(json: Record<string, any>): Affiliate;
43
+ static fromJson(json: Record<string, unknown>): Affiliate;
44
+ toJson(): Record<string, unknown>;
30
45
  }
31
46
  export declare class SaleDistribution {
32
47
  platformPercentage: string;
33
48
  affiliatePercentage: string;
34
49
  constructor(platformPercentage: string, affiliatePercentage: string);
35
- static fromJson(json: Record<string, any>): SaleDistribution;
50
+ static fromJson(json: Record<string, unknown>): SaleDistribution;
51
+ toJson(): Record<string, unknown>;
36
52
  }
37
53
  declare class GoMarketMe {
38
54
  private static instance;
39
- private sdkType;
40
- private sdkVersion;
41
- private sdkInitializedKey;
42
- private sdkInitializationUrl;
43
- private systemInfoUrl;
44
- private eventUrl;
45
- private _affiliateCampaignCode;
46
- private _deviceId;
47
- private _packageName;
48
- private _purchaseUpdateUnsub?;
49
- private _purchaseErrorUnsub?;
55
+ private readonly sdkType;
56
+ private readonly sdkVersion;
57
+ private isInitializing;
58
+ private isInitialized;
50
59
  affiliateMarketingData?: GoMarketMeAffiliateMarketingData | null;
51
60
  private constructor();
52
61
  static getInstance(): GoMarketMe;
62
+ get initialized(): boolean;
53
63
  initialize(apiKey: string): Promise<void>;
54
- removeListeners(): void;
55
- private _addListeners;
56
- private _getSystemInfo;
57
- private _postSDKInitialization;
58
- private _postSystemInfo;
59
- private _readAndroidDeviceInfo;
60
- private _readIosDeviceInfo;
61
- private _fetchConsolidatedPurchases;
62
- private _sendEventToServer;
63
- private _serializePurchaseDetails;
64
- private _serializeProductDetails;
65
- private _markSDKAsInitialized;
66
- private _isSDKInitialized;
67
- private _isProduction;
68
- private _fetchExistingPurchases;
64
+ syncAllTransactions(): Promise<SyncAllTransactionsResponse>;
65
+ stop(): void;
69
66
  }
70
67
  declare const _default: GoMarketMe;
71
68
  export default _default;