Skip to content

Commit 34b8785

Browse files
committed
Merge remote-tracking branch 'origin/main' into dima/user-selection
2 parents 03f6a23 + 3f9058f commit 34b8785

35 files changed

+1621
-20
lines changed

.github/workflows/ios_build.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,23 @@ jobs:
5959
name: golden-failures
6060
path: app/test/**/failures/*
6161

62+
- name: Detect if PR is from a fork
63+
id: detect_fork
64+
shell: bash
65+
run: |
66+
if [ "${{ github.event.pull_request.head.repo.full_name }}" = "${{ github.repository }}" ]; then
67+
echo "is_fork=false" >> $GITHUB_OUTPUT
68+
else
69+
echo "is_fork=true" >> $GITHUB_OUTPUT
70+
fi
71+
6272
- name: Build iOS app
73+
if: ${{ steps.detect_fork.outputs.is_fork == 'true' }}
74+
run: |
75+
cd app && fastlane ios build_ios
76+
77+
- name: Build and sign iOS app
78+
if: ${{ steps.detect_fork.outputs.is_fork == 'false' }}
6379
env:
6480
APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }}
6581
APP_STORE_ISSUER_ID: ${{ secrets.APP_STORE_ISSUER_ID }}
@@ -70,4 +86,4 @@ jobs:
7086
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
7187
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
7288
run: |
73-
cd app && fastlane beta_ios --verbose
89+
cd app && fastlane ios beta_ios --verbose

REUSE.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ precedence = "aggregate"
5757
SPDX-FileCopyrightText = "2024 Phoenix R&D GmbH <[email protected]>"
5858
SPDX-License-Identifier = "AGPL-3.0-or-later"
5959

60+
[[annotations]]
61+
path = "app/macos/**"
62+
precedence = "aggregate"
63+
SPDX-FileCopyrightText = "2025 Phoenix R&D GmbH <[email protected]>"
64+
SPDX-License-Identifier = "AGPL-3.0-or-later"
65+
6066
[[annotations]]
6167
path = "app/.fvmrc"
6268
precedence = "aggregate"

apiclient/src/as_api/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl ApiClient {
106106
Err(error) => {
107107
error!(
108108
%url,
109-
%error, "Got a POST message error while contacting the URL"
109+
?error, "Got a POST message error while contacting the URL"
110110
);
111111
Err(AsRequestError::NetworkError(error.to_string()))
112112
}

app/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ Runner.ipa
7171
Runner.app.dSYM.zip
7272

7373
# Other platforms
74-
macos/
7574
windows/
7675
web/
7776

app/fastlane/Fastfile

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,9 @@ end
115115
platform :ios do
116116
desc "Build app for TestFlight"
117117
lane :beta_ios do |options|
118-
# Set XCode version
119-
xcodes(
120-
version: '16.1',
121-
select_for_current_build_only: true,
122-
)
123-
124118
# Set up CI
125119
setup_ci()
126-
120+
127121
# Set parameters
128122
key_id = ENV['APP_STORE_KEY_ID']
129123
issuer_id = ENV['APP_STORE_ISSUER_ID']
@@ -171,7 +165,34 @@ platform :ios do
171165
readonly: is_ci,
172166
)
173167
end
168+
169+
# Build the app with signing
170+
build_ios(with_signing: true)
174171

172+
# Upload the app to TestFlight if the parameter is set
173+
if options[:upload_to_test_flight]
174+
upload_to_testflight(
175+
api_key: api_key,
176+
skip_waiting_for_build_processing: true,
177+
distribute_external: false,
178+
)
179+
end
180+
end
181+
182+
desc "Build app"
183+
lane :build_ios do |options|
184+
# The following is false when "with_signing" is not provided in the oprion and true otherwise
185+
skip_signing = !options[:with_signing]
186+
187+
# Set XCode version
188+
xcodes(
189+
version: '16.1',
190+
select_for_current_build_only: true,
191+
)
192+
193+
# Set up CI
194+
setup_ci()
195+
175196
# Install flutter dependencies
176197
sh "flutter pub get"
177198

@@ -180,21 +201,14 @@ platform :ios do
180201
clean: true,
181202
podfile: "ios/Podfile"
182203
)
183-
204+
184205
# Build the app
185206
build_app(
186207
workspace: "ios/Runner.xcworkspace",
187208
scheme: "Runner",
209+
skip_codesigning: skip_signing,
210+
skip_package_ipa: skip_signing,
188211
export_method: "app-store",
189212
)
190-
191-
# Upload the app to TestFlight if the parameter is set
192-
if options[:upload_to_test_flight]
193-
upload_to_testflight(
194-
api_key: api_key,
195-
skip_waiting_for_build_processing: true,
196-
distribute_external: false,
197-
)
198-
end
199213
end
200214
end

app/macos/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Flutter-related
2+
**/Flutter/ephemeral/
3+
**/Pods/
4+
5+
# Xcode-related
6+
**/dgph
7+
**/xcuserdata/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
import FlutterMacOS
6+
import Foundation
7+
8+
import file_selector_macos
9+
import path_provider_foundation
10+
11+
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
12+
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
13+
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
14+
}

app/macos/Podfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
platform :osx, '10.14'
2+
3+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5+
6+
project 'Runner', {
7+
'Debug' => :debug,
8+
'Profile' => :release,
9+
'Release' => :release,
10+
}
11+
12+
def flutter_root
13+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14+
unless File.exist?(generated_xcode_build_settings_path)
15+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16+
end
17+
18+
File.foreach(generated_xcode_build_settings_path) do |line|
19+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
20+
return matches[1].strip if matches
21+
end
22+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23+
end
24+
25+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26+
27+
flutter_macos_podfile_setup
28+
29+
target 'Runner' do
30+
use_frameworks!
31+
use_modular_headers!
32+
33+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34+
target 'RunnerTests' do
35+
inherit! :search_paths
36+
end
37+
end
38+
39+
post_install do |installer|
40+
installer.pods_project.targets.each do |target|
41+
flutter_additional_macos_build_settings(target)
42+
end
43+
end

0 commit comments

Comments
 (0)