react-native-moengage-geofence 2.2.0 → 3.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/CHANGELOG.md CHANGED
@@ -1,7 +1,8 @@
1
- # react-native-moengage-geofence
2
- ---
1
+ ## 27-09-2022
2
+
3
+ ### 3.0.0
4
+ - Support for iOS SDK version `8.3.1` and above, Geofence version `4.3.0` and above.
3
5
 
4
- ## Change Log:
5
6
  ### 2.2.0
6
7
  Release Date: 12th May 2022
7
8
  - iOS
@@ -13,5 +13,8 @@ Pod::Spec.new do |s|
13
13
  s.authors = "MoEngage Inc."
14
14
  s.source = {:file => './' }
15
15
  s.platform = :ios, "10.0"
16
- s.dependency 'MOGeofence', '>=3.2.0', '< 3.3.0'
16
+ s.dependency 'MoEngagePluginGeofence', '>=1.0.0', '< 1.1.0'
17
+ s.dependency 'React'
18
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
19
+
17
20
  end
@@ -0,0 +1,6 @@
1
+
2
+ #import <React/RCTBridgeModule.h>
3
+ @import MoEngagePluginGeofence;
4
+ @interface MoEReactGeofence : NSObject <RCTBridgeModule>
5
+
6
+ @end
@@ -0,0 +1,10 @@
1
+ #import "MoEReactGeofence.h"
2
+
3
+ @implementation MoEReactGeofence
4
+
5
+ RCT_EXPORT_MODULE()
6
+ RCT_EXPORT_METHOD(startGeofenceMonitoring:(NSDictionary *) payload) {
7
+ [[MoEngagePluginGeofenceBridge sharedInstance] startGeofenceMonitoring: payload];
8
+ }
9
+
10
+ @end
@@ -0,0 +1,272 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ ACD518BF28ACAE130014B432 /* MoEReactGeofence.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* MoEReactGeofence.m */; };
11
+ /* End PBXBuildFile section */
12
+
13
+ /* Begin PBXCopyFilesBuildPhase section */
14
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
15
+ isa = PBXCopyFilesBuildPhase;
16
+ buildActionMask = 2147483647;
17
+ dstPath = "include/$(PRODUCT_NAME)";
18
+ dstSubfolderSpec = 16;
19
+ files = (
20
+ );
21
+ runOnlyForDeploymentPostprocessing = 0;
22
+ };
23
+ /* End PBXCopyFilesBuildPhase section */
24
+
25
+ /* Begin PBXFileReference section */
26
+ 134814201AA4EA6300B7C361 /* libMoEReactGeofence.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMoEReactGeofence.a; sourceTree = BUILT_PRODUCTS_DIR; };
27
+ B3E7B5881CC2AC0600A0062D /* MoEReactGeofence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoEReactGeofence.h; sourceTree = "<group>"; };
28
+ B3E7B5891CC2AC0600A0062D /* MoEReactGeofence.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoEReactGeofence.m; sourceTree = "<group>"; };
29
+ /* End PBXFileReference section */
30
+
31
+ /* Begin PBXFrameworksBuildPhase section */
32
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
33
+ isa = PBXFrameworksBuildPhase;
34
+ buildActionMask = 2147483647;
35
+ files = (
36
+ );
37
+ runOnlyForDeploymentPostprocessing = 0;
38
+ };
39
+ /* End PBXFrameworksBuildPhase section */
40
+
41
+ /* Begin PBXGroup section */
42
+ 134814211AA4EA7D00B7C361 /* Products */ = {
43
+ isa = PBXGroup;
44
+ children = (
45
+ 134814201AA4EA6300B7C361 /* libMoEReactGeofence.a */,
46
+ );
47
+ name = Products;
48
+ sourceTree = "<group>";
49
+ };
50
+ 58B511D21A9E6C8500147676 = {
51
+ isa = PBXGroup;
52
+ children = (
53
+ B3E7B5881CC2AC0600A0062D /* MoEReactGeofence.h */,
54
+ B3E7B5891CC2AC0600A0062D /* MoEReactGeofence.m */,
55
+ 134814211AA4EA7D00B7C361 /* Products */,
56
+ );
57
+ sourceTree = "<group>";
58
+ };
59
+ /* End PBXGroup section */
60
+
61
+ /* Begin PBXNativeTarget section */
62
+ 58B511DA1A9E6C8500147676 /* MoEReactGeofence */ = {
63
+ isa = PBXNativeTarget;
64
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "MoEReactGeofence" */;
65
+ buildPhases = (
66
+ 58B511D71A9E6C8500147676 /* Sources */,
67
+ 58B511D81A9E6C8500147676 /* Frameworks */,
68
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
69
+ );
70
+ buildRules = (
71
+ );
72
+ dependencies = (
73
+ );
74
+ name = MoEReactGeofence;
75
+ productName = RCTDataManager;
76
+ productReference = 134814201AA4EA6300B7C361 /* libMoEReactGeofence.a */;
77
+ productType = "com.apple.product-type.library.static";
78
+ };
79
+ /* End PBXNativeTarget section */
80
+
81
+ /* Begin PBXProject section */
82
+ 58B511D31A9E6C8500147676 /* Project object */ = {
83
+ isa = PBXProject;
84
+ attributes = {
85
+ LastUpgradeCheck = 0920;
86
+ ORGANIZATIONNAME = Facebook;
87
+ TargetAttributes = {
88
+ 58B511DA1A9E6C8500147676 = {
89
+ CreatedOnToolsVersion = 6.1.1;
90
+ };
91
+ };
92
+ };
93
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "MoEReactGeofence" */;
94
+ compatibilityVersion = "Xcode 3.2";
95
+ developmentRegion = English;
96
+ hasScannedForEncodings = 0;
97
+ knownRegions = (
98
+ English,
99
+ en,
100
+ );
101
+ mainGroup = 58B511D21A9E6C8500147676;
102
+ productRefGroup = 58B511D21A9E6C8500147676;
103
+ projectDirPath = "";
104
+ projectRoot = "";
105
+ targets = (
106
+ 58B511DA1A9E6C8500147676 /* MoEReactGeofence */,
107
+ );
108
+ };
109
+ /* End PBXProject section */
110
+
111
+ /* Begin PBXSourcesBuildPhase section */
112
+ 58B511D71A9E6C8500147676 /* Sources */ = {
113
+ isa = PBXSourcesBuildPhase;
114
+ buildActionMask = 2147483647;
115
+ files = (
116
+ ACD518BF28ACAE130014B432 /* MoEReactGeofence.m in Sources */,
117
+ );
118
+ runOnlyForDeploymentPostprocessing = 0;
119
+ };
120
+ /* End PBXSourcesBuildPhase section */
121
+
122
+ /* Begin XCBuildConfiguration section */
123
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
124
+ isa = XCBuildConfiguration;
125
+ buildSettings = {
126
+ ALWAYS_SEARCH_USER_PATHS = NO;
127
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
128
+ CLANG_CXX_LIBRARY = "libc++";
129
+ CLANG_ENABLE_MODULES = YES;
130
+ CLANG_ENABLE_OBJC_ARC = YES;
131
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
132
+ CLANG_WARN_BOOL_CONVERSION = YES;
133
+ CLANG_WARN_COMMA = YES;
134
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
135
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
136
+ CLANG_WARN_EMPTY_BODY = YES;
137
+ CLANG_WARN_ENUM_CONVERSION = YES;
138
+ CLANG_WARN_INFINITE_RECURSION = YES;
139
+ CLANG_WARN_INT_CONVERSION = YES;
140
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
141
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
142
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
143
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
144
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
145
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
146
+ CLANG_WARN_UNREACHABLE_CODE = YES;
147
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
148
+ COPY_PHASE_STRIP = NO;
149
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
150
+ ENABLE_TESTABILITY = YES;
151
+ GCC_C_LANGUAGE_STANDARD = gnu99;
152
+ GCC_DYNAMIC_NO_PIC = NO;
153
+ GCC_NO_COMMON_BLOCKS = YES;
154
+ GCC_OPTIMIZATION_LEVEL = 0;
155
+ GCC_PREPROCESSOR_DEFINITIONS = (
156
+ "DEBUG=1",
157
+ "$(inherited)",
158
+ );
159
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
160
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
161
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
162
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
163
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
164
+ GCC_WARN_UNUSED_FUNCTION = YES;
165
+ GCC_WARN_UNUSED_VARIABLE = YES;
166
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
167
+ MTL_ENABLE_DEBUG_INFO = YES;
168
+ ONLY_ACTIVE_ARCH = YES;
169
+ SDKROOT = iphoneos;
170
+ };
171
+ name = Debug;
172
+ };
173
+ 58B511EE1A9E6C8500147676 /* Release */ = {
174
+ isa = XCBuildConfiguration;
175
+ buildSettings = {
176
+ ALWAYS_SEARCH_USER_PATHS = NO;
177
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
178
+ CLANG_CXX_LIBRARY = "libc++";
179
+ CLANG_ENABLE_MODULES = YES;
180
+ CLANG_ENABLE_OBJC_ARC = YES;
181
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
182
+ CLANG_WARN_BOOL_CONVERSION = YES;
183
+ CLANG_WARN_COMMA = YES;
184
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
185
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
186
+ CLANG_WARN_EMPTY_BODY = YES;
187
+ CLANG_WARN_ENUM_CONVERSION = YES;
188
+ CLANG_WARN_INFINITE_RECURSION = YES;
189
+ CLANG_WARN_INT_CONVERSION = YES;
190
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
191
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
192
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
193
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
194
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
195
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
196
+ CLANG_WARN_UNREACHABLE_CODE = YES;
197
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
198
+ COPY_PHASE_STRIP = YES;
199
+ ENABLE_NS_ASSERTIONS = NO;
200
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
201
+ GCC_C_LANGUAGE_STANDARD = gnu99;
202
+ GCC_NO_COMMON_BLOCKS = YES;
203
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
204
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
205
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
206
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
207
+ GCC_WARN_UNUSED_FUNCTION = YES;
208
+ GCC_WARN_UNUSED_VARIABLE = YES;
209
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
210
+ MTL_ENABLE_DEBUG_INFO = NO;
211
+ SDKROOT = iphoneos;
212
+ VALIDATE_PRODUCT = YES;
213
+ };
214
+ name = Release;
215
+ };
216
+ 58B511F01A9E6C8500147676 /* Debug */ = {
217
+ isa = XCBuildConfiguration;
218
+ buildSettings = {
219
+ HEADER_SEARCH_PATHS = (
220
+ "$(inherited)",
221
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
222
+ "$(SRCROOT)/../../../React/**",
223
+ "$(SRCROOT)/../../react-native/React/**",
224
+ );
225
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
226
+ OTHER_LDFLAGS = "-ObjC";
227
+ PRODUCT_NAME = MoEReactGeofence;
228
+ SKIP_INSTALL = YES;
229
+ };
230
+ name = Debug;
231
+ };
232
+ 58B511F11A9E6C8500147676 /* Release */ = {
233
+ isa = XCBuildConfiguration;
234
+ buildSettings = {
235
+ HEADER_SEARCH_PATHS = (
236
+ "$(inherited)",
237
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
238
+ "$(SRCROOT)/../../../React/**",
239
+ "$(SRCROOT)/../../react-native/React/**",
240
+ );
241
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
242
+ OTHER_LDFLAGS = "-ObjC";
243
+ PRODUCT_NAME = MoEReactGeofence;
244
+ SKIP_INSTALL = YES;
245
+ };
246
+ name = Release;
247
+ };
248
+ /* End XCBuildConfiguration section */
249
+
250
+ /* Begin XCConfigurationList section */
251
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "MoEReactGeofence" */ = {
252
+ isa = XCConfigurationList;
253
+ buildConfigurations = (
254
+ 58B511ED1A9E6C8500147676 /* Debug */,
255
+ 58B511EE1A9E6C8500147676 /* Release */,
256
+ );
257
+ defaultConfigurationIsVisible = 0;
258
+ defaultConfigurationName = Release;
259
+ };
260
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "MoEReactGeofence" */ = {
261
+ isa = XCConfigurationList;
262
+ buildConfigurations = (
263
+ 58B511F01A9E6C8500147676 /* Debug */,
264
+ 58B511F11A9E6C8500147676 /* Release */,
265
+ );
266
+ defaultConfigurationIsVisible = 0;
267
+ defaultConfigurationName = Release;
268
+ };
269
+ /* End XCConfigurationList section */
270
+ };
271
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
272
+ }
package/index.ts CHANGED
@@ -1 +1,20 @@
1
- // MoEngage Geofence support for iOS platform
1
+ import { Platform } from "react-native";
2
+ import { getAppIdJson } from "../react-native-moengage/src/utils/MoEJsonBuilder";
3
+
4
+
5
+ const PLATFORM_iOS = "ios";
6
+ const MoEGeofenceBridge = require("react-native").NativeModules.MoEReactGeofence;
7
+
8
+ var ReactMoEGeofence = {
9
+ /**
10
+ * Call this method to start Geofence tracking, this method also asks for location permission if not already done
11
+ */
12
+
13
+ startGeofenceMonitoring: function (appId: string) {
14
+ if (Platform.OS == PLATFORM_iOS) {
15
+ MoEGeofenceBridge.startGeofenceMonitoring(getAppIdJson(appId));
16
+ }
17
+ },
18
+ }
19
+
20
+ export default ReactMoEGeofence;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-moengage-geofence",
3
- "version": "2.2.0",
3
+ "version": "3.0.0",
4
4
  "description": "MoEngage React Native package to support geofence based campaigns in iOS platform",
5
5
  "main": "index.ts",
6
6
  "keywords": [