Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
flavor='production'
scheme='production'
configuration='Release-production'
entryPoint='main.dart'
bundleName="Vereign"
if [[ $1 == 'development' ]]
then
flavor='development'
scheme='development'
configuration='Release-development'
entryPoint='main-dev.dart'
bundleName="Vereign-dev"
fi
# Build ios
flutter build ios -v --flavor ${flavor} -t lib/${entryPoint}
# Export xarchive
xcodebuild \
-workspace ios/Runner.xcworkspace \
-scheme ${scheme} \
-sdk iphoneos \
-configuration ${configuration} \
archive -archivePath \
build/ios/${bundleName}.xcarchive
# Package ipa
xcodebuild \
-exportArchive \
-archivePath build/ios/${bundleName}.xcarchive \
-exportOptionsPlist ios/Runner/Info.plist \
-exportPath build/ios/${bundleName}
# Move packages wherever we need
# cp build/ios/Vereign/production.ipa /path && cp build/ios/Vereign-dev/development.ipa /path
# Cleanup
# flutter clean