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