Skip to content

Commit 09df53a

Browse files
committed
update example to 0.76.3
1 parent be93641 commit 09df53a

File tree

8 files changed

+2087
-500
lines changed

8 files changed

+2087
-500
lines changed

Example/testHotUpdate/bun.lockb

11 KB
Binary file not shown.

Example/testHotUpdate/ios/AwesomeProject.xcodeproj/project.pbxproj

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
0C06D3B1D2C63EC04B024612 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 77A7A2D881E69AE3DCCE6BFE /* PrivacyInfo.xcprivacy */; };
1011
0C80B921A6F3F58F76C31292 /* libPods-AwesomeProject.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-AwesomeProject.a */; };
1112
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
1213
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
@@ -26,6 +27,7 @@
2627
5709B34CF0A7D63546082F79 /* Pods-AwesomeProject.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AwesomeProject.release.xcconfig"; path = "Target Support Files/Pods-AwesomeProject/Pods-AwesomeProject.release.xcconfig"; sourceTree = "<group>"; };
2728
5B7EB9410499542E8C5724F5 /* Pods-AwesomeProject-AwesomeProjectTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AwesomeProject-AwesomeProjectTests.debug.xcconfig"; path = "Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests.debug.xcconfig"; sourceTree = "<group>"; };
2829
5DCACB8F33CDC322A6C60F78 /* libPods-AwesomeProject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AwesomeProject.a"; sourceTree = BUILT_PRODUCTS_DIR; };
30+
77A7A2D881E69AE3DCCE6BFE /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = AwesomeProject/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
2931
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = AwesomeProject/LaunchScreen.storyboard; sourceTree = "<group>"; };
3032
89C6BE57DB24E9ADA2F236DE /* Pods-AwesomeProject-AwesomeProjectTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AwesomeProject-AwesomeProjectTests.release.xcconfig"; path = "Target Support Files/Pods-AwesomeProject-AwesomeProjectTests/Pods-AwesomeProject-AwesomeProjectTests.release.xcconfig"; sourceTree = "<group>"; };
3133
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
@@ -52,6 +54,7 @@
5254
13B07FB61A68108700A75B9A /* Info.plist */,
5355
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
5456
13B07FB71A68108700A75B9A /* main.m */,
57+
77A7A2D881E69AE3DCCE6BFE /* PrivacyInfo.xcprivacy */,
5558
);
5659
name = AwesomeProject;
5760
sourceTree = "<group>";
@@ -169,6 +172,7 @@
169172
files = (
170173
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
171174
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
175+
0C06D3B1D2C63EC04B024612 /* PrivacyInfo.xcprivacy in Resources */,
172176
);
173177
runOnlyForDeploymentPostprocessing = 0;
174178
};
@@ -336,7 +340,7 @@
336340
buildSettings = {
337341
ALWAYS_SEARCH_USER_PATHS = NO;
338342
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
339-
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
343+
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
340344
CLANG_CXX_LIBRARY = "libc++";
341345
CLANG_ENABLE_MODULES = YES;
342346
CLANG_ENABLE_OBJC_ARC = YES;
@@ -400,15 +404,11 @@
400404
"-DFOLLY_MOBILE=1",
401405
"-DFOLLY_USE_LIBCPP=1",
402406
);
403-
OTHER_LDFLAGS = (
404-
"$(inherited)",
405-
"-Wl",
406-
"-ld_classic",
407-
" ",
408-
"-Wl -ld_classic ",
409-
);
407+
OTHER_LDFLAGS = "$(inherited)";
410408
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
411409
SDKROOT = iphoneos;
410+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
411+
USE_HERMES = true;
412412
};
413413
name = Debug;
414414
};
@@ -417,7 +417,7 @@
417417
buildSettings = {
418418
ALWAYS_SEARCH_USER_PATHS = NO;
419419
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
420-
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
420+
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
421421
CLANG_CXX_LIBRARY = "libc++";
422422
CLANG_ENABLE_MODULES = YES;
423423
CLANG_ENABLE_OBJC_ARC = YES;
@@ -476,15 +476,10 @@
476476
"-DFOLLY_MOBILE=1",
477477
"-DFOLLY_USE_LIBCPP=1",
478478
);
479-
OTHER_LDFLAGS = (
480-
"$(inherited)",
481-
"-Wl",
482-
"-ld_classic",
483-
" ",
484-
"-Wl -ld_classic ",
485-
);
479+
OTHER_LDFLAGS = "$(inherited)";
486480
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
487481
SDKROOT = iphoneos;
482+
USE_HERMES = true;
488483
VALIDATE_PRODUCT = YES;
489484
};
490485
name = Release;

Example/testHotUpdate/ios/AwesomeProject/AppDelegate.mm

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
1515
return [super application:application didFinishLaunchingWithOptions:launchOptions];
1616
}
1717

18-
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18+
- (NSURL *)bundleURL
1919
{
20-
#if DEBUG
21-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
22-
#else
23-
return [RCTPushy bundleURL];
24-
#endif
20+
#if DEBUG
21+
// 原先DEBUG这里的写法不作修改(所以DEBUG模式下不可热更新)
22+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
23+
#else
24+
return [RCTPushy bundleURL]; // <-- 把这里非DEBUG的情况替换为热更新bundle
25+
#endif
2526
}
2627

2728
@end
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>

Example/testHotUpdate/ios/Podfile

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@ require Pod::Executable.execute_command('node', ['-p',
88
platform :ios, min_ios_version_supported
99
prepare_react_native_project!
1010

11-
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
12-
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
13-
#
14-
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
15-
# ```js
16-
# module.exports = {
17-
# dependencies: {
18-
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
19-
# ```
20-
flipper_config = FlipperConfiguration.disabled
2111

2212
linkage = ENV['USE_FRAMEWORKS']
2313
if linkage != nil
@@ -28,19 +18,8 @@ end
2818
target 'AwesomeProject' do
2919
config = use_native_modules!
3020

31-
# Flags change depending on the env values.
32-
flags = get_default_flags()
33-
3421
use_react_native!(
3522
:path => config[:reactNativePath],
36-
# Hermes is now enabled by default. Disable by setting this flag to false.
37-
:hermes_enabled => flags[:hermes_enabled],
38-
:fabric_enabled => flags[:fabric_enabled],
39-
# Enables Flipper.
40-
#
41-
# Note that if you have use_frameworks! enabled, Flipper will not work and
42-
# you should disable the next line.
43-
:flipper_configuration => flipper_config,
4423
# An absolute path to your application root.
4524
:app_path => "#{Pod::Config.instance.installation_root}/.."
4625
)
@@ -50,8 +29,8 @@ target 'AwesomeProject' do
5029
react_native_post_install(
5130
installer,
5231
config[:reactNativePath],
53-
:mac_catalyst_enabled => false
32+
:mac_catalyst_enabled => false,
33+
# :ccache_enabled => true
5434
)
55-
__apply_Xcode_12_5_M1_post_install_workaround(installer)
5635
end
5736
end

0 commit comments

Comments
 (0)