react-native-moengage-cards 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.
Files changed (59) hide show
  1. package/README.md +10 -0
  2. package/ReactNativeMoEngageCards.podspec +25 -0
  3. package/android/.editorconfig +8 -0
  4. package/android/build.gradle +58 -0
  5. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  6. package/android/gradle/wrapper/gradle-wrapper.properties +18 -0
  7. package/android/gradle.properties +14 -0
  8. package/android/gradlew +234 -0
  9. package/android/gradlew.bat +89 -0
  10. package/android/src/main/AndroidManifest.xml +16 -0
  11. package/android/src/main/java/com/moengage/react/cards/Constants.kt +12 -0
  12. package/android/src/main/java/com/moengage/react/cards/EventEmitterImpl.kt +62 -0
  13. package/android/src/main/java/com/moengage/react/cards/MoEngageCardsBridge.kt +228 -0
  14. package/android/src/main/java/com/moengage/react/cards/MoEngageCardsPackage.kt +35 -0
  15. package/android/src/main/java/com/moengage/react/cards/PayloadGenerator.kt +26 -0
  16. package/ios/Cards.xcodeproj/project.pbxproj +302 -0
  17. package/ios/Cards.xcworkspace/contents.xcworkspacedata +7 -0
  18. package/ios/Cards.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  19. package/ios/MoEngageCardsBridge.h +9 -0
  20. package/ios/MoEngageCardsBridge.m +149 -0
  21. package/ios/MoEngageCardsReactConstants.h +14 -0
  22. package/ios/MoEngageCardsReactConstants.m +15 -0
  23. package/ios/MoEngageCardsReactUtil.h +15 -0
  24. package/ios/MoEngageCardsReactUtil.m +44 -0
  25. package/package.json +42 -0
  26. package/src/ReactMoEngageCards.ts +212 -0
  27. package/src/index.ts +58 -0
  28. package/src/internal/Constants.ts +86 -0
  29. package/src/internal/MoEngageCardHandler.ts +265 -0
  30. package/src/internal/MoEngageCardsCache.ts +31 -0
  31. package/src/internal/utils/JsonToModelMapper.ts +267 -0
  32. package/src/internal/utils/ModelToJsonMapper.ts +250 -0
  33. package/src/internal/utils/PayloadBuilder.ts +68 -0
  34. package/src/internal/utils/PayloadParser.ts +53 -0
  35. package/src/internal/utils/PlatformPayloadBuilder.ts +81 -0
  36. package/src/internal/utils/Util.ts +16 -0
  37. package/src/model/CampaignState.ts +54 -0
  38. package/src/model/Card.ts +51 -0
  39. package/src/model/CardInfo.ts +36 -0
  40. package/src/model/CardsData.ts +29 -0
  41. package/src/model/Container.ts +59 -0
  42. package/src/model/DisplayControl.ts +70 -0
  43. package/src/model/MetaData.ts +90 -0
  44. package/src/model/ShowTime.ts +27 -0
  45. package/src/model/SyncData.ts +30 -0
  46. package/src/model/Template.ts +37 -0
  47. package/src/model/Widget.ts +59 -0
  48. package/src/model/action/Action.ts +22 -0
  49. package/src/model/action/NavigationAction.ts +39 -0
  50. package/src/model/enums/ActionType.ts +16 -0
  51. package/src/model/enums/NavigationType.ts +28 -0
  52. package/src/model/enums/SyncType.ts +28 -0
  53. package/src/model/enums/TemplateType.ts +22 -0
  54. package/src/model/enums/WidgetType.ts +28 -0
  55. package/src/model/styles/ButtonStyle.ts +23 -0
  56. package/src/model/styles/ContainerStyle.ts +20 -0
  57. package/src/model/styles/ImageStyle.ts +16 -0
  58. package/src/model/styles/TextStyle.ts +19 -0
  59. package/src/model/styles/WidgetStyle.ts +19 -0
@@ -0,0 +1,228 @@
1
+ /*
2
+ * Copyright (c) 2014-2023 MoEngage Inc.
3
+ *
4
+ * All rights reserved.
5
+ *
6
+ * Use of source code or binaries contained within MoEngage SDK is permitted only to enable use of the MoEngage platform by customers of MoEngage.
7
+ * Modification of source code and inclusion in mobile apps is explicitly allowed provided that all other conditions are met.
8
+ * Neither the name of MoEngage nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
+ * Redistribution of source code or binaries is disallowed except with specific prior written permission. Any such redistribution must retain the above copyright notice, this list of conditions and the following disclaimer.
10
+ *
11
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12
+ */
13
+
14
+ package com.moengage.react.cards
15
+
16
+ import android.content.Context
17
+ import com.facebook.react.bridge.Promise
18
+ import com.facebook.react.bridge.ReactApplicationContext
19
+ import com.facebook.react.bridge.ReactContextBaseJavaModule
20
+ import com.facebook.react.bridge.ReactMethod
21
+ import com.moengage.core.LogLevel
22
+ import com.moengage.core.internal.logger.Logger
23
+ import com.moengage.plugin.base.cards.CardsPluginHelper
24
+ import com.moengage.plugin.base.cards.internal.cardListToJson
25
+ import com.moengage.plugin.base.cards.internal.setCardsEventEmitter
26
+ import org.json.JSONObject
27
+
28
+ /**
29
+ * Bridge to communicate with React-Native Cards Plugin
30
+ *
31
+ * @author Abhishek Kumar
32
+ * @since 1.0.0
33
+ */
34
+ class MoEngageCardsBridge(private val reactContext: ReactApplicationContext) :
35
+ ReactContextBaseJavaModule(reactContext) {
36
+
37
+ private val tag = "${MODULE_TAG}MoEngageCardsBridge"
38
+
39
+ private val context: Context = reactContext.applicationContext
40
+ private val cardsPluginHelper = CardsPluginHelper()
41
+
42
+ override fun getName(): String {
43
+ return "MoEngageCardsBridge"
44
+ }
45
+
46
+ @ReactMethod
47
+ fun addListener(eventName: String) {
48
+ // Keep: Required for RN built in Event Emitter Calls.
49
+ }
50
+
51
+ @ReactMethod
52
+ fun removeListeners(count: Int) {
53
+ // Keep: Required for RN built in Event Emitter Calls.
54
+ }
55
+
56
+ @ReactMethod
57
+ fun initialize(payload: String) {
58
+ try {
59
+ Logger.print { "$tag initialize() : $payload" }
60
+ setCardsEventEmitter(EventEmitterImpl(reactContext))
61
+ cardsPluginHelper.initialise(payload)
62
+ } catch (t: Throwable) {
63
+ Logger.print(LogLevel.ERROR, t) { "$tag initialize() : " }
64
+ }
65
+ }
66
+
67
+ @ReactMethod
68
+ fun refreshCards(payload: String) {
69
+ try {
70
+ Logger.print { "$tag refreshCards() : $payload" }
71
+ cardsPluginHelper.refreshCards(context, payload)
72
+ } catch (t: Throwable) {
73
+ Logger.print(LogLevel.ERROR, t) { "$tag refreshCards() : " }
74
+ }
75
+ }
76
+
77
+ @ReactMethod
78
+ fun onCardSectionLoaded(payload: String) {
79
+ try {
80
+ Logger.print { "$tag onCardSectionLoaded() : $payload" }
81
+ cardsPluginHelper.onCardSectionLoaded(context, payload)
82
+ } catch (t: Throwable) {
83
+ Logger.print(LogLevel.ERROR, t) { "$tag onCardSectionLoaded() : " }
84
+ }
85
+ }
86
+
87
+ @ReactMethod
88
+ fun onCardSectionUnLoaded(payload: String) {
89
+ try {
90
+ Logger.print { "$tag onCardSectionUnLoaded() : $payload" }
91
+ cardsPluginHelper.onCardSectionUnLoaded(context, payload)
92
+ } catch (t: Throwable) {
93
+ Logger.print(LogLevel.ERROR, t) { "$tag onCardSectionUnLoaded() : " }
94
+ }
95
+ }
96
+
97
+ @ReactMethod
98
+ fun getCardsCategories(payload: String, promise: Promise) {
99
+ try {
100
+ Logger.print { "$tag getCardsCategories() : $payload" }
101
+ val categories = cardsPluginHelper.getCardsCategories(context, payload)
102
+ promise.resolve(categories)
103
+ } catch (t: Throwable) {
104
+ Logger.print(LogLevel.ERROR, t) { "$tag getCardsCategories() : " }
105
+ promise.reject(t)
106
+ }
107
+ }
108
+
109
+ @ReactMethod
110
+ fun getCardsInfo(payload: String, promise: Promise) {
111
+ try {
112
+ Logger.print { "$tag getCardsInfo() : $payload" }
113
+ val cardsInfo = cardsPluginHelper.getCardsInfo(context, payload)
114
+ promise.resolve(cardsInfo)
115
+ } catch (t: Throwable) {
116
+ Logger.print(LogLevel.ERROR, t) { "$tag getCardsInfo() : " }
117
+ promise.reject(t)
118
+ }
119
+ }
120
+
121
+ @ReactMethod
122
+ fun cardClicked(payload: String) {
123
+ try {
124
+ Logger.print { "$tag cardClicked() : $payload" }
125
+ cardsPluginHelper.cardClicked(context, payload)
126
+ } catch (t: Throwable) {
127
+ Logger.print(LogLevel.ERROR, t) { "$tag cardClicked() : " }
128
+ }
129
+ }
130
+
131
+ @ReactMethod
132
+ fun cardDelivered(payload: String) {
133
+ try {
134
+ Logger.print { "$tag cardDelivered() : $payload" }
135
+ cardsPluginHelper.cardDelivered(context, payload)
136
+ } catch (t: Throwable) {
137
+ Logger.print(LogLevel.ERROR, t) { "$tag cardDelivered() : " }
138
+ }
139
+ }
140
+
141
+ @ReactMethod
142
+ fun cardShown(payload: String) {
143
+ try {
144
+ Logger.print { "$tag cardShown() : $payload" }
145
+ cardsPluginHelper.cardShown(context, payload)
146
+ } catch (t: Throwable) {
147
+ Logger.print(LogLevel.ERROR, t) { "$tag cardShown() : " }
148
+ }
149
+ }
150
+
151
+ @ReactMethod
152
+ fun getCardsForCategory(payload: String, promise: Promise) {
153
+ try {
154
+ Logger.print { "$tag getCardsForCategory() : $payload" }
155
+ val cards = cardsPluginHelper.getCardsForCategory(context, payload)
156
+ promise.resolve(cards)
157
+ } catch (t: Throwable) {
158
+ Logger.print(LogLevel.ERROR, t) { "$tag getCardsForCategory() : " }
159
+ promise.reject(t)
160
+ }
161
+ }
162
+
163
+ @ReactMethod
164
+ fun deleteCards(payload: String) {
165
+ try {
166
+ Logger.print { "$tag deleteCards() : $payload" }
167
+ cardsPluginHelper.deleteCards(context, payload)
168
+ } catch (t: Throwable) {
169
+ Logger.print(LogLevel.ERROR, t) { "$tag deleteCards() : " }
170
+ }
171
+ }
172
+
173
+ @ReactMethod
174
+ fun isAllCategoryEnabled(payload: String, promise: Promise) {
175
+ try {
176
+ Logger.print { "$tag isAllCategoryEnabled() : $payload" }
177
+ val isAllCategoryEnabled = cardsPluginHelper.isAllCategoryEnabled(context, payload)
178
+ promise.resolve(isAllCategoryEnabled)
179
+ } catch (t: Throwable) {
180
+ Logger.print(LogLevel.ERROR, t) { "$tag isAllCategoryEnabled() : " }
181
+ promise.reject(t)
182
+ }
183
+ }
184
+
185
+ @ReactMethod
186
+ fun getNewCardsCount(payload: String, promise: Promise) {
187
+ try {
188
+ Logger.print { "$tag getNewCardsCount() : $payload" }
189
+ val newCardsCountResult = cardsPluginHelper.getNewCardsCount(context, payload)
190
+ promise.resolve(newCardsCountResult)
191
+ } catch (t: Throwable) {
192
+ Logger.print(LogLevel.ERROR, t) { "$tag getNewCardsCount() : " }
193
+ promise.reject(t)
194
+ }
195
+ }
196
+
197
+ @ReactMethod
198
+ fun getUnClickedCardsCount(payload: String, promise: Promise) {
199
+ try {
200
+ Logger.print { "$tag getUnClickedCardsCount() : $payload" }
201
+ val unClickedCardsCount = cardsPluginHelper.getUnClickedCardsCount(context, payload)
202
+ promise.resolve(unClickedCardsCount)
203
+ } catch (t: Throwable) {
204
+ Logger.print(LogLevel.ERROR, t) { "$tag getUnClickedCardsCount() : " }
205
+ promise.reject(t)
206
+ }
207
+ }
208
+
209
+ @ReactMethod
210
+ fun fetchCards(payload: String, promise: Promise) {
211
+ try {
212
+ Logger.print { "$tag fetchCards() : $payload" }
213
+ val accountMetaPayload = JSONObject(payload)
214
+ cardsPluginHelper.fetchCards(context, payload) { cardsData ->
215
+ val response = JSONObject()
216
+ response.put(ARGUMENT_ACCOUNT_META, accountMetaPayload)
217
+ val cardData = JSONObject()
218
+ cardData.put(ARGUMENT_CARDS, cardListToJson(cardsData?.cards ?: emptyList()))
219
+ response.put(ARGUMENT_DATA, cardData)
220
+
221
+ promise.resolve(response.toString())
222
+ }
223
+ } catch (t: Throwable) {
224
+ Logger.print(LogLevel.ERROR, t) { "$tag fetchCards() : " }
225
+ promise.reject(t)
226
+ }
227
+ }
228
+ }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Copyright (c) 2014-2023 MoEngage Inc.
3
+ *
4
+ * All rights reserved.
5
+ *
6
+ * Use of source code or binaries contained within MoEngage SDK is permitted only to enable use of the MoEngage platform by customers of MoEngage.
7
+ * Modification of source code and inclusion in mobile apps is explicitly allowed provided that all other conditions are met.
8
+ * Neither the name of MoEngage nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
+ * Redistribution of source code or binaries is disallowed except with specific prior written permission. Any such redistribution must retain the above copyright notice, this list of conditions and the following disclaimer.
10
+ *
11
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12
+ */
13
+
14
+ package com.moengage.react.cards
15
+
16
+ import com.facebook.react.ReactPackage
17
+ import com.facebook.react.bridge.NativeModule
18
+ import com.facebook.react.bridge.ReactApplicationContext
19
+ import com.facebook.react.uimanager.ViewManager
20
+
21
+ /**
22
+ * MoEngage Card Plugin React-Native Package
23
+ *
24
+ * @author Abhishek Kumar
25
+ * @since 1.0.0
26
+ */
27
+ class MoEngageCardsPackage : ReactPackage {
28
+ override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
29
+ return listOf(MoEngageCardsBridge(reactContext))
30
+ }
31
+
32
+ override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
33
+ return emptyList()
34
+ }
35
+ }
@@ -0,0 +1,26 @@
1
+ package com.moengage.react.cards
2
+
3
+ import com.facebook.react.bridge.Arguments
4
+ import com.facebook.react.bridge.WritableMap
5
+ import com.moengage.core.internal.logger.Logger
6
+ import com.moengage.plugin.base.cards.internal.cardsSyncToJson
7
+ import com.moengage.plugin.base.cards.internal.model.events.CardsSyncEvent
8
+
9
+ /**
10
+ * Generate the payload to communicate with React-Native Cards Plugin
11
+ *
12
+ * @author Abhishek Kumar
13
+ * @since 1.0.0
14
+ */
15
+ internal class PayloadGenerator {
16
+
17
+ private val tag = "${MODULE_TAG}PayloadGenerator"
18
+
19
+ fun cardsSyncToWritableMap(event: CardsSyncEvent): WritableMap {
20
+ val map = Arguments.createMap()
21
+ val syncCompleteJson = cardsSyncToJson(event.syncCompleteData, event.accountMeta)
22
+ Logger.print { "$tag cardsSyncToWritableMap() : $event" }
23
+ map.putString(ARGUMENT_PAYLOAD, syncCompleteJson.toString())
24
+ return map
25
+ }
26
+ }
@@ -0,0 +1,302 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ ACED38332A84DE1400E30AB2 /* MoEngageCardsReactConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = ACED382F2A84DE1400E30AB2 /* MoEngageCardsReactConstants.m */; };
11
+ ACED38342A84DE1400E30AB2 /* MoEngageCardsReactUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = ACED38302A84DE1400E30AB2 /* MoEngageCardsReactUtil.m */; };
12
+ ACED38362A84DE4100E30AB2 /* MoEngageCardsBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = ACED38352A84DE4100E30AB2 /* MoEngageCardsBridge.m */; };
13
+ /* End PBXBuildFile section */
14
+
15
+ /* Begin PBXCopyFilesBuildPhase section */
16
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
17
+ isa = PBXCopyFilesBuildPhase;
18
+ buildActionMask = 2147483647;
19
+ dstPath = "include/$(PRODUCT_NAME)";
20
+ dstSubfolderSpec = 16;
21
+ files = (
22
+ );
23
+ runOnlyForDeploymentPostprocessing = 0;
24
+ };
25
+ /* End PBXCopyFilesBuildPhase section */
26
+
27
+ /* Begin PBXFileReference section */
28
+ 134814201AA4EA6300B7C361 /* libCards.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCards.a; sourceTree = BUILT_PRODUCTS_DIR; };
29
+ ACED382F2A84DE1400E30AB2 /* MoEngageCardsReactConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoEngageCardsReactConstants.m; sourceTree = "<group>"; };
30
+ ACED38302A84DE1400E30AB2 /* MoEngageCardsReactUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoEngageCardsReactUtil.m; sourceTree = "<group>"; };
31
+ ACED38312A84DE1400E30AB2 /* MoEngageCardsReactUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoEngageCardsReactUtil.h; sourceTree = "<group>"; };
32
+ ACED38322A84DE1400E30AB2 /* MoEngageCardsReactConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoEngageCardsReactConstants.h; sourceTree = "<group>"; };
33
+ ACED38352A84DE4100E30AB2 /* MoEngageCardsBridge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MoEngageCardsBridge.m; sourceTree = "<group>"; };
34
+ ACED38372A84DE4E00E30AB2 /* MoEngageCardsBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoEngageCardsBridge.h; sourceTree = "<group>"; };
35
+ /* End PBXFileReference section */
36
+
37
+ /* Begin PBXFrameworksBuildPhase section */
38
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
39
+ isa = PBXFrameworksBuildPhase;
40
+ buildActionMask = 2147483647;
41
+ files = (
42
+ );
43
+ runOnlyForDeploymentPostprocessing = 0;
44
+ };
45
+ /* End PBXFrameworksBuildPhase section */
46
+
47
+ /* Begin PBXGroup section */
48
+ 134814211AA4EA7D00B7C361 /* Products */ = {
49
+ isa = PBXGroup;
50
+ children = (
51
+ 134814201AA4EA6300B7C361 /* libCards.a */,
52
+ );
53
+ name = Products;
54
+ sourceTree = "<group>";
55
+ };
56
+ 58B511D21A9E6C8500147676 = {
57
+ isa = PBXGroup;
58
+ children = (
59
+ ACED38372A84DE4E00E30AB2 /* MoEngageCardsBridge.h */,
60
+ ACED38352A84DE4100E30AB2 /* MoEngageCardsBridge.m */,
61
+ ACED38322A84DE1400E30AB2 /* MoEngageCardsReactConstants.h */,
62
+ ACED382F2A84DE1400E30AB2 /* MoEngageCardsReactConstants.m */,
63
+ ACED38312A84DE1400E30AB2 /* MoEngageCardsReactUtil.h */,
64
+ ACED38302A84DE1400E30AB2 /* MoEngageCardsReactUtil.m */,
65
+ 134814211AA4EA7D00B7C361 /* Products */,
66
+ );
67
+ sourceTree = "<group>";
68
+ };
69
+ /* End PBXGroup section */
70
+
71
+ /* Begin PBXNativeTarget section */
72
+ 58B511DA1A9E6C8500147676 /* Cards */ = {
73
+ isa = PBXNativeTarget;
74
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Cards" */;
75
+ buildPhases = (
76
+ 58B511D71A9E6C8500147676 /* Sources */,
77
+ 58B511D81A9E6C8500147676 /* Frameworks */,
78
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
79
+ );
80
+ buildRules = (
81
+ );
82
+ dependencies = (
83
+ );
84
+ name = Cards;
85
+ productName = RCTDataManager;
86
+ productReference = 134814201AA4EA6300B7C361 /* libCards.a */;
87
+ productType = "com.apple.product-type.library.static";
88
+ };
89
+ /* End PBXNativeTarget section */
90
+
91
+ /* Begin PBXProject section */
92
+ 58B511D31A9E6C8500147676 /* Project object */ = {
93
+ isa = PBXProject;
94
+ attributes = {
95
+ LastUpgradeCheck = 0920;
96
+ ORGANIZATIONNAME = Facebook;
97
+ TargetAttributes = {
98
+ 58B511DA1A9E6C8500147676 = {
99
+ CreatedOnToolsVersion = 6.1.1;
100
+ };
101
+ };
102
+ };
103
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "Cards" */;
104
+ compatibilityVersion = "Xcode 3.2";
105
+ developmentRegion = en;
106
+ hasScannedForEncodings = 0;
107
+ knownRegions = (
108
+ en,
109
+ Base,
110
+ );
111
+ mainGroup = 58B511D21A9E6C8500147676;
112
+ productRefGroup = 58B511D21A9E6C8500147676;
113
+ projectDirPath = "";
114
+ projectRoot = "";
115
+ targets = (
116
+ 58B511DA1A9E6C8500147676 /* Cards */,
117
+ );
118
+ };
119
+ /* End PBXProject section */
120
+
121
+ /* Begin PBXSourcesBuildPhase section */
122
+ 58B511D71A9E6C8500147676 /* Sources */ = {
123
+ isa = PBXSourcesBuildPhase;
124
+ buildActionMask = 2147483647;
125
+ files = (
126
+ ACED38342A84DE1400E30AB2 /* MoEngageCardsReactUtil.m in Sources */,
127
+ ACED38332A84DE1400E30AB2 /* MoEngageCardsReactConstants.m in Sources */,
128
+ ACED38362A84DE4100E30AB2 /* MoEngageCardsBridge.m in Sources */,
129
+ );
130
+ runOnlyForDeploymentPostprocessing = 0;
131
+ };
132
+ /* End PBXSourcesBuildPhase section */
133
+
134
+ /* Begin XCBuildConfiguration section */
135
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
136
+ isa = XCBuildConfiguration;
137
+ buildSettings = {
138
+ ALWAYS_SEARCH_USER_PATHS = NO;
139
+ CLANG_ANALYZER_NONNULL = YES;
140
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
141
+ CLANG_CXX_LIBRARY = "libc++";
142
+ CLANG_ENABLE_MODULES = YES;
143
+ CLANG_ENABLE_OBJC_ARC = YES;
144
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
145
+ CLANG_WARN_BOOL_CONVERSION = YES;
146
+ CLANG_WARN_COMMA = YES;
147
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
148
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
149
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
150
+ CLANG_WARN_EMPTY_BODY = YES;
151
+ CLANG_WARN_ENUM_CONVERSION = YES;
152
+ CLANG_WARN_INFINITE_RECURSION = YES;
153
+ CLANG_WARN_INT_CONVERSION = YES;
154
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
155
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
156
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
157
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
158
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
159
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
160
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
161
+ CLANG_WARN_UNREACHABLE_CODE = YES;
162
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
163
+ COPY_PHASE_STRIP = NO;
164
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
165
+ ENABLE_TESTABILITY = YES;
166
+ GCC_C_LANGUAGE_STANDARD = gnu99;
167
+ GCC_DYNAMIC_NO_PIC = NO;
168
+ GCC_NO_COMMON_BLOCKS = YES;
169
+ GCC_OPTIMIZATION_LEVEL = 0;
170
+ GCC_PREPROCESSOR_DEFINITIONS = (
171
+ "DEBUG=1",
172
+ "$(inherited)",
173
+ );
174
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
175
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
176
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
177
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
178
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
179
+ GCC_WARN_UNUSED_FUNCTION = YES;
180
+ GCC_WARN_UNUSED_VARIABLE = YES;
181
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
182
+ LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
183
+ LIBRARY_SEARCH_PATHS = (
184
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
185
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
186
+ "\"$(inherited)\"",
187
+ );
188
+ MTL_ENABLE_DEBUG_INFO = YES;
189
+ ONLY_ACTIVE_ARCH = YES;
190
+ SDKROOT = iphoneos;
191
+ };
192
+ name = Debug;
193
+ };
194
+ 58B511EE1A9E6C8500147676 /* Release */ = {
195
+ isa = XCBuildConfiguration;
196
+ buildSettings = {
197
+ ALWAYS_SEARCH_USER_PATHS = NO;
198
+ CLANG_ANALYZER_NONNULL = YES;
199
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
200
+ CLANG_CXX_LIBRARY = "libc++";
201
+ CLANG_ENABLE_MODULES = YES;
202
+ CLANG_ENABLE_OBJC_ARC = YES;
203
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
204
+ CLANG_WARN_BOOL_CONVERSION = YES;
205
+ CLANG_WARN_COMMA = YES;
206
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
207
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
208
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
209
+ CLANG_WARN_EMPTY_BODY = YES;
210
+ CLANG_WARN_ENUM_CONVERSION = YES;
211
+ CLANG_WARN_INFINITE_RECURSION = YES;
212
+ CLANG_WARN_INT_CONVERSION = YES;
213
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
214
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
215
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
216
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
217
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
218
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
219
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
220
+ CLANG_WARN_UNREACHABLE_CODE = YES;
221
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
222
+ COPY_PHASE_STRIP = YES;
223
+ ENABLE_NS_ASSERTIONS = NO;
224
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
225
+ GCC_C_LANGUAGE_STANDARD = gnu99;
226
+ GCC_NO_COMMON_BLOCKS = YES;
227
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
228
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
229
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
230
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
231
+ GCC_WARN_UNUSED_FUNCTION = YES;
232
+ GCC_WARN_UNUSED_VARIABLE = YES;
233
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
234
+ LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
235
+ LIBRARY_SEARCH_PATHS = (
236
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
237
+ "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
238
+ "\"$(inherited)\"",
239
+ );
240
+ MTL_ENABLE_DEBUG_INFO = NO;
241
+ SDKROOT = iphoneos;
242
+ VALIDATE_PRODUCT = YES;
243
+ };
244
+ name = Release;
245
+ };
246
+ 58B511F01A9E6C8500147676 /* Debug */ = {
247
+ isa = XCBuildConfiguration;
248
+ buildSettings = {
249
+ HEADER_SEARCH_PATHS = (
250
+ "$(inherited)",
251
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
252
+ "$(SRCROOT)/../../../React/**",
253
+ "$(SRCROOT)/../../react-native/React/**",
254
+ );
255
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
256
+ OTHER_LDFLAGS = "-ObjC";
257
+ PRODUCT_NAME = Cards;
258
+ SKIP_INSTALL = YES;
259
+ };
260
+ name = Debug;
261
+ };
262
+ 58B511F11A9E6C8500147676 /* Release */ = {
263
+ isa = XCBuildConfiguration;
264
+ buildSettings = {
265
+ HEADER_SEARCH_PATHS = (
266
+ "$(inherited)",
267
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
268
+ "$(SRCROOT)/../../../React/**",
269
+ "$(SRCROOT)/../../react-native/React/**",
270
+ );
271
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
272
+ OTHER_LDFLAGS = "-ObjC";
273
+ PRODUCT_NAME = Cards;
274
+ SKIP_INSTALL = YES;
275
+ };
276
+ name = Release;
277
+ };
278
+ /* End XCBuildConfiguration section */
279
+
280
+ /* Begin XCConfigurationList section */
281
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "Cards" */ = {
282
+ isa = XCConfigurationList;
283
+ buildConfigurations = (
284
+ 58B511ED1A9E6C8500147676 /* Debug */,
285
+ 58B511EE1A9E6C8500147676 /* Release */,
286
+ );
287
+ defaultConfigurationIsVisible = 0;
288
+ defaultConfigurationName = Release;
289
+ };
290
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "Cards" */ = {
291
+ isa = XCConfigurationList;
292
+ buildConfigurations = (
293
+ 58B511F01A9E6C8500147676 /* Debug */,
294
+ 58B511F11A9E6C8500147676 /* Release */,
295
+ );
296
+ defaultConfigurationIsVisible = 0;
297
+ defaultConfigurationName = Release;
298
+ };
299
+ /* End XCConfigurationList section */
300
+ };
301
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
302
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:Cards.xcodeproj">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
@@ -0,0 +1,9 @@
1
+ // MoEngageCardsBridge.h
2
+
3
+ #import <React/RCTBridgeModule.h>
4
+ #import <React/RCTEventEmitter.h>
5
+
6
+ @import MoEngagePluginCards;
7
+
8
+ @interface MoEngageCardsBridge : RCTEventEmitter <RCTBridgeModule>
9
+ @end