mergn-react-native 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +44 -0
- package/README.md +131 -0
- package/android/build.gradle +66 -0
- package/android/src/main/java/com/mergn/reactnative/MergnModule.java +152 -0
- package/android/src/main/java/com/mergn/reactnative/MergnPackage.java +31 -0
- package/app.plugin.js +2 -0
- package/docs/ANDROID.md +147 -0
- package/docs/IOS.md +156 -0
- package/docs/MIGRATION.md +365 -0
- package/ios/MergnModule.swift +149 -0
- package/ios/MergnModuleBridge.m +14 -0
- package/ios/MergnNotificationHandler.swift +160 -0
- package/ios/NotificationService/Info.plist +31 -0
- package/ios/NotificationService/NotificationService.swift +82 -0
- package/mergn-react-native.podspec +32 -0
- package/package.json +49 -0
- package/plugin/index.js +219 -0
- package/react-native.config.js +19 -0
- package/scripts/release-ios.sh +79 -0
- package/scripts/verify-package.js +58 -0
- package/sdk/MergnSDK.podspec +28 -0
- package/sdk/mergn_ios.xcframework/Info.plist +44 -0
- package/sdk/mergn_ios.xcframework/ios-arm64/mergn_ios.framework/Info.plist +0 -0
- package/sdk/mergn_ios.xcframework/ios-arm64/mergn_ios.framework/Modules/mergn_ios.swiftmodule/arm64-apple-ios.abi.json +2517 -0
- package/sdk/mergn_ios.xcframework/ios-arm64/mergn_ios.framework/Modules/mergn_ios.swiftmodule/arm64-apple-ios.private.swiftinterface +82 -0
- package/sdk/mergn_ios.xcframework/ios-arm64/mergn_ios.framework/Modules/mergn_ios.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/sdk/mergn_ios.xcframework/ios-arm64/mergn_ios.framework/Modules/mergn_ios.swiftmodule/arm64-apple-ios.swiftinterface +82 -0
- package/sdk/mergn_ios.xcframework/ios-arm64/mergn_ios.framework/mergn_ios +0 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Info.plist +0 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Modules/mergn_ios.swiftmodule/arm64-apple-ios-simulator.abi.json +2517 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Modules/mergn_ios.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +82 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Modules/mergn_ios.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Modules/mergn_ios.swiftmodule/arm64-apple-ios-simulator.swiftinterface +82 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Modules/mergn_ios.swiftmodule/x86_64-apple-ios-simulator.abi.json +2517 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Modules/mergn_ios.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +82 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Modules/mergn_ios.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/Modules/mergn_ios.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +82 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/_CodeSignature/CodeResources +101 -0
- package/sdk/mergn_ios.xcframework/ios-arm64_x86_64-simulator/mergn_ios.framework/mergn_ios +0 -0
- package/src/index.d.ts +37 -0
- package/src/index.js +34 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.3.1 effective-5.10 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -O -enable-experimental-feature DebugDescriptionMacro -module-name mergn_ios
|
|
4
|
+
// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.1
|
|
5
|
+
import Foundation
|
|
6
|
+
import Swift
|
|
7
|
+
import UIKit
|
|
8
|
+
import UserNotifications
|
|
9
|
+
import WebKit
|
|
10
|
+
import _Concurrency
|
|
11
|
+
import _StringProcessing
|
|
12
|
+
import _SwiftConcurrencyShims
|
|
13
|
+
@_hasMissingDesignatedInitializers public class EventManager {
|
|
14
|
+
final public let apiMergnKey: Swift.String
|
|
15
|
+
public static let shared: mergn_ios.EventManager
|
|
16
|
+
public func registerAPI(clientApiKey: Swift.String)
|
|
17
|
+
public func getUniqueIdentifier() -> Swift.String
|
|
18
|
+
public func saveCustomerId(customerId: Swift.String) -> Swift.String
|
|
19
|
+
public func saveFirebaseToken(token: Swift.String) -> Swift.String
|
|
20
|
+
public func getCustomerId() -> Swift.String
|
|
21
|
+
public func getFirebaseToken() -> Swift.String
|
|
22
|
+
public func getEventList()
|
|
23
|
+
public func getAttributeList()
|
|
24
|
+
public func getAttributeValue(attributeId: Swift.String) -> Swift.String
|
|
25
|
+
public func postIdentification(identity: Swift.String? = nil)
|
|
26
|
+
public func sendEvent(eventName: Swift.String, properties: [Swift.String : Any])
|
|
27
|
+
public func sendPopupEvent(eventName: Swift.String, popupActionProperty: Swift.String, popupAction: Swift.String, actionValue: Swift.String)
|
|
28
|
+
public func sendAttribute(attributeName: Swift.String, attributeValue: Swift.String)
|
|
29
|
+
public func openWebView(from parentViewController: UIKit.UIViewController, htmlString: Swift.String)
|
|
30
|
+
public func firebaseToken(token: Swift.String)
|
|
31
|
+
public func notificationViewed(notificationData: UserNotifications.UNNotificationRequest)
|
|
32
|
+
public func notificationTapped(notificationData: UserNotifications.UNNotificationRequest)
|
|
33
|
+
public var isAppInstallDateValid: Swift.Bool {
|
|
34
|
+
get
|
|
35
|
+
}
|
|
36
|
+
@objc deinit
|
|
37
|
+
}
|
|
38
|
+
@available(iOSApplicationExtension, unavailable)
|
|
39
|
+
extension UIKit.UIApplication {
|
|
40
|
+
@_Concurrency.MainActor @preconcurrency public static func topViewController(base: UIKit.UIViewController? = UIApplication.shared
|
|
41
|
+
.connectedScenes
|
|
42
|
+
.compactMap { ($0 as? UIWindowScene)?.windows.first(where: { $0.isKeyWindow })?.rootViewController }
|
|
43
|
+
.first) -> UIKit.UIViewController?
|
|
44
|
+
}
|
|
45
|
+
public protocol InAppMergnDelegate : AnyObject {
|
|
46
|
+
func DidReceiveInAppDeepLink(_ url: Swift.String)
|
|
47
|
+
}
|
|
48
|
+
@_hasMissingDesignatedInitializers public class SDKManager {
|
|
49
|
+
public static let shared: mergn_ios.SDKManager
|
|
50
|
+
public func setCurrentViewController(_ viewController: UIKit.UIViewController?)
|
|
51
|
+
public func getCurrentViewController() -> UIKit.UIViewController?
|
|
52
|
+
@objc deinit
|
|
53
|
+
}
|
|
54
|
+
public enum SDKManagerError : Swift.Error {
|
|
55
|
+
case invalidViewController
|
|
56
|
+
case viewControllerNotSet
|
|
57
|
+
public static func == (a: mergn_ios.SDKManagerError, b: mergn_ios.SDKManagerError) -> Swift.Bool
|
|
58
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
59
|
+
public var hashValue: Swift.Int {
|
|
60
|
+
get
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
@_hasMissingDesignatedInitializers public class MergnSDKManager {
|
|
64
|
+
public static let shared: mergn_ios.MergnSDKManager
|
|
65
|
+
weak public var inAppDelegateMergn: (any mergn_ios.InAppMergnDelegate)?
|
|
66
|
+
@objc deinit
|
|
67
|
+
}
|
|
68
|
+
@objc @_inheritsConvenienceInitializers @_Concurrency.MainActor @preconcurrency public class WebViewController : UIKit.UIViewController, WebKit.WKNavigationDelegate, WebKit.WKScriptMessageHandler {
|
|
69
|
+
@_Concurrency.MainActor @preconcurrency weak public var delegate: (any mergn_ios.InAppMergnDelegate)?
|
|
70
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
71
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
72
|
+
@_Concurrency.MainActor @preconcurrency public func loadHTML(_ htmlString: Swift.String)
|
|
73
|
+
@_Concurrency.MainActor @preconcurrency @objc public func webView(_ webView: WebKit.WKWebView, didFinish navigation: WebKit.WKNavigation!)
|
|
74
|
+
@_Concurrency.MainActor @preconcurrency @objc public func webView(_ webView: WebKit.WKWebView, decidePolicyFor navigationAction: WebKit.WKNavigationAction, decisionHandler: @escaping (WebKit.WKNavigationActionPolicy) -> Swift.Void)
|
|
75
|
+
@_Concurrency.MainActor @preconcurrency @objc public func webView(_ webView: WebKit.WKWebView, didFail navigation: WebKit.WKNavigation!, withError error: any Swift.Error)
|
|
76
|
+
@_Concurrency.MainActor @preconcurrency @objc public func userContentController(_ userContentController: WebKit.WKUserContentController, didReceive message: WebKit.WKScriptMessage)
|
|
77
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init(nibName nibNameOrNil: Swift.String?, bundle nibBundleOrNil: Foundation.Bundle?)
|
|
78
|
+
@_Concurrency.MainActor @preconcurrency @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
79
|
+
@objc deinit
|
|
80
|
+
}
|
|
81
|
+
extension mergn_ios.SDKManagerError : Swift.Equatable {}
|
|
82
|
+
extension mergn_ios.SDKManagerError : Swift.Hashable {}
|
|
Binary file
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 6.3.1 effective-5.10 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
|
|
3
|
+
// swift-module-flags: -target arm64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -O -enable-experimental-feature DebugDescriptionMacro -module-name mergn_ios
|
|
4
|
+
// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.1
|
|
5
|
+
import Foundation
|
|
6
|
+
import Swift
|
|
7
|
+
import UIKit
|
|
8
|
+
import UserNotifications
|
|
9
|
+
import WebKit
|
|
10
|
+
import _Concurrency
|
|
11
|
+
import _StringProcessing
|
|
12
|
+
import _SwiftConcurrencyShims
|
|
13
|
+
@_hasMissingDesignatedInitializers public class EventManager {
|
|
14
|
+
final public let apiMergnKey: Swift.String
|
|
15
|
+
public static let shared: mergn_ios.EventManager
|
|
16
|
+
public func registerAPI(clientApiKey: Swift.String)
|
|
17
|
+
public func getUniqueIdentifier() -> Swift.String
|
|
18
|
+
public func saveCustomerId(customerId: Swift.String) -> Swift.String
|
|
19
|
+
public func saveFirebaseToken(token: Swift.String) -> Swift.String
|
|
20
|
+
public func getCustomerId() -> Swift.String
|
|
21
|
+
public func getFirebaseToken() -> Swift.String
|
|
22
|
+
public func getEventList()
|
|
23
|
+
public func getAttributeList()
|
|
24
|
+
public func getAttributeValue(attributeId: Swift.String) -> Swift.String
|
|
25
|
+
public func postIdentification(identity: Swift.String? = nil)
|
|
26
|
+
public func sendEvent(eventName: Swift.String, properties: [Swift.String : Any])
|
|
27
|
+
public func sendPopupEvent(eventName: Swift.String, popupActionProperty: Swift.String, popupAction: Swift.String, actionValue: Swift.String)
|
|
28
|
+
public func sendAttribute(attributeName: Swift.String, attributeValue: Swift.String)
|
|
29
|
+
public func openWebView(from parentViewController: UIKit.UIViewController, htmlString: Swift.String)
|
|
30
|
+
public func firebaseToken(token: Swift.String)
|
|
31
|
+
public func notificationViewed(notificationData: UserNotifications.UNNotificationRequest)
|
|
32
|
+
public func notificationTapped(notificationData: UserNotifications.UNNotificationRequest)
|
|
33
|
+
public var isAppInstallDateValid: Swift.Bool {
|
|
34
|
+
get
|
|
35
|
+
}
|
|
36
|
+
@objc deinit
|
|
37
|
+
}
|
|
38
|
+
@available(iOSApplicationExtension, unavailable)
|
|
39
|
+
extension UIKit.UIApplication {
|
|
40
|
+
@_Concurrency.MainActor @preconcurrency public static func topViewController(base: UIKit.UIViewController? = UIApplication.shared
|
|
41
|
+
.connectedScenes
|
|
42
|
+
.compactMap { ($0 as? UIWindowScene)?.windows.first(where: { $0.isKeyWindow })?.rootViewController }
|
|
43
|
+
.first) -> UIKit.UIViewController?
|
|
44
|
+
}
|
|
45
|
+
public protocol InAppMergnDelegate : AnyObject {
|
|
46
|
+
func DidReceiveInAppDeepLink(_ url: Swift.String)
|
|
47
|
+
}
|
|
48
|
+
@_hasMissingDesignatedInitializers public class SDKManager {
|
|
49
|
+
public static let shared: mergn_ios.SDKManager
|
|
50
|
+
public func setCurrentViewController(_ viewController: UIKit.UIViewController?)
|
|
51
|
+
public func getCurrentViewController() -> UIKit.UIViewController?
|
|
52
|
+
@objc deinit
|
|
53
|
+
}
|
|
54
|
+
public enum SDKManagerError : Swift.Error {
|
|
55
|
+
case invalidViewController
|
|
56
|
+
case viewControllerNotSet
|
|
57
|
+
public static func == (a: mergn_ios.SDKManagerError, b: mergn_ios.SDKManagerError) -> Swift.Bool
|
|
58
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
59
|
+
public var hashValue: Swift.Int {
|
|
60
|
+
get
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
@_hasMissingDesignatedInitializers public class MergnSDKManager {
|
|
64
|
+
public static let shared: mergn_ios.MergnSDKManager
|
|
65
|
+
weak public var inAppDelegateMergn: (any mergn_ios.InAppMergnDelegate)?
|
|
66
|
+
@objc deinit
|
|
67
|
+
}
|
|
68
|
+
@objc @_inheritsConvenienceInitializers @_Concurrency.MainActor @preconcurrency public class WebViewController : UIKit.UIViewController, WebKit.WKNavigationDelegate, WebKit.WKScriptMessageHandler {
|
|
69
|
+
@_Concurrency.MainActor @preconcurrency weak public var delegate: (any mergn_ios.InAppMergnDelegate)?
|
|
70
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidLoad()
|
|
71
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public func viewDidAppear(_ animated: Swift.Bool)
|
|
72
|
+
@_Concurrency.MainActor @preconcurrency public func loadHTML(_ htmlString: Swift.String)
|
|
73
|
+
@_Concurrency.MainActor @preconcurrency @objc public func webView(_ webView: WebKit.WKWebView, didFinish navigation: WebKit.WKNavigation!)
|
|
74
|
+
@_Concurrency.MainActor @preconcurrency @objc public func webView(_ webView: WebKit.WKWebView, decidePolicyFor navigationAction: WebKit.WKNavigationAction, decisionHandler: @escaping (WebKit.WKNavigationActionPolicy) -> Swift.Void)
|
|
75
|
+
@_Concurrency.MainActor @preconcurrency @objc public func webView(_ webView: WebKit.WKWebView, didFail navigation: WebKit.WKNavigation!, withError error: any Swift.Error)
|
|
76
|
+
@_Concurrency.MainActor @preconcurrency @objc public func userContentController(_ userContentController: WebKit.WKUserContentController, didReceive message: WebKit.WKScriptMessage)
|
|
77
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init(nibName nibNameOrNil: Swift.String?, bundle nibBundleOrNil: Foundation.Bundle?)
|
|
78
|
+
@_Concurrency.MainActor @preconcurrency @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
79
|
+
@objc deinit
|
|
80
|
+
}
|
|
81
|
+
extension mergn_ios.SDKManagerError : Swift.Equatable {}
|
|
82
|
+
extension mergn_ios.SDKManagerError : Swift.Hashable {}
|