Commit b53ecdf8d8c13cf22f4c7e00d9dad4c79d835664

Authored by 权海
1 parent c8041991

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

... ... @@ -4,6 +4,7 @@ build_ios=false
build_android=false
build_release=false
build_debug=false
build_ios_simulator=false
updatePodfile(){
if [ "$build_ios" == true ] && [ -d ".ios" ]; then
... ... @@ -56,12 +57,17 @@ checkSDKDir() {
buildIOSSDk() {
echo "\033[33mBegin Build iOS SDK\033[0m"
ios_framework_arch_options="--xcframework --no-universal"
if [[ "$build_ios_simulator" == true ]]; then
# XCFramework 同时包含真机与 ios-arm64_x86_64-simulator 架构。
ios_framework_arch_options="--xcframework"
fi
if [[ "$build_release" == true ]]; then
flutter build ios-framework --no-debug --no-profile --xcframework --no-universal --output=./
flutter build ios-framework --no-debug --no-profile $ios_framework_arch_options --output=./
mv ./Release/* ./SDK/iOS_SDK
rm -rf ./Release
else
flutter build ios-framework --no-release --no-profile --xcframework --no-universal --output=./
flutter build ios-framework --no-release --no-profile $ios_framework_arch_options --output=./
mv ./Debug/* ./SDK/iOS_SDK
rm -rf ./Debug
fi
... ... @@ -85,7 +91,7 @@ buildAndroidSDK() {
echo "\033[33mAndroid SDK Done\033[0m"
}
while getopts ":iard" optname; do
while getopts ":iards" optname; do
case "$optname" in
"i")
build_ios=true
... ... @@ -99,6 +105,9 @@ while getopts ":iard" optname; do
"d")
build_debug=true
;;
"s")
build_ios_simulator=true
;;
":")
echo "\033[31mNo argument value for option $OPTARG\033[0m"
;;
... ... @@ -121,7 +130,8 @@ fi
echo """\033[36m
Build iOS / Android: ($build_ios / $build_android)
Build All Platform: $all_platform
Build Release: $build_release\033[0m
Build Release: $build_release
Include iOS Simulator: $build_ios_simulator\033[0m
"""
checkSDKDir
... ...
... ... @@ -52,7 +52,6 @@ post_install do |installer|
target.build_configurations.each do |config|
config.build_settings['ENABLE_USER_SCRIPT_SANDBOXING'] = 'NO'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
end
end
end
... ...
... ... @@ -102,6 +102,6 @@ SPEC CHECKSUMS:
video_thumbnail: b637e0ad5f588ca9945f6e2c927f73a69a661140
webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2
PODFILE CHECKSUM: 9336dec050b93f0e3aeb7daef71d30ec0e2195f3
PODFILE CHECKSUM: a364e14df3149b9bf7db65f34ce6837c6143f45d
COCOAPODS: 1.16.2
... ...
... ... @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 77;
objects = {
/* Begin PBXBuildFile section */
... ... @@ -732,7 +732,8 @@
CURRENT_PROJECT_VERSION = " 90";
DEVELOPMENT_TEAM = ZRPLMC329K;
ENABLE_PREVIEWS = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Runner/Library",
... ... @@ -811,7 +812,8 @@
CURRENT_PROJECT_VERSION = " 90";
DEVELOPMENT_TEAM = ZRPLMC329K;
ENABLE_PREVIEWS = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Runner/Library",
... ...