Skip to content

Commit dbbdfee

Browse files
fix: increase default timeout for iOS simulator launch and improve error messaging
1 parent e37e17b commit dbbdfee

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/scripts/launch-ios-simulator.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -euo pipefail
1818
# Configuration
1919
DEVICE_NAME="${1:-}"
2020
OS_VERSION="${2:-}"
21-
TIMEOUT="${3:-120}"
21+
TIMEOUT="${3:-600}"
2222
CHECK_INTERVAL=2
2323

2424
# Colors for output
@@ -88,7 +88,8 @@ DEVICE_UDID=$(xcrun simctl list devices available --json | \
8888

8989
if [ -z "$DEVICE_UDID" ]; then
9090
log_error "Device '$DEVICE_NAME' with iOS $OS_VERSION not found or not available"
91-
log_info "Looking for runtime matching: iOS-${IOS_RUNTIME_KEY}"
91+
log_info ""
92+
log_info "Hint: Use exact device name from the list above (e.g., 'iPhone Air' not 'iPhone 17 Air')"
9293
exit 1
9394
fi
9495

@@ -136,7 +137,7 @@ while [ $ELAPSED -lt $TIMEOUT ]; do
136137
fi
137138

138139
if [ $((ELAPSED % 10)) -eq 0 ] && [ $ELAPSED -gt 0 ]; then
139-
log_info "Still waiting... (${ELAPSED}s elapsed)"
140+
log_info "Still waiting... (${ELAPSED}s elapsed, timeout in $((TIMEOUT - ELAPSED))s)"
140141
fi
141142

142143
sleep $CHECK_INTERVAL

.github/workflows/ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
fi
7575
7676
# Launch simulator with our custom script
77-
bash .github/scripts/launch-ios-simulator.sh "${{ env.DEVICE_MODEL }}" "${{ env.IOS_VERSION }}" 120
77+
bash .github/scripts/launch-ios-simulator.sh "${{ env.DEVICE_MODEL }}" "${{ env.IOS_VERSION }}"
7878
7979
# Install app on simulator
8080
- name: Install app on simulator

example/ios/MendixNativeExample/AppDelegate.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ class AppDelegate: RCTAppDelegate {
1616

1717
//Start - For MendixApplication compatibility only, not part of React Native template
1818
SessionCookieStore.restore()
19+
20+
guard let bundleUrl = bundleURL() else {
21+
fatalError("Unable to load JavaScript bundle.")
22+
}
23+
1924
MxConfiguration.update(from:
2025
MendixApp.init(
2126
identifier: nil,
22-
bundleUrl: bundleURL()!,
27+
bundleUrl: bundleUrl,
2328
runtimeUrl: URL(string: "http://localhost:8081")!,
2429
warningsFilter: .none,
2530
isDeveloperApp: false,

0 commit comments

Comments
 (0)