Skip to content

Commit 0336110

Browse files
committed
Upgrade iOS
1 parent 9a68de6 commit 0336110

File tree

5 files changed

+82
-37
lines changed

5 files changed

+82
-37
lines changed

ios/Podfile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
require_relative '../node_modules/react-native/scripts/react_native_pods'
2-
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
1+
# Resolve react_native_pods.rb with node to allow for hoisting
2+
require Pod::Executable.execute_command('node', ['-p',
3+
'require.resolve(
4+
"react-native/scripts/react_native_pods.rb",
5+
{paths: [process.argv[1]]},
6+
)', __dir__]).strip
37

48
platform :ios, min_ios_version_supported
59
prepare_react_native_project!
@@ -25,16 +29,9 @@ target 'rnuilib' do
2529

2630
config = use_native_modules!
2731

28-
# Flags change depending on the env values.
29-
flags = get_default_flags()
30-
3132
use_react_native!(
3233
:path => config[:reactNativePath],
33-
# Hermes is now enabled by default. Disable by setting this flag to false.
34-
# Upcoming versions of React Native may rely on get_default_flags(), but
35-
# we make it explicit here to aid in the React Native upgrade process.
36-
:hermes_enabled => true,
37-
:fabric_enabled => flags[:fabric_enabled],
34+
3835
# Enables Flipper.
3936
#
4037
# Note that if you have use_frameworks! enabled, Flipper will not work and
@@ -51,12 +48,11 @@ target 'rnuilib' do
5148
end
5249

5350
post_install do |installer|
51+
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
5452
react_native_post_install(
5553
installer,
56-
# Set `mac_catalyst_enabled` to `true` in order to apply patches
57-
# necessary for Mac Catalyst builds
54+
config[:reactNativePath],
5855
:mac_catalyst_enabled => false
5956
)
60-
__apply_Xcode_12_5_M1_post_install_workaround(installer)
6157
end
6258
end

ios/rnuilib.xcodeproj/project.pbxproj

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
8E52CBDF2887DD21009D5EC5 /* DesignTokens.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E52CBDE2887DD21009D5EC5 /* DesignTokens.xcassets */; };
1919
8E8B0D662744D9CD0026B520 /* void.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E8B0D652744D9CD0026B520 /* void.swift */; };
2020
8EA1FC8C2519E7F7008B4B36 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EA1FC8B2519E7F7008B4B36 /* LaunchScreen.storyboard */; };
21+
BD943D6D9239B59015528C14 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = DED5A85D4BF49DFA47437893 /* PrivacyInfo.xcprivacy */; };
2122
C24F706C923507D9D0AFAF26 /* libPods-rnuilib-rnuilibTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB858F3A7230EAA142D23DA1 /* libPods-rnuilib-rnuilibTests.a */; };
23+
C41C90B146B08809BC045295 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 411699F1CD4A37F8779A4620 /* PrivacyInfo.xcprivacy */; };
2224
/* End PBXBuildFile section */
2325

2426
/* Begin PBXContainerItemProxy section */
@@ -51,6 +53,7 @@
5153
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = rnuilib/main.m; sourceTree = "<group>"; };
5254
2D02E47B1E0B4A5D006451C7 /* rnuilib-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "rnuilib-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5355
2D02E4901E0B4A5D006451C7 /* rnuilib-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "rnuilib-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
56+
411699F1CD4A37F8779A4620 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = rnuilib/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
5457
56523CB09C6A79FEBA0C210A /* Pods-rnuilib-rnuilibTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib-rnuilibTests.release.xcconfig"; path = "Target Support Files/Pods-rnuilib-rnuilibTests/Pods-rnuilib-rnuilibTests.release.xcconfig"; sourceTree = "<group>"; };
5558
65B766BC0A8D1F830F3D2004 /* Pods-rnuilib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.debug.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.debug.xcconfig"; sourceTree = "<group>"; };
5659
66AD894C4A02A884861A27E2 /* Pods-rnuilib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.release.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.release.xcconfig"; sourceTree = "<group>"; };
@@ -59,6 +62,7 @@
5962
8E52CBDE2887DD21009D5EC5 /* DesignTokens.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = DesignTokens.xcassets; sourceTree = "<group>"; };
6063
8E8B0D652744D9CD0026B520 /* void.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = void.swift; sourceTree = "<group>"; };
6164
8EA1FC8B2519E7F7008B4B36 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = rnuilib/LaunchScreen.storyboard; sourceTree = "<group>"; };
65+
DED5A85D4BF49DFA47437893 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = rnuilib/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
6266
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
6367
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
6468
FB858F3A7230EAA142D23DA1 /* libPods-rnuilib-rnuilibTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-rnuilib-rnuilibTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -127,6 +131,7 @@
127131
13B07FB71A68108700A75B9A /* main.m */,
128132
8EA1FC8B2519E7F7008B4B36 /* LaunchScreen.storyboard */,
129133
8E8B0D652744D9CD0026B520 /* void.swift */,
134+
DED5A85D4BF49DFA47437893 /* PrivacyInfo.xcprivacy */,
130135
);
131136
name = rnuilib;
132137
sourceTree = "<group>";
@@ -158,6 +163,7 @@
158163
83CBBA001A601CBA00E9B192 /* Products */,
159164
2D16E6871FA4F8E400B85C8A /* Frameworks */,
160165
D99C980AB24A05601E0007F9 /* Pods */,
166+
411699F1CD4A37F8779A4620 /* PrivacyInfo.xcprivacy */,
161167
);
162168
indentWidth = 2;
163169
sourceTree = "<group>";
@@ -331,6 +337,7 @@
331337
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
332338
8EA1FC8C2519E7F7008B4B36 /* LaunchScreen.storyboard in Resources */,
333339
8E52CBDF2887DD21009D5EC5 /* DesignTokens.xcassets in Resources */,
340+
BD943D6D9239B59015528C14 /* PrivacyInfo.xcprivacy in Resources */,
334341
);
335342
runOnlyForDeploymentPostprocessing = 0;
336343
};
@@ -339,6 +346,7 @@
339346
buildActionMask = 2147483647;
340347
files = (
341348
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
349+
C41C90B146B08809BC045295 /* PrivacyInfo.xcprivacy in Resources */,
342350
);
343351
runOnlyForDeploymentPostprocessing = 0;
344352
};
@@ -375,11 +383,11 @@
375383
);
376384
inputPaths = (
377385
"${PODS_ROOT}/Target Support Files/Pods-rnuilib-rnuilibTests/Pods-rnuilib-rnuilibTests-resources.sh",
378-
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
386+
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
379387
);
380388
name = "[CP] Copy Pods Resources";
381389
outputPaths = (
382-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
390+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
383391
);
384392
runOnlyForDeploymentPostprocessing = 0;
385393
shellPath = /bin/sh;
@@ -475,11 +483,11 @@
475483
);
476484
inputPaths = (
477485
"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-resources.sh",
478-
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
486+
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
479487
);
480488
name = "[CP] Copy Pods Resources";
481489
outputPaths = (
482-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
490+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
483491
);
484492
runOnlyForDeploymentPostprocessing = 0;
485493
shellPath = /bin/sh;
@@ -814,7 +822,7 @@
814822
buildSettings = {
815823
ALWAYS_SEARCH_USER_PATHS = NO;
816824
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
817-
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
825+
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
818826
CLANG_CXX_LIBRARY = "libc++";
819827
CLANG_ENABLE_MODULES = YES;
820828
CLANG_ENABLE_OBJC_ARC = YES;
@@ -866,8 +874,15 @@
866874
);
867875
MTL_ENABLE_DEBUG_INFO = YES;
868876
ONLY_ACTIVE_ARCH = YES;
877+
OTHER_CFLAGS = "$(inherited)";
878+
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
879+
OTHER_LDFLAGS = (
880+
"$(inherited)",
881+
" ",
882+
);
869883
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
870884
SDKROOT = iphoneos;
885+
USE_HERMES = true;
871886
};
872887
name = Debug;
873888
};
@@ -876,7 +891,7 @@
876891
buildSettings = {
877892
ALWAYS_SEARCH_USER_PATHS = NO;
878893
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
879-
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
894+
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
880895
CLANG_CXX_LIBRARY = "libc++";
881896
CLANG_ENABLE_MODULES = YES;
882897
CLANG_ENABLE_OBJC_ARC = YES;
@@ -920,8 +935,15 @@
920935
"\"$(inherited)\"",
921936
);
922937
MTL_ENABLE_DEBUG_INFO = NO;
938+
OTHER_CFLAGS = "$(inherited)";
939+
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
940+
OTHER_LDFLAGS = (
941+
"$(inherited)",
942+
" ",
943+
);
923944
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
924945
SDKROOT = iphoneos;
946+
USE_HERMES = true;
925947
VALIDATE_PRODUCT = YES;
926948
};
927949
name = Release;

ios/rnuilib/AppDelegate.mm

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2020
}
2121

2222
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
23+
{
24+
return [self getBundleURL];
25+
}
26+
27+
- (NSURL *)getBundleURL
2328
{
2429
#if DEBUG
2530
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"demo"];
@@ -28,16 +33,6 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
2833
#endif
2934
}
3035

31-
/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
32-
///
33-
/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
34-
/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
35-
/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
36-
- (BOOL)concurrentRootEnabled
37-
{
38-
return true;
39-
}
40-
4136
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
4237
return [ReactNativeNavigation extraModulesForBridge:bridge];
4338
}

ios/rnuilib/Info.plist

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,11 @@
2626
<true/>
2727
<key>NSAppTransportSecurity</key>
2828
<dict>
29+
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
2930
<key>NSAllowsArbitraryLoads</key>
31+
<false/>
32+
<key>NSAllowsLocalNetworking</key>
3033
<true/>
31-
<key>NSExceptionDomains</key>
32-
<dict>
33-
<key>localhost</key>
34-
<dict>
35-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
36-
<true/>
37-
</dict>
38-
</dict>
3934
</dict>
4035
<key>NSLocationWhenInUseUsageDescription</key>
4136
<string></string>

ios/rnuilib/PrivacyInfo.xcprivacy

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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>NSPrivacyAccessedAPITypes</key>
6+
<array>
7+
<dict>
8+
<key>NSPrivacyAccessedAPIType</key>
9+
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
10+
<key>NSPrivacyAccessedAPITypeReasons</key>
11+
<array>
12+
<string>C617.1</string>
13+
</array>
14+
</dict>
15+
<dict>
16+
<key>NSPrivacyAccessedAPIType</key>
17+
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
18+
<key>NSPrivacyAccessedAPITypeReasons</key>
19+
<array>
20+
<string>CA92.1</string>
21+
</array>
22+
</dict>
23+
<dict>
24+
<key>NSPrivacyAccessedAPIType</key>
25+
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
26+
<key>NSPrivacyAccessedAPITypeReasons</key>
27+
<array>
28+
<string>35F9.1</string>
29+
</array>
30+
</dict>
31+
</array>
32+
<key>NSPrivacyCollectedDataTypes</key>
33+
<array/>
34+
<key>NSPrivacyTracking</key>
35+
<false/>
36+
</dict>
37+
</plist>

0 commit comments

Comments
 (0)