Skip to content

Commit a005bc9

Browse files
committed
Update iOS config
1 parent ada457b commit a005bc9

File tree

4 files changed

+87
-5
lines changed

4 files changed

+87
-5
lines changed

.github/actions/build-ios/action.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,20 @@ runs:
1818
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e #v4
1919
with:
2020
node-version-file: .nvmrc
21+
22+
- name: Install Node dependencies
23+
run: npm ci
24+
shell: bash
25+
26+
- name: Install CocoaPods
27+
run: gem install cocoapods
28+
shell: bash
2129

2230
- name: Install CocoaPods dependencies
2331
run: pod install --project-directory=ios
2432
shell: bash
2533

2634
- name: Run Fastlane
27-
run: cd ios && fastlane ios release
35+
run: cd ios && fastlane ios internal submit:false
2836
shell: bash
2937

.github/workflows/MiNe2e.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: MiN E2E
2-
description: "Builds MiN app and runs e2e test"
32

43
on:
54
workflow_dispatch:
@@ -172,8 +171,8 @@ jobs:
172171
- name: "Check for APK file"
173172
run: |
174173
echo "Checking for APK file..."
175-
if [ -f android-app/app-production-debug.apk ]; then
176-
echo "APK file found: android-app/app-production-debug.apk"
174+
if [ -f android-app/app-debug.apk ]; then
175+
echo "APK file found: android-app/app-debug.apk"
177176
else
178177
echo "APK file not found!"
179178
exit 1

ios/fastlane/Fastfile

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,79 @@ platform :ios do
7575
)
7676
end
7777

78+
desc "Build new app and optionally upload to TestFlight"
79+
lane :internal do |options|
80+
keychain_name = "MiN_10_keychain"
81+
create_keychain(
82+
name: keychain_name,
83+
default_keychain: true,
84+
unlock: true,
85+
timeout: 3600,
86+
password: ENV["KEYCHAIN_PASSWORD"],
87+
lock_when_sleeps: false
88+
)
89+
sh("npm", "ci", "--legacy-peer-deps")
90+
cocoapods
91+
92+
api_key = app_store_connect_api_key(
93+
key_id: ENV["APP_STORE_CONNECT_KEY_ID"],
94+
issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"],
95+
key_content: ENV["APP_STORE_CONNECT_KEY_CONTENT"],
96+
duration: 1200, # Session Length in seconds (maximum: 1200).
97+
)
98+
99+
UI.message("Disabling automatic signing on Xcode")
100+
disable_automatic_code_signing
101+
102+
UI.message("Get the certificates and profiles")
103+
match(
104+
type:"appstore",
105+
api_key:api_key,
106+
keychain_name:keychain_name,
107+
keychain_password: ENV["KEYCHAIN_PASSWORD"],
108+
git_basic_authorization:ENV["MATCH_GIT_BASIC_AUTHORIZATION"],
109+
readonly: false,
110+
)
111+
112+
UI.message("Set version number")
113+
increment_version_number(
114+
version_number: APPLE_STORE_VERSION,
115+
)
116+
117+
UI.message("Get the latest build number from AppStore Connect")
118+
build_num = app_store_build_number(
119+
live: false,
120+
initial_build_number: 0,
121+
api_key: api_key,
122+
version: APPLE_STORE_VERSION,
123+
)
124+
125+
UI.message("Set build number")
126+
increment_build_number(
127+
xcodeproj: "developerapp.xcodeproj",
128+
build_number: build_num + 1,
129+
)
130+
131+
UI.message("Replacing Google Maps API key from environment variables")
132+
Dir.chdir("../DeveloperApp/Config") do
133+
googleMapsApiKey = ENV["GOOGLE_MAPS_API_KEY"] || "GOOGLE_MAPS_API_KEY"
134+
sh("sed -i '' 's/{{google-maps-api-key}}/#{googleMapsApiKey}/g' ApiKeys.xcconfig")
135+
end
136+
137+
build_app(
138+
workspace: "DeveloperApp.xcworkspace",
139+
scheme: "DeveloperApp",
140+
build_path:"./build",
141+
output_directory:"./build"
142+
)
143+
144+
if options[:submit] == true
145+
UI.message "Uploading build to TestFlight"
146+
upload_to_testflight(
147+
skip_waiting_for_build_processing: true,
148+
)
149+
else
150+
UI.message "Build completed successfully. Skipping upload to TestFlight."
151+
end
152+
end
78153
end

maestro/helpers/prepare_android.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ install_android_app() {
1313
while [ "$RETRIES" -lt "$MAX_RETRIES" ]; do
1414
echo "Attempt $(($RETRIES + 1)) of $MAX_RETRIES: Installing APK..."
1515

16-
adb install /home/runner/work/make-it-native/make-it-native/android-app/app-production-debug.apk
16+
adb install /home/runner/work/make-it-native/make-it-native/android-app/app-debug.apk
1717

1818
if adb shell pm list packages | grep -q "com.mendix.developerapp.mx10"; then
1919
echo "App installed successfully!"

0 commit comments

Comments
 (0)