Skip to content

Commit c4ffcc3

Browse files
authored
Merge pull request #4 from thunderheadone/MOB-1947-ios-opt-out-feature
[MOB-1947] iOS: opt out feature
2 parents 954c6f7 + e5abe89 commit c4ffcc3

File tree

12 files changed

+18450
-4041
lines changed

12 files changed

+18450
-4041
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ To opt an end-user out of city/country level tracking, call the following method
107107
One.optOutCityCountryDetection(true);
108108
```
109109

110+
#### Opt an end user out of keychain Tid storage (iOS only)
111+
To opt an end-user out of all keychain Tid storage, call the following method:
112+
```javascript
113+
One.optOutKeychainTidStorage(true);
114+
```
115+
110116
### Access debug information
111117
To configure logging, call the following method:
112118
```javascript

android/src/main/java/com/reactnativeone/OneModule.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ public void sendInteraction(String interactionPath, ReadableMap propertiesMap, f
108108
notifyProblem(promise, "Send Interaction", error);
109109
}
110110
}
111-
WritableNativeMap responseMap = responseObjectToReadableMap(response);
112-
notifyResult(promise, responseMap);
113111
});
114112
}
115113

@@ -217,6 +215,11 @@ public void optOutCityCountryDetection(Boolean optOut) {
217215
One.setOptOutConfiguration(builder.build());
218216
}
219217

218+
@ReactMethod
219+
public void optOutKeychainTidStorage(Boolean optOut) {
220+
// Do nothing. This is an iOS only method.
221+
}
222+
220223
private HashMap<String, String> getPropertiesFromReadableMap(ReadableMap readableMap) {
221224
if (readableMap != null && readableMap instanceof ReadableNativeMap) {
222225
ReadableMapKeySetIterator iterator = ((ReadableNativeMap) readableMap).keySetIterator();

example/ios/OneExample.xcodeproj/project.pbxproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
13B07F8E1A680F5B00A75B9A /* Resources */,
207207
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
208208
C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */,
209+
02CD61E933E8911D4F24FE83 /* [CP] Embed Pods Frameworks */,
209210
);
210211
buildRules = (
211212
);
@@ -349,6 +350,24 @@
349350
shellPath = /bin/sh;
350351
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
351352
};
353+
02CD61E933E8911D4F24FE83 /* [CP] Embed Pods Frameworks */ = {
354+
isa = PBXShellScriptBuildPhase;
355+
buildActionMask = 2147483647;
356+
files = (
357+
);
358+
inputPaths = (
359+
"${PODS_ROOT}/Target Support Files/Pods-OneExample/Pods-OneExample-frameworks.sh",
360+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
361+
);
362+
name = "[CP] Embed Pods Frameworks";
363+
outputPaths = (
364+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
365+
);
366+
runOnlyForDeploymentPostprocessing = 0;
367+
shellPath = /bin/sh;
368+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-OneExample/Pods-OneExample-frameworks.sh\"\n";
369+
showEnvVarsInLog = 0;
370+
};
352371
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
353372
isa = PBXShellScriptBuildPhase;
354373
buildActionMask = 2147483647;

example/ios/Podfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require_relative '../node_modules/react-native/scripts/react_native_pods'
22
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
33

4-
platform :ios, '10.0'
4+
#platform :ios, '9.0'
55

66
target 'OneExample' do
77
config = use_native_modules!
@@ -11,8 +11,15 @@ target 'OneExample' do
1111
#
1212
# Note that if you have use_frameworks! enabled, Flipper will not work and
1313
# you should disable these next few lines.
14-
use_flipper!
15-
post_install do |installer|
16-
flipper_post_install(installer)
14+
use_flipper!({'Flipper' => '0.87.0' , 'Flipper-Folly' => '2.5.3' , 'Flipper-RSocket' => '1.3.1' })
15+
post_install do |installer|
16+
flipper_post_install(installer)
17+
installer.pods_project.targets.each do |target|
18+
target.build_configurations.each do |config|
19+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
20+
end
21+
end
1722
end
23+
24+
1825
end

0 commit comments

Comments
 (0)