Skip to content

Commit 5b187fe

Browse files
committed
test ios
1 parent a811081 commit 5b187fe

File tree

8 files changed

+149
-21
lines changed

8 files changed

+149
-21
lines changed

.github/workflows/build_nightly.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ jobs:
6767
echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ${{ github.workspace }}/sample_app/ios/firebase-service-account.json
6868
6969
- name: Build and release
70+
working-directory: sample_app/ios
7071
env:
7172
GOOGLE_APPLICATION_CREDENTIALS: "${{ github.workspace }}/sample_app/ios/firebase-service-account.json"
7273
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
7374
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
7475
run: |
75-
flutter build ios --no-codesign
76-
cd ios
7776
bundle exec fastlane deploy_to_firebase
7877
7978
build_and_deploy_android:
8079
runs-on: ubuntu-latest
8180
timeout-minutes: 15
82-
if: ${{ github.event_name == 'push' || inputs.build_android == true }}
81+
# if: ${{ github.event_name == 'push' || inputs.build_android == true }}
82+
if: false
8383
steps:
8484
- name: Install Bot SSH Key
8585
uses: webfactory/[email protected]

sample_app/Fastfile

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
opt_out_usage
2+
3+
# Have an easy way to get the root of the project
4+
def root_path
5+
Dir.pwd.sub(/.*\Kfastlane/, '').sub(/.*\Kandroid/, '').sub(/.*\Kios/, '').sub(/.*\K\/\//, '')
6+
end
7+
8+
# Have an easy way to run flutter tasks on the root of the project
9+
lane :sh_on_root do |options|
10+
Dir.chdir(root_path) { sh(options[:command]) }
11+
end
12+
13+
# Tasks to be reused on each platform flow
14+
lane :fetch_dependencies do
15+
sh_on_root(command: "flutter pub get --suppress-analytics")
16+
end
17+
18+
# Tasks to be reused on each platform flow
19+
lane :build_autogenerated_code do
20+
sh_on_root(command: "flutter pub run build_runner build --delete-conflicting-outputs")
21+
end
22+
23+
# Tasks to be reused on each platform flow
24+
lane :lint do
25+
sh_on_root(command: "flutter format --suppress-analytics --set-exit-if-changed -n lib/main.dart lib/src/ test/")
26+
end
27+
28+
# Tasks to be reused on each platform flow
29+
lane :test do |options|
30+
sh_on_root(command: "flutter test --no-pub --coverage --suppress-analytics")
31+
end

sample_app/ios/Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
source "https://rubygems.org"
22

33
gem "fastlane"
4+
gem "cocoapods", '~> 1.16.2'
45

56
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
67
eval_gemfile(plugins_path) if File.exist?(plugins_path)

sample_app/ios/Gemfile.lock

+80-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@ GEM
55
base64
66
nkf
77
rexml
8+
activesupport (7.2.2.1)
9+
base64
10+
benchmark (>= 0.3)
11+
bigdecimal
12+
concurrent-ruby (~> 1.0, >= 1.3.1)
13+
connection_pool (>= 2.2.5)
14+
drb
15+
i18n (>= 1.6, < 2)
16+
logger (>= 1.4.2)
17+
minitest (>= 5.1)
18+
securerandom (>= 0.3)
19+
tzinfo (~> 2.0, >= 2.0.5)
820
addressable (2.8.7)
921
public_suffix (>= 2.0.2, < 7.0)
22+
algoliasearch (1.27.5)
23+
httpclient (~> 2.8, >= 2.8.3)
24+
json (>= 1.5.1)
1025
artifactory (3.0.17)
1126
atomos (0.1.3)
1227
aws-eventstream (1.3.1)
@@ -28,17 +43,62 @@ GEM
2843
aws-eventstream (~> 1, >= 1.0.2)
2944
babosa (1.0.4)
3045
base64 (0.2.0)
46+
benchmark (0.4.0)
47+
bigdecimal (3.1.9)
3148
claide (1.1.0)
49+
cocoapods (1.16.2)
50+
addressable (~> 2.8)
51+
claide (>= 1.0.2, < 2.0)
52+
cocoapods-core (= 1.16.2)
53+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
54+
cocoapods-downloader (>= 2.1, < 3.0)
55+
cocoapods-plugins (>= 1.0.0, < 2.0)
56+
cocoapods-search (>= 1.0.0, < 2.0)
57+
cocoapods-trunk (>= 1.6.0, < 2.0)
58+
cocoapods-try (>= 1.1.0, < 2.0)
59+
colored2 (~> 3.1)
60+
escape (~> 0.0.4)
61+
fourflusher (>= 2.3.0, < 3.0)
62+
gh_inspector (~> 1.0)
63+
molinillo (~> 0.8.0)
64+
nap (~> 1.0)
65+
ruby-macho (>= 2.3.0, < 3.0)
66+
xcodeproj (>= 1.27.0, < 2.0)
67+
cocoapods-core (1.16.2)
68+
activesupport (>= 5.0, < 8)
69+
addressable (~> 2.8)
70+
algoliasearch (~> 1.0)
71+
concurrent-ruby (~> 1.1)
72+
fuzzy_match (~> 2.0.4)
73+
nap (~> 1.0)
74+
netrc (~> 0.11)
75+
public_suffix (~> 4.0)
76+
typhoeus (~> 1.0)
77+
cocoapods-deintegrate (1.0.5)
78+
cocoapods-downloader (2.1)
79+
cocoapods-plugins (1.0.0)
80+
nap
81+
cocoapods-search (1.0.1)
82+
cocoapods-trunk (1.6.0)
83+
nap (>= 0.8, < 2.0)
84+
netrc (~> 0.11)
85+
cocoapods-try (1.2.0)
3286
colored (1.2)
3387
colored2 (3.1.2)
3488
commander (4.6.0)
3589
highline (~> 2.0.0)
90+
concurrent-ruby (1.3.5)
91+
connection_pool (2.5.0)
3692
declarative (0.0.20)
3793
digest-crc (0.7.0)
3894
rake (>= 12.0.0, < 14.0.0)
3995
domain_name (0.6.20240107)
4096
dotenv (2.8.1)
97+
drb (2.2.1)
4198
emoji_regex (3.2.3)
99+
escape (0.0.4)
100+
ethon (0.16.0)
101+
ffi (>= 1.15.0)
42102
excon (0.112.0)
43103
faraday (1.10.4)
44104
faraday-em_http (~> 1.0)
@@ -116,6 +176,9 @@ GEM
116176
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
117177
fastlane-sirp (1.0.0)
118178
sysrandom (~> 1.0)
179+
ffi (1.17.1-arm64-darwin)
180+
fourflusher (2.3.1)
181+
fuzzy_match (2.0.4)
119182
gh_inspector (1.1.3)
120183
google-apis-androidpublisher_v3 (0.54.0)
121184
google-apis-core (>= 0.11.0, < 2.a)
@@ -162,22 +225,29 @@ GEM
162225
domain_name (~> 0.5)
163226
httpclient (2.9.0)
164227
mutex_m
228+
i18n (1.14.7)
229+
concurrent-ruby (~> 1.0)
165230
jmespath (1.6.2)
166231
json (2.10.1)
167232
jwt (2.10.1)
168233
base64
234+
logger (1.6.6)
169235
mini_magick (4.13.2)
170236
mini_mime (1.1.5)
237+
minitest (5.25.4)
238+
molinillo (0.8.0)
171239
multi_json (1.15.0)
172240
multipart-post (2.4.1)
173241
mutex_m (0.3.0)
174242
nanaimo (0.4.0)
243+
nap (1.1.0)
175244
naturally (2.2.1)
245+
netrc (0.11.0)
176246
nkf (0.2.0)
177247
optparse (0.6.0)
178248
os (1.1.4)
179249
plist (3.7.2)
180-
public_suffix (6.0.1)
250+
public_suffix (4.0.7)
181251
rake (13.2.1)
182252
representable (3.2.0)
183253
declarative (< 0.1.0)
@@ -186,8 +256,10 @@ GEM
186256
retriable (3.1.2)
187257
rexml (3.4.1)
188258
rouge (3.28.0)
259+
ruby-macho (2.5.1)
189260
ruby2_keywords (0.0.5)
190261
rubyzip (2.4.1)
262+
securerandom (0.4.1)
191263
security (0.1.5)
192264
signet (0.19.0)
193265
addressable (~> 2.8)
@@ -206,6 +278,10 @@ GEM
206278
tty-screen (0.8.2)
207279
tty-spinner (0.9.3)
208280
tty-cursor (~> 0.7)
281+
typhoeus (1.4.1)
282+
ethon (>= 0.9.0)
283+
tzinfo (2.0.6)
284+
concurrent-ruby (~> 1.0)
209285
uber (0.1.0)
210286
unicode-display_width (2.6.0)
211287
word_wrap (1.0.0)
@@ -222,9 +298,11 @@ GEM
222298
xcpretty (~> 0.2, >= 0.0.7)
223299

224300
PLATFORMS
225-
ruby
301+
arm64-darwin-22
302+
arm64-darwin-24
226303

227304
DEPENDENCIES
305+
cocoapods (~> 1.16.2)
228306
fastlane
229307
fastlane-plugin-firebase_app_distribution
230308

sample_app/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '12.0'
2+
platform :ios, '13.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

sample_app/ios/Runner.xcodeproj/project.pbxproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@
481481
isa = XCBuildConfiguration;
482482
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
483483
buildSettings = {
484-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
485484
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
486485
CLANG_ENABLE_MODULES = YES;
487486
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
@@ -623,7 +622,6 @@
623622
isa = XCBuildConfiguration;
624623
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
625624
buildSettings = {
626-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
627625
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
628626
CLANG_ENABLE_MODULES = YES;
629627
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
@@ -660,14 +658,15 @@
660658
isa = XCBuildConfiguration;
661659
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
662660
buildSettings = {
663-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
664661
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
665662
CLANG_ENABLE_MODULES = YES;
666663
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
667664
CODE_SIGN_IDENTITY = "Apple Development";
668-
CODE_SIGN_STYLE = Automatic;
665+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
666+
CODE_SIGN_STYLE = Manual;
669667
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
670-
DEVELOPMENT_TEAM = EHV7XZLAHA;
668+
DEVELOPMENT_TEAM = "";
669+
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = EHV7XZLAHA;
671670
ENABLE_BITCODE = NO;
672671
FRAMEWORK_SEARCH_PATHS = (
673672
"$(inherited)",
@@ -686,6 +685,7 @@
686685
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter;
687686
PRODUCT_NAME = "$(TARGET_NAME)";
688687
PROVISIONING_PROFILE_SPECIFIER = "";
688+
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AdHoc io.getstream.flutter 1741161591";
689689
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
690690
SWIFT_VERSION = 5.0;
691691
VERSIONING_SYSTEM = "apple-generic";

sample_app/ios/fastlane/Appfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
1+
app_identifier("io.getstream.flutter") # The bundle identifier of your app
22
# apple_id("[[APPLE_ID]]") # Your Apple email address
33

4+
itc_team_id("118902954") # App Store Connect Team ID
5+
team_id("EHV7XZLAHA") # Developer Portal Team ID
46

57
# For more information about the Appfile, see:
68
# https://docs.fastlane.tools/advanced/#appfile

sample_app/ios/fastlane/Fastfile

+25-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
fastlane_version "2.226.0"
22
default_platform :ios
33

4+
import '../../Fastfile'
5+
46
before_all do
57
if is_ci
68
setup_ci()
@@ -20,6 +22,18 @@ lane :match_me do
2022
)
2123
end
2224

25+
lane :build do |options|
26+
fetch_dependencies
27+
28+
sign_enabled = options[:sign_enabled] || false
29+
sign_param = sign_enabled ? '' : '--no-codesign'
30+
31+
config_only = options[:config_only] || false
32+
config_param = config_only ? '--config-only' : ''
33+
34+
sh_on_root(command: "flutter build ios --no-pub --suppress-analytics --release #{sign_param} #{config_param}")
35+
end
36+
2337
desc "Installs all Certs and Profiles necessary for appstore"
2438
lane :match_appstore do
2539
match(
@@ -35,15 +49,17 @@ end
3549
lane :deploy_to_firebase do
3650
match_me
3751

38-
gym(
39-
workspace: "./Runner.xcworkspace",
40-
scheme: "Runner",
41-
export_method: "ad-hoc",
42-
export_options: "./fastlane/beta_gym_export_options.plist",
43-
silent: true,
44-
clean: true,
45-
include_symbols: true,
46-
output_directory: "./dist"
52+
build(
53+
sign_enabled: true,
54+
)
55+
56+
build_app(
57+
scheme: "Runner",
58+
export_method: "ad-hoc",
59+
silent: true,
60+
clean: true,
61+
include_symbols: true,
62+
output_directory: './dist',
4763
)
4864

4965
message = changelog_from_git_commits(commits_count: 10)

0 commit comments

Comments
 (0)