Skip to content

Commit 0f3133e

Browse files
fix: fixed an issue preventing the global cmp PM from loading on iOS
1 parent 5cd8345 commit 0f3133e

File tree

4 files changed

+30
-11
lines changed

4 files changed

+30
-11
lines changed

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ PODS:
16591659
- React-logger (= 0.79.2)
16601660
- React-perflogger (= 0.79.2)
16611661
- React-utils (= 0.79.2)
1662-
- ReactNativeCmp (0.4.0):
1662+
- ReactNativeCmp (1.0.0):
16631663
- ConsentViewController (= 7.10.0)
16641664
- DoubleConversion
16651665
- glog
@@ -1989,7 +1989,7 @@ SPEC CHECKSUMS:
19891989
ReactAppDependencyProvider: 04d5eb15eb46be6720e17a4a7fa92940a776e584
19901990
ReactCodegen: c63eda03ba1d94353fb97b031fc84f75a0d125ba
19911991
ReactCommon: 76d2dc87136d0a667678668b86f0fca0c16fdeb0
1992-
ReactNativeCmp: 8b82f8fb93ddda0d404109bf5400980904234174
1992+
ReactNativeCmp: dd8f9f3e203c312712d937263fdc16e7bd1ba3d7
19931993
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
19941994
SPMobileCore: c3bfa7dacf26f6101900afa096a9b945a89f726a
19951995
Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf

example/ios/ReactNativeCmpExample.xcodeproj/project.pbxproj

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,14 @@
213213
inputFileListPaths = (
214214
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeCmpExample/Pods-ReactNativeCmpExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
215215
);
216+
inputPaths = (
217+
);
216218
name = "[CP] Embed Pods Frameworks";
217219
outputFileListPaths = (
218220
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeCmpExample/Pods-ReactNativeCmpExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
219221
);
222+
outputPaths = (
223+
);
220224
runOnlyForDeploymentPostprocessing = 0;
221225
shellPath = /bin/sh;
222226
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeCmpExample/Pods-ReactNativeCmpExample-frameworks.sh\"\n";
@@ -230,10 +234,14 @@
230234
inputFileListPaths = (
231235
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeCmpExample/Pods-ReactNativeCmpExample-resources-${CONFIGURATION}-input-files.xcfilelist",
232236
);
237+
inputPaths = (
238+
);
233239
name = "[CP] Copy Pods Resources";
234240
outputFileListPaths = (
235241
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeCmpExample/Pods-ReactNativeCmpExample-resources-${CONFIGURATION}-output-files.xcfilelist",
236242
);
243+
outputPaths = (
244+
);
237245
runOnlyForDeploymentPostprocessing = 0;
238246
shellPath = /bin/sh;
239247
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeCmpExample/Pods-ReactNativeCmpExample-resources.sh\"\n";
@@ -259,7 +267,10 @@
259267
buildSettings = {
260268
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
261269
CLANG_ENABLE_MODULES = YES;
270+
CODE_SIGN_IDENTITY = "Apple Development";
271+
CODE_SIGN_STYLE = Automatic;
262272
CURRENT_PROJECT_VERSION = 1;
273+
DEVELOPMENT_TEAM = "";
263274
ENABLE_BITCODE = NO;
264275
INFOPLIST_FILE = ReactNativeCmpExample/Info.plist;
265276
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
@@ -275,6 +286,7 @@
275286
);
276287
PRODUCT_BUNDLE_IDENTIFIER = sourcepoint.reactnativecmp.example;
277288
PRODUCT_NAME = ReactNativeCmpExample;
289+
PROVISIONING_PROFILE_SPECIFIER = "";
278290
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
279291
SWIFT_VERSION = 5.0;
280292
VERSIONING_SYSTEM = "apple-generic";
@@ -287,7 +299,10 @@
287299
buildSettings = {
288300
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289301
CLANG_ENABLE_MODULES = YES;
302+
CODE_SIGN_IDENTITY = "Apple Development";
303+
CODE_SIGN_STYLE = Automatic;
290304
CURRENT_PROJECT_VERSION = 1;
305+
DEVELOPMENT_TEAM = "";
291306
INFOPLIST_FILE = ReactNativeCmpExample/Info.plist;
292307
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
293308
LD_RUNPATH_SEARCH_PATHS = (
@@ -302,6 +317,7 @@
302317
);
303318
PRODUCT_BUNDLE_IDENTIFIER = sourcepoint.reactnativecmp.example;
304319
PRODUCT_NAME = ReactNativeCmpExample;
320+
PROVISIONING_PROFILE_SPECIFIER = "";
305321
SWIFT_VERSION = 5.0;
306322
VERSIONING_SYSTEM = "apple-generic";
307323
};
@@ -387,10 +403,7 @@
387403
"-DFOLLY_CFG_NO_COROUTINES=1",
388404
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
389405
);
390-
OTHER_LDFLAGS = (
391-
"$(inherited)",
392-
" ",
393-
);
406+
OTHER_LDFLAGS = "$(inherited) ";
394407
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
395408
SDKROOT = iphoneos;
396409
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -470,10 +483,7 @@
470483
"-DFOLLY_CFG_NO_COROUTINES=1",
471484
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
472485
);
473-
OTHER_LDFLAGS = (
474-
"$(inherited)",
475-
" ",
476-
);
486+
OTHER_LDFLAGS = "$(inherited) ";
477487
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
478488
SDKROOT = iphoneos;
479489
USE_HERMES = true;

ios/RNSourcepointCmp.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ import React
6868
consentManager?.loadUSNatPrivacyManager(withId: pmId)
6969
}
7070

71+
public func loadGlobalCMPPrivacyManager(_ pmId: String) {
72+
consentManager?.loadGlobalCmpPrivacyManager(withId: pmId)
73+
}
74+
7175
weak var rootViewController: UIViewController? {
7276
UIApplication.shared.delegate?.window??.rootViewController
7377
}

ios/ReactNativeCmp.mm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ - (void)clearLocalData {
7979
}
8080

8181
- (void)getUserData:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
82-
[sdk getUserData:resolve reject:nil];
82+
[sdk getUserData:resolve reject:reject];
8383
}
8484

8585
- (void)loadGDPRPrivacyManager:(nonnull NSString *)pmId {
@@ -90,6 +90,11 @@ - (void)loadUSNatPrivacyManager:(nonnull NSString *)pmId {
9090
[sdk loadUSNatPrivacyManager: pmId];
9191
}
9292

93+
- (void)loadGlobalCmpPrivacyManager:(nonnull NSString *)pmId {
94+
[sdk loadGlobalCMPPrivacyManager: pmId];
95+
}
96+
97+
9398
// MARK: SPDelegate
9499
- (void)onAction:(RNAction*)action {
95100
[self emitOnAction: [action toDictionary]];

0 commit comments

Comments
 (0)