Commit b53ecdf8d8c13cf22f4c7e00d9dad4c79d835664

Authored by 权海
1 parent c8041991

feat(ci):增加打包里的模拟器

@@ -4,6 +4,7 @@ build_ios=false @@ -4,6 +4,7 @@ build_ios=false
4 build_android=false 4 build_android=false
5 build_release=false 5 build_release=false
6 build_debug=false 6 build_debug=false
  7 +build_ios_simulator=false
7 8
8 updatePodfile(){ 9 updatePodfile(){
9 if [ "$build_ios" == true ] && [ -d ".ios" ]; then 10 if [ "$build_ios" == true ] && [ -d ".ios" ]; then
@@ -56,12 +57,17 @@ checkSDKDir() { @@ -56,12 +57,17 @@ checkSDKDir() {
56 57
57 buildIOSSDk() { 58 buildIOSSDk() {
58 echo "\033[33mBegin Build iOS SDK\033[0m" 59 echo "\033[33mBegin Build iOS SDK\033[0m"
  60 + ios_framework_arch_options="--xcframework --no-universal"
  61 + if [[ "$build_ios_simulator" == true ]]; then
  62 + # XCFramework 同时包含真机与 ios-arm64_x86_64-simulator 架构。
  63 + ios_framework_arch_options="--xcframework"
  64 + fi
59 if [[ "$build_release" == true ]]; then 65 if [[ "$build_release" == true ]]; then
60 - flutter build ios-framework --no-debug --no-profile --xcframework --no-universal --output=./ 66 + flutter build ios-framework --no-debug --no-profile $ios_framework_arch_options --output=./
61 mv ./Release/* ./SDK/iOS_SDK 67 mv ./Release/* ./SDK/iOS_SDK
62 rm -rf ./Release 68 rm -rf ./Release
63 else 69 else
64 - flutter build ios-framework --no-release --no-profile --xcframework --no-universal --output=./ 70 + flutter build ios-framework --no-release --no-profile $ios_framework_arch_options --output=./
65 mv ./Debug/* ./SDK/iOS_SDK 71 mv ./Debug/* ./SDK/iOS_SDK
66 rm -rf ./Debug 72 rm -rf ./Debug
67 fi 73 fi
@@ -85,7 +91,7 @@ buildAndroidSDK() { @@ -85,7 +91,7 @@ buildAndroidSDK() {
85 echo "\033[33mAndroid SDK Done\033[0m" 91 echo "\033[33mAndroid SDK Done\033[0m"
86 } 92 }
87 93
88 -while getopts ":iard" optname; do 94 +while getopts ":iards" optname; do
89 case "$optname" in 95 case "$optname" in
90 "i") 96 "i")
91 build_ios=true 97 build_ios=true
@@ -99,6 +105,9 @@ while getopts ":iard" optname; do @@ -99,6 +105,9 @@ while getopts ":iard" optname; do
99 "d") 105 "d")
100 build_debug=true 106 build_debug=true
101 ;; 107 ;;
  108 + "s")
  109 + build_ios_simulator=true
  110 + ;;
102 ":") 111 ":")
103 echo "\033[31mNo argument value for option $OPTARG\033[0m" 112 echo "\033[31mNo argument value for option $OPTARG\033[0m"
104 ;; 113 ;;
@@ -121,7 +130,8 @@ fi @@ -121,7 +130,8 @@ fi
121 echo """\033[36m 130 echo """\033[36m
122 Build iOS / Android: ($build_ios / $build_android) 131 Build iOS / Android: ($build_ios / $build_android)
123 Build All Platform: $all_platform 132 Build All Platform: $all_platform
124 -Build Release: $build_release\033[0m 133 +Build Release: $build_release
  134 +Include iOS Simulator: $build_ios_simulator\033[0m
125 """ 135 """
126 136
127 checkSDKDir 137 checkSDKDir
@@ -52,7 +52,6 @@ post_install do |installer| @@ -52,7 +52,6 @@ post_install do |installer|
52 52
53 target.build_configurations.each do |config| 53 target.build_configurations.each do |config|
54 config.build_settings['ENABLE_USER_SCRIPT_SANDBOXING'] = 'NO' 54 config.build_settings['ENABLE_USER_SCRIPT_SANDBOXING'] = 'NO'
55 - config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'  
56 end 55 end
57 end 56 end
58 end 57 end
@@ -102,6 +102,6 @@ SPEC CHECKSUMS: @@ -102,6 +102,6 @@ SPEC CHECKSUMS:
102 video_thumbnail: b637e0ad5f588ca9945f6e2c927f73a69a661140 102 video_thumbnail: b637e0ad5f588ca9945f6e2c927f73a69a661140
103 webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2 103 webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2
104 104
105 -PODFILE CHECKSUM: 9336dec050b93f0e3aeb7daef71d30ec0e2195f3 105 +PODFILE CHECKSUM: a364e14df3149b9bf7db65f34ce6837c6143f45d
106 106
107 COCOAPODS: 1.16.2 107 COCOAPODS: 1.16.2
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 - objectVersion = 54; 6 + objectVersion = 77;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
@@ -732,7 +732,8 @@ @@ -732,7 +732,8 @@
732 CURRENT_PROJECT_VERSION = " 90"; 732 CURRENT_PROJECT_VERSION = " 90";
733 DEVELOPMENT_TEAM = ZRPLMC329K; 733 DEVELOPMENT_TEAM = ZRPLMC329K;
734 ENABLE_PREVIEWS = YES; 734 ENABLE_PREVIEWS = YES;
735 - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; 735 + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "";
  736 + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
736 FRAMEWORK_SEARCH_PATHS = ( 737 FRAMEWORK_SEARCH_PATHS = (
737 "$(inherited)", 738 "$(inherited)",
738 "$(PROJECT_DIR)/Runner/Library", 739 "$(PROJECT_DIR)/Runner/Library",
@@ -811,7 +812,8 @@ @@ -811,7 +812,8 @@
811 CURRENT_PROJECT_VERSION = " 90"; 812 CURRENT_PROJECT_VERSION = " 90";
812 DEVELOPMENT_TEAM = ZRPLMC329K; 813 DEVELOPMENT_TEAM = ZRPLMC329K;
813 ENABLE_PREVIEWS = YES; 814 ENABLE_PREVIEWS = YES;
814 - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; 815 + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "";
  816 + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
815 FRAMEWORK_SEARCH_PATHS = ( 817 FRAMEWORK_SEARCH_PATHS = (
816 "$(inherited)", 818 "$(inherited)",
817 "$(PROJECT_DIR)/Runner/Library", 819 "$(PROJECT_DIR)/Runner/Library",