@moxtradeveloper/react-native-moxo-module 8.9.5

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.
@@ -0,0 +1,34 @@
1
+ #import <React/RCTBridgeModule.h>
2
+ #import <React/RCTEventEmitter.h>
3
+ @interface RCT_EXTERN_MODULE(MoxoModule, RCTEventEmitter)
4
+ RCT_EXTERN_METHOD(setup:(NSString *)domain options:(NSDictionary *)options)
5
+ RCT_EXTERN_METHOD(link:(NSString *)token
6
+ withResolver:(RCTPromiseResolveBlock)resolve
7
+ withRejecter:(RCTPromiseRejectBlock)reject)
8
+ RCT_EXTERN_METHOD(unlink:(BOOL)keepNotification)
9
+ RCT_EXTERN_METHOD(showMEPWindow)
10
+ RCT_EXTERN_METHOD(hideMEPWindow)
11
+ RCT_EXTERN_METHOD(openChat:(NSString *)chatId
12
+ feedSequence:(NSNumber *__nonnull)feedSequence
13
+ withResolver:(RCTPromiseResolveBlock)resolve
14
+ withRejecter:(RCTPromiseRejectBlock)reject)
15
+ RCT_EXTERN_METHOD(openRelation:(NSDictionary *)user
16
+ withResolver:(RCTPromiseResolveBlock)resolve
17
+ withRejecter:(RCTPromiseRejectBlock)reject)
18
+ RCT_EXTERN_METHOD(getUnreadMessageCount:(NSDictionary *)options
19
+ withResolver:(RCTPromiseResolveBlock)resolve
20
+ withRejecter:(RCTPromiseRejectBlock)reject)
21
+ RCT_EXTERN_METHOD(onUnreadMessageCountUpdated:(RCTResponseSenderBlock)callback)
22
+ RCT_EXTERN_METHOD(registerNotification:(NSString *)deviceToken
23
+ withResolver:(RCTPromiseResolveBlock)resolve
24
+ withRejecter:(RCTPromiseRejectBlock)reject)
25
+ RCT_EXTERN_METHOD(parseNotification:(NSDictionary *)payload
26
+ withResolver:(RCTPromiseResolveBlock)resolve
27
+ withRejecter:(RCTPromiseRejectBlock)reject)
28
+
29
+ + (BOOL)requiresMainQueueSetup
30
+ {
31
+ return YES;
32
+ }
33
+
34
+ @end
@@ -0,0 +1,149 @@
1
+ @objc(MoxoModule)
2
+ class MoxoModule: RCTEventEmitter, MEPClientDelegate {
3
+ let default_error_code = 999
4
+ let default_error_message = "invalid parameters"
5
+ let unread_message_event = "onUnreadMessageCountUpdated"
6
+ private var onUnreadMessageCountUpdated:RCTResponseSenderBlock? = nil;
7
+
8
+ override class func moduleName() -> String! {
9
+ return "MoxoModule"
10
+ }
11
+
12
+ @objc(setup:options:)
13
+ func setup(domain: String, options: Dictionary<String, Any>) {
14
+ MEPClient.sharedInstance().setup(withDomain: domain, linkConfig: nil)
15
+ MEPClient.sharedInstance().delegate = self
16
+ }
17
+
18
+ @objc(link:withResolver:withRejecter:)
19
+ func link(token: String,resolve:@escaping RCTPromiseResolveBlock, reject:@escaping RCTPromiseRejectBlock) {
20
+ MEPClient.sharedInstance().linkUser(withAccessToken: token) { error in
21
+ if let err = error as? NSError {
22
+ reject("\(err.code)", err.localizedDescription, error)
23
+ } else {
24
+ resolve(true)
25
+ }
26
+ }
27
+ }
28
+
29
+ @objc(unlink:)
30
+ func unlink(keepNotification: Bool) {
31
+ DispatchQueue.main.async {
32
+ if (keepNotification) {
33
+ MEPClient.sharedInstance().localUnlink()
34
+ } else {
35
+ MEPClient.sharedInstance().unlink()
36
+ }
37
+ }
38
+ }
39
+
40
+ @objc(showMEPWindow)
41
+ func showMEPWindow() {
42
+ DispatchQueue.main.async {
43
+ MEPClient.sharedInstance().showMEPWindow()
44
+ }
45
+ }
46
+
47
+ @objc(hideMEPWindow)
48
+ func hideMEPWindow() {
49
+ DispatchQueue.main.async {
50
+ MEPClient.sharedInstance().hideMEPWindow()
51
+ }
52
+ }
53
+
54
+ @objc(openChat:feedSequence:withResolver:withRejecter:)
55
+ func openChat(chatId:String,feedSequence:NSNumber,resolve:@escaping RCTPromiseResolveBlock, reject:@escaping RCTPromiseRejectBlock) {
56
+ DispatchQueue.main.async {
57
+ MEPClient.sharedInstance().openChat(chatId, withFeedSequence: feedSequence == 0 ? nil : feedSequence) { error in
58
+ if let err = error as? NSError {
59
+ reject("\(err.code)", err.localizedDescription, error)
60
+ } else {
61
+ resolve(true)
62
+ }
63
+ }
64
+ }
65
+ }
66
+
67
+ @objc(openRelation:withResolver:withRejecter:)
68
+ func openRelation(user:Dictionary<String, String>,resolve:@escaping RCTPromiseResolveBlock, reject:@escaping RCTPromiseRejectBlock) {
69
+ DispatchQueue.main.async {
70
+ if let uniqueId = user["uniqueId"] {
71
+ MEPClient.sharedInstance().openRelationChat(withUniqueID: uniqueId) { error in
72
+ if let err = error as? NSError {
73
+ reject("\(err.code)", err.localizedDescription, error)
74
+ } else {
75
+ resolve(true)
76
+ }
77
+ }
78
+ } else if let email = user["email"] {
79
+ MEPClient.sharedInstance().openRelationChat(withEmail: email) { error in
80
+ if let err = error as? NSError {
81
+ reject("\(err.code)", err.localizedDescription, error)
82
+ } else {
83
+ resolve(true)
84
+ }
85
+ }
86
+ } else {
87
+ let err = NSError(domain:MEPSDKErrorDomain, code:self.default_error_code, userInfo:[ NSLocalizedDescriptionKey: "No uniqueId or email found"])
88
+ reject("\(self.default_error_code)", self.default_error_message, err)
89
+ }
90
+ }
91
+ }
92
+
93
+ @objc(getUnreadMessageCount:withResolver:withRejecter:)
94
+ func getUnreadMessageCount(options:Dictionary<String,String>, resolve:@escaping RCTPromiseResolveBlock, reject:@escaping RCTPromiseRejectBlock) {
95
+ let ret = MEPClient.sharedInstance().getUnreadMessageCount()
96
+ resolve(ret)
97
+ }
98
+
99
+ //MARK: Notification
100
+ @objc(registerNotification:withResolver:withRejecter:)
101
+ func registerNotification(deviceToken:String,resolve:@escaping RCTPromiseResolveBlock, reject:@escaping RCTPromiseRejectBlock) {
102
+ if let data = Data(hex: deviceToken) {
103
+ MEPClient.sharedInstance().registerNotification(withDeviceToken: data) { error in
104
+ if let err = error as? NSError {
105
+ reject("\(err.code)", err.localizedDescription, error)
106
+ } else {
107
+ resolve(true)
108
+ }
109
+ }
110
+ }
111
+ }
112
+
113
+ @objc(parseNotification:withResolver:withRejecter:)
114
+ func parseNotification(payload:Dictionary<String, Any>,resolve:@escaping RCTPromiseResolveBlock, reject:@escaping RCTPromiseRejectBlock) {
115
+ MEPClient.sharedInstance().parseRemoteNotification(payload) { error, ret in
116
+ if let err = error as? NSError {
117
+ reject("\(err.code)", err.localizedDescription, error)
118
+ } else {
119
+ resolve(ret)
120
+ }
121
+ }
122
+ }
123
+
124
+ //MARK: MEPClientDelegate
125
+ func client(_ client: MEPClient, didUpdateUnreadCount unreadCount: UInt) {
126
+ sendEvent(withName: unread_message_event, body: unreadCount)
127
+ }
128
+
129
+ //MARK: RCTBridgeModule
130
+ override func supportedEvents() -> [String]! {
131
+ return [unread_message_event]
132
+ }
133
+ }
134
+
135
+ extension Data {
136
+ init?(hex: String) {
137
+ guard hex.count.isMultiple(of: 2) else {
138
+ return nil
139
+ }
140
+
141
+ let chars = hex.map { $0 }
142
+ let bytes = stride(from: 0, to: chars.count, by: 2)
143
+ .map { String(chars[$0]) + String(chars[$0 + 1]) }
144
+ .compactMap { UInt8($0, radix: 16) }
145
+
146
+ guard hex.count / bytes.count == 2 else { return nil }
147
+ self.init(bytes)
148
+ }
149
+ }
@@ -0,0 +1,287 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ A836BC5A293745AF00AF727B /* MoxoModuleBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = A836BC58293745AF00AF727B /* MoxoModuleBridge.m */; };
11
+ F4FF95D7245B92E800C19C63 /* MoxoModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* MoxoModule.swift */; };
12
+ /* End PBXBuildFile section */
13
+
14
+ /* Begin PBXCopyFilesBuildPhase section */
15
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
16
+ isa = PBXCopyFilesBuildPhase;
17
+ buildActionMask = 2147483647;
18
+ dstPath = "include/$(PRODUCT_NAME)";
19
+ dstSubfolderSpec = 16;
20
+ files = (
21
+ );
22
+ runOnlyForDeploymentPostprocessing = 0;
23
+ };
24
+ /* End PBXCopyFilesBuildPhase section */
25
+
26
+ /* Begin PBXFileReference section */
27
+ 134814201AA4EA6300B7C361 /* libMoxoModule.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMoxoModule.a; sourceTree = BUILT_PRODUCTS_DIR; };
28
+ A836BC58293745AF00AF727B /* MoxoModuleBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoxoModuleBridge.m; sourceTree = "<group>"; };
29
+ A836BC59293745AF00AF727B /* MoxoModuleBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoxoModuleBridge.h; sourceTree = "<group>"; };
30
+ B3E7B5891CC2AC0600A0062D /* MoxoModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoxoModule.m; sourceTree = "<group>"; };
31
+ F4FF95D5245B92E700C19C63 /* MoxoModule-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MoxoModule-Bridging-Header.h"; sourceTree = "<group>"; };
32
+ F4FF95D6245B92E800C19C63 /* MoxoModule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoxoModule.swift; sourceTree = "<group>"; };
33
+ /* End PBXFileReference section */
34
+
35
+ /* Begin PBXFrameworksBuildPhase section */
36
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
37
+ isa = PBXFrameworksBuildPhase;
38
+ buildActionMask = 2147483647;
39
+ files = (
40
+ );
41
+ runOnlyForDeploymentPostprocessing = 0;
42
+ };
43
+ /* End PBXFrameworksBuildPhase section */
44
+
45
+ /* Begin PBXGroup section */
46
+ 134814211AA4EA7D00B7C361 /* Products */ = {
47
+ isa = PBXGroup;
48
+ children = (
49
+ 134814201AA4EA6300B7C361 /* libMoxoModule.a */,
50
+ );
51
+ name = Products;
52
+ sourceTree = "<group>";
53
+ };
54
+ 58B511D21A9E6C8500147676 = {
55
+ isa = PBXGroup;
56
+ children = (
57
+ A836BC59293745AF00AF727B /* MoxoModuleBridge.h */,
58
+ A836BC58293745AF00AF727B /* MoxoModuleBridge.m */,
59
+ F4FF95D6245B92E800C19C63 /* MoxoModule.swift */,
60
+ B3E7B5891CC2AC0600A0062D /* MoxoModule.m */,
61
+ F4FF95D5245B92E700C19C63 /* MoxoModule-Bridging-Header.h */,
62
+ 134814211AA4EA7D00B7C361 /* Products */,
63
+ );
64
+ sourceTree = "<group>";
65
+ };
66
+ /* End PBXGroup section */
67
+
68
+ /* Begin PBXNativeTarget section */
69
+ 58B511DA1A9E6C8500147676 /* MoxoModule */ = {
70
+ isa = PBXNativeTarget;
71
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "MoxoModule" */;
72
+ buildPhases = (
73
+ 58B511D71A9E6C8500147676 /* Sources */,
74
+ 58B511D81A9E6C8500147676 /* Frameworks */,
75
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
76
+ );
77
+ buildRules = (
78
+ );
79
+ dependencies = (
80
+ );
81
+ name = MoxoModule;
82
+ productName = RCTDataManager;
83
+ productReference = 134814201AA4EA6300B7C361 /* libMoxoModule.a */;
84
+ productType = "com.apple.product-type.library.static";
85
+ };
86
+ /* End PBXNativeTarget section */
87
+
88
+ /* Begin PBXProject section */
89
+ 58B511D31A9E6C8500147676 /* Project object */ = {
90
+ isa = PBXProject;
91
+ attributes = {
92
+ LastUpgradeCheck = 0920;
93
+ ORGANIZATIONNAME = Facebook;
94
+ TargetAttributes = {
95
+ 58B511DA1A9E6C8500147676 = {
96
+ CreatedOnToolsVersion = 6.1.1;
97
+ };
98
+ };
99
+ };
100
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "MoxoModule" */;
101
+ compatibilityVersion = "Xcode 3.2";
102
+ developmentRegion = English;
103
+ hasScannedForEncodings = 0;
104
+ knownRegions = (
105
+ English,
106
+ en,
107
+ );
108
+ mainGroup = 58B511D21A9E6C8500147676;
109
+ productRefGroup = 58B511D21A9E6C8500147676;
110
+ projectDirPath = "";
111
+ projectRoot = "";
112
+ targets = (
113
+ 58B511DA1A9E6C8500147676 /* MoxoModule */,
114
+ );
115
+ };
116
+ /* End PBXProject section */
117
+
118
+ /* Begin PBXSourcesBuildPhase section */
119
+ 58B511D71A9E6C8500147676 /* Sources */ = {
120
+ isa = PBXSourcesBuildPhase;
121
+ buildActionMask = 2147483647;
122
+ files = (
123
+ F4FF95D7245B92E800C19C63 /* MoxoModule.swift in Sources */,
124
+ A836BC5A293745AF00AF727B /* MoxoModuleBridge.m in Sources */,
125
+ );
126
+ runOnlyForDeploymentPostprocessing = 0;
127
+ };
128
+ /* End PBXSourcesBuildPhase section */
129
+
130
+ /* Begin XCBuildConfiguration section */
131
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
132
+ isa = XCBuildConfiguration;
133
+ buildSettings = {
134
+ ALWAYS_SEARCH_USER_PATHS = NO;
135
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
136
+ CLANG_CXX_LIBRARY = "libc++";
137
+ CLANG_ENABLE_MODULES = YES;
138
+ CLANG_ENABLE_OBJC_ARC = YES;
139
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
140
+ CLANG_WARN_BOOL_CONVERSION = YES;
141
+ CLANG_WARN_COMMA = YES;
142
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
143
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
144
+ CLANG_WARN_EMPTY_BODY = YES;
145
+ CLANG_WARN_ENUM_CONVERSION = YES;
146
+ CLANG_WARN_INFINITE_RECURSION = YES;
147
+ CLANG_WARN_INT_CONVERSION = YES;
148
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
149
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
150
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
151
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
152
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
153
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
154
+ CLANG_WARN_UNREACHABLE_CODE = YES;
155
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
156
+ COPY_PHASE_STRIP = NO;
157
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
158
+ ENABLE_TESTABILITY = YES;
159
+ "EXCLUDED_ARCHS[sdk=*]" = arm64;
160
+ GCC_C_LANGUAGE_STANDARD = gnu99;
161
+ GCC_DYNAMIC_NO_PIC = NO;
162
+ GCC_NO_COMMON_BLOCKS = YES;
163
+ GCC_OPTIMIZATION_LEVEL = 0;
164
+ GCC_PREPROCESSOR_DEFINITIONS = (
165
+ "DEBUG=1",
166
+ "$(inherited)",
167
+ );
168
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
169
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
170
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
171
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
172
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
173
+ GCC_WARN_UNUSED_FUNCTION = YES;
174
+ GCC_WARN_UNUSED_VARIABLE = YES;
175
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
176
+ MTL_ENABLE_DEBUG_INFO = YES;
177
+ ONLY_ACTIVE_ARCH = YES;
178
+ SDKROOT = iphoneos;
179
+ };
180
+ name = Debug;
181
+ };
182
+ 58B511EE1A9E6C8500147676 /* Release */ = {
183
+ isa = XCBuildConfiguration;
184
+ buildSettings = {
185
+ ALWAYS_SEARCH_USER_PATHS = NO;
186
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
187
+ CLANG_CXX_LIBRARY = "libc++";
188
+ CLANG_ENABLE_MODULES = YES;
189
+ CLANG_ENABLE_OBJC_ARC = YES;
190
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
191
+ CLANG_WARN_BOOL_CONVERSION = YES;
192
+ CLANG_WARN_COMMA = YES;
193
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
194
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
195
+ CLANG_WARN_EMPTY_BODY = YES;
196
+ CLANG_WARN_ENUM_CONVERSION = YES;
197
+ CLANG_WARN_INFINITE_RECURSION = YES;
198
+ CLANG_WARN_INT_CONVERSION = YES;
199
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
200
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
201
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
202
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
203
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
204
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
205
+ CLANG_WARN_UNREACHABLE_CODE = YES;
206
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
207
+ COPY_PHASE_STRIP = YES;
208
+ ENABLE_NS_ASSERTIONS = NO;
209
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
210
+ "EXCLUDED_ARCHS[sdk=*]" = arm64;
211
+ GCC_C_LANGUAGE_STANDARD = gnu99;
212
+ GCC_NO_COMMON_BLOCKS = YES;
213
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
214
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
215
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
216
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
217
+ GCC_WARN_UNUSED_FUNCTION = YES;
218
+ GCC_WARN_UNUSED_VARIABLE = YES;
219
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
220
+ MTL_ENABLE_DEBUG_INFO = NO;
221
+ SDKROOT = iphoneos;
222
+ VALIDATE_PRODUCT = YES;
223
+ };
224
+ name = Release;
225
+ };
226
+ 58B511F01A9E6C8500147676 /* Debug */ = {
227
+ isa = XCBuildConfiguration;
228
+ buildSettings = {
229
+ HEADER_SEARCH_PATHS = (
230
+ "$(inherited)",
231
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
232
+ "$(SRCROOT)/../../../React/**",
233
+ "$(SRCROOT)/../../react-native/React/**",
234
+ );
235
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
236
+ OTHER_LDFLAGS = "-ObjC";
237
+ PRODUCT_NAME = MoxoModule;
238
+ SKIP_INSTALL = YES;
239
+ SWIFT_OBJC_BRIDGING_HEADER = "MoxoModule-Bridging-Header.h";
240
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
241
+ SWIFT_VERSION = 5.0;
242
+ };
243
+ name = Debug;
244
+ };
245
+ 58B511F11A9E6C8500147676 /* Release */ = {
246
+ isa = XCBuildConfiguration;
247
+ buildSettings = {
248
+ HEADER_SEARCH_PATHS = (
249
+ "$(inherited)",
250
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
251
+ "$(SRCROOT)/../../../React/**",
252
+ "$(SRCROOT)/../../react-native/React/**",
253
+ );
254
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
255
+ OTHER_LDFLAGS = "-ObjC";
256
+ PRODUCT_NAME = MoxoModule;
257
+ SKIP_INSTALL = YES;
258
+ SWIFT_OBJC_BRIDGING_HEADER = "MoxoModule-Bridging-Header.h";
259
+ SWIFT_VERSION = 5.0;
260
+ };
261
+ name = Release;
262
+ };
263
+ /* End XCBuildConfiguration section */
264
+
265
+ /* Begin XCConfigurationList section */
266
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "MoxoModule" */ = {
267
+ isa = XCConfigurationList;
268
+ buildConfigurations = (
269
+ 58B511ED1A9E6C8500147676 /* Debug */,
270
+ 58B511EE1A9E6C8500147676 /* Release */,
271
+ );
272
+ defaultConfigurationIsVisible = 0;
273
+ defaultConfigurationName = Release;
274
+ };
275
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "MoxoModule" */ = {
276
+ isa = XCConfigurationList;
277
+ buildConfigurations = (
278
+ 58B511F01A9E6C8500147676 /* Debug */,
279
+ 58B511F11A9E6C8500147676 /* Release */,
280
+ );
281
+ defaultConfigurationIsVisible = 0;
282
+ defaultConfigurationName = Release;
283
+ };
284
+ /* End XCConfigurationList section */
285
+ };
286
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
287
+ }
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ </Workspace>
@@ -0,0 +1,17 @@
1
+ //
2
+ // MoxoModuleBridge.h
3
+ // MoxoModule
4
+ //
5
+ // Created by 胡翔 on 2022/11/30.
6
+ // Copyright © 2022 Facebook. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import <MEPSDK/MEPSDK.h>
11
+ NS_ASSUME_NONNULL_BEGIN
12
+
13
+ @interface MoxoModuleBridge : NSObject
14
+
15
+ @end
16
+
17
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,13 @@
1
+ //
2
+ // MoxoModuleBridge.m
3
+ // MoxoModule
4
+ //
5
+ // Created by 胡翔 on 2022/11/30.
6
+ // Copyright © 2022 Facebook. All rights reserved.
7
+ //
8
+
9
+ #import "MoxoModuleBridge.h"
10
+
11
+ @implementation MoxoModuleBridge
12
+
13
+ @end
package/package.json ADDED
@@ -0,0 +1,164 @@
1
+ {
2
+ "name": "@moxtradeveloper/react-native-moxo-module",
3
+ "version": "8.9.5",
4
+ "description": "Plugin for adding Moxtra services to react-native Apps.",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "*.podspec",
17
+ "!lib/typescript/example",
18
+ "!ios/build",
19
+ "!android/build",
20
+ "!android/gradle",
21
+ "!android/gradlew",
22
+ "!android/gradlew.bat",
23
+ "!android/local.properties",
24
+ "!**/__tests__",
25
+ "!**/__fixtures__",
26
+ "!**/__mocks__",
27
+ "!**/.*"
28
+ ],
29
+ "scripts": {
30
+ "test": "jest",
31
+ "typescript": "tsc --noEmit",
32
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
+ "release": "release-it",
34
+ "example": "yarn --cwd example",
35
+ "bootstrap": "yarn example && yarn install && yarn example pods",
36
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
37
+ },
38
+ "keywords": [
39
+ "moxtra",
40
+ "moxo",
41
+ "mep",
42
+ "chat",
43
+ "meet",
44
+ "flow",
45
+ "react-native",
46
+ "ios",
47
+ "android"
48
+ ],
49
+ "author": "john.hu <john.hu@moxo.com>",
50
+ "license": "ISC",
51
+ "bugs": {
52
+ "url": "https://www.moxtra.com"
53
+ },
54
+ "homepage": "https://www.moxtra.com",
55
+ "publishConfig": {
56
+ "registry": "https://registry.npmjs.org/"
57
+ },
58
+ "devDependencies": {
59
+ "@arkweid/lefthook": "^0.7.7",
60
+ "@commitlint/config-conventional": "^17.0.2",
61
+ "@react-native-community/eslint-config": "^3.0.2",
62
+ "@release-it/conventional-changelog": "^5.0.0",
63
+ "@types/jest": "^28.1.2",
64
+ "@types/react": "~17.0.21",
65
+ "@types/react-native": "0.70.0",
66
+ "commitlint": "^17.0.2",
67
+ "del-cli": "^5.0.0",
68
+ "eslint": "^8.4.1",
69
+ "eslint-config-prettier": "^8.5.0",
70
+ "eslint-plugin-prettier": "^4.0.0",
71
+ "jest": "^28.1.1",
72
+ "pod-install": "^0.1.0",
73
+ "prettier": "^2.0.5",
74
+ "react": "18.1.0",
75
+ "react-native": "0.70.6",
76
+ "react-native-builder-bob": "^0.20.0",
77
+ "release-it": "^15.0.0",
78
+ "typescript": "^4.5.2"
79
+ },
80
+ "resolutions": {
81
+ "@types/react": "17.0.21"
82
+ },
83
+ "peerDependencies": {
84
+ "react": "*",
85
+ "react-native": "*"
86
+ },
87
+ "engines": {
88
+ "node": ">= 16.0.0"
89
+ },
90
+ "packageManager": "^yarn@1.22.15",
91
+ "jest": {
92
+ "preset": "react-native",
93
+ "modulePathIgnorePatterns": [
94
+ "<rootDir>/example/node_modules",
95
+ "<rootDir>/lib/"
96
+ ]
97
+ },
98
+ "commitlint": {
99
+ "extends": [
100
+ "@commitlint/config-conventional"
101
+ ]
102
+ },
103
+ "release-it": {
104
+ "git": {
105
+ "commitMessage": "chore: release ${version}",
106
+ "tagName": "v${version}"
107
+ },
108
+ "npm": {
109
+ "publish": true
110
+ },
111
+ "github": {
112
+ "release": true
113
+ },
114
+ "plugins": {
115
+ "@release-it/conventional-changelog": {
116
+ "preset": "angular"
117
+ }
118
+ }
119
+ },
120
+ "eslintConfig": {
121
+ "root": true,
122
+ "extends": [
123
+ "@react-native-community",
124
+ "prettier"
125
+ ],
126
+ "rules": {
127
+ "prettier/prettier": [
128
+ "error",
129
+ {
130
+ "quoteProps": "consistent",
131
+ "singleQuote": true,
132
+ "tabWidth": 2,
133
+ "trailingComma": "es5",
134
+ "useTabs": false
135
+ }
136
+ ]
137
+ }
138
+ },
139
+ "eslintIgnore": [
140
+ "node_modules/",
141
+ "lib/"
142
+ ],
143
+ "prettier": {
144
+ "quoteProps": "consistent",
145
+ "singleQuote": true,
146
+ "tabWidth": 2,
147
+ "trailingComma": "es5",
148
+ "useTabs": false
149
+ },
150
+ "react-native-builder-bob": {
151
+ "source": "src",
152
+ "output": "lib",
153
+ "targets": [
154
+ "commonjs",
155
+ "module",
156
+ [
157
+ "typescript",
158
+ {
159
+ "project": "tsconfig.build.json"
160
+ }
161
+ ]
162
+ ]
163
+ }
164
+ }