Skip to content

A local-first personal finance app

[AI] Fix iOS mobile app startup and add TestFlight release script (#9311)

Matiss Janis Aboltins9231ec8f3ab3
diff --git a/packages/desktop-client/src/components/Page.tsx b/packages/desktop-client/src/components/Page.tsx
index 80448d51a5..322038d863 100644
--- a/packages/desktop-client/src/components/Page.tsx
+++ b/packages/desktop-client/src/components/Page.tsx
@@ -58,7 +58,10 @@ export function MobilePageHeader({
alignItems: 'center',
flexDirection: 'row',
flexShrink: 0,
- height: HEADER_HEIGHT,
+ // Extend under the status bar / notch (non-zero only in the native
+ // mobile app, where the web view covers the whole screen).
+ height: `calc(${HEADER_HEIGHT}px + env(safe-area-inset-top))`,
+ paddingTop: 'env(safe-area-inset-top)',
backgroundColor: theme.mobileHeaderBackground,
'& *': {
color: theme.mobileHeaderText,
@@ -144,7 +147,7 @@ export function MobilePageHeaderSlot({ style }: MobilePageHeaderSlotProps) {
ref={slotRef ?? undefined}
style={{
flexShrink: 0,
- minHeight: HEADER_HEIGHT,
+ minHeight: `calc(${HEADER_HEIGHT}px + env(safe-area-inset-top))`,
backgroundColor: theme.mobileHeaderBackground,
...style,
}}
diff --git a/packages/loot-core/src/platform/client/browser-preload/start.ts b/packages/loot-core/src/platform/client/browser-preload/start.ts
index 04e5be0239..89a1363029 100644
--- a/packages/loot-core/src/platform/client/browser-preload/start.ts
+++ b/packages/loot-core/src/platform/client/browser-preload/start.ts
@@ -41,6 +41,13 @@ export function startBrowserBackend(
forceDirectWorker,
} = opts;
+ // Capacitor serves the app from a custom URL scheme, which WebKit never
+ // treats as cross-origin isolated, so SharedArrayBuffer is unavailable in
+ // the native mobile app. Always run it in the fallback mode there.
+ if ('Capacitor' in window) {
+ localStorage.setItem('SharedArrayBufferOverride', 'true');
+ }
+
// Use SharedWorker as a coordinator for multi-tab, multi-budget support.
// Each budget gets its own leader tab running a dedicated Worker. All other
// tabs on the same budget are followers — their messages are routed through
diff --git a/packages/mobile-client/capacitor.config.ts b/packages/mobile-client/capacitor.config.ts
index 42e4af6323..e8a376309a 100644
--- a/packages/mobile-client/capacitor.config.ts
+++ b/packages/mobile-client/capacitor.config.ts
@@ -11,11 +11,6 @@ const baseConfig: CapacitorConfig = {
appId: 'org.actualbudget',
appName: 'Actual Budget',
webDir: actualAppWebBuildPath,
- plugins: {
- SplashScreen: {
- launchAutoHide: false,
- },
- },
};
const devConfig: CapacitorConfig = {
diff --git a/packages/mobile-client/ios/App/App.xcodeproj/project.pbxproj b/packages/mobile-client/ios/App/App.xcodeproj/project.pbxproj
index 35510b4d61..bed609f9db 100644
--- a/packages/mobile-client/ios/App/App.xcodeproj/project.pbxproj
+++ b/packages/mobile-client/ios/App/App.xcodeproj/project.pbxproj
@@ -354,7 +354,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
- PRODUCT_BUNDLE_IDENTIFIER = org.actualbudget;
+ PRODUCT_BUNDLE_IDENTIFIER = com.actualbudget.actual;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
@@ -373,7 +373,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = org.actualbudget;
+ PRODUCT_BUNDLE_IDENTIFIER = com.actualbudget.actual;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 5.0;
diff --git a/packages/mobile-client/ios/App/App/Info.plist b/packages/mobile-client/ios/App/App/Info.plist
index b32899d2b4..9b14596bb0 100644
--- a/packages/mobile-client/ios/App/App/Info.plist
+++ b/packages/mobile-client/ios/App/App/Info.plist
@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
- <string>Actual Budget</string>
+ <string>Actual Budget</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@@ -20,6 +20,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
+ <key>ITSAppUsesNonExemptEncryption</key>
+ <false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
@@ -28,8 +30,10 @@
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
- <string>armv7</string>
+ <string>arm64</string>
</array>
+ <key>UIStatusBarStyle</key>
+ <string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
diff --git a/packages/mobile-client/ios/App/ExportOptions.plist b/packages/mobile-client/ios/App/ExportOptions.plist
new file mode 100644
index 0000000000..ac65a7b106
--- /dev/null
+++ b/packages/mobile-client/ios/App/ExportOptions.plist
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>method</key>
+ <string>app-store-connect</string>
+ <key>destination</key>
+ <string>upload</string>
+ <key>signingStyle</key>
+ <string>automatic</string>
+ <key>uploadSymbols</key>
+ <true/>
+</dict>
+</plist>
diff --git a/packages/mobile-client/ios/App/Podfile.lock b/packages/mobile-client/ios/App/Podfile.lock
index 5a3b32e9d7..204952fe43 100644
--- a/packages/mobile-client/ios/App/Podfile.lock
+++ b/packages/mobile-client/ios/App/Podfile.lock
@@ -1,7 +1,7 @@
PODS:
- - Capacitor (8.4.2):
+ - Capacitor (8.5.3):
- CapacitorCordova
- - CapacitorCordova (8.4.2)
+ - CapacitorCordova (8.5.3)
- CapacitorSplashScreen (8.0.2):
- Capacitor
@@ -19,10 +19,10 @@ EXTERNAL SOURCES:
:path: "../../../../node_modules/@capacitor/splash-screen"
SPEC CHECKSUMS:
- Capacitor: 52f999235b8bd6a7d01694753f4f4d54d182e3a3
- CapacitorCordova: 345eacdc4c8282415446aea4acd8c77d82480bd4
+ Capacitor: 2f67eaeb8ed79909cd35b5e7439a5c2a9ca58e0f
+ CapacitorCordova: 0b7326439c7a09fc5d20eced5e0dab986327a493
CapacitorSplashScreen: 7bf61c2001557ff9e195e601c6b87344480d3c65
PODFILE CHECKSUM: bb5605552c513baeb6ee23af2520ffb9d495b447
-COCOAPODS: 1.16.2
+COCOAPODS: 1.17.0
diff --git a/packages/mobile-client/package.json b/packages/mobile-client/package.json
index 47e858cbb5..38364f07aa 100644
--- a/packages/mobile-client/package.json
+++ b/packages/mobile-client/package.json
@@ -10,7 +10,7 @@
"sync:android": "cap sync android",
"build:ios": "yarn sync:ios && xcodebuild -workspace ios/App/App.xcworkspace -scheme App -archivePath ./build/App.xcarchive archive CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO",
"build:android": "yarn sync:android && cd android/ && ./gradlew assembleDebug && cp ./app/build/outputs/apk/debug/app-debug.apk ../build/",
- "release:ios": "yarn sync:ios && cap build ios",
+ "release:ios": "NODE_ENV=production yarn sync:ios && xcodebuild -workspace ios/App/App.xcworkspace -scheme App -configuration Release -destination generic/platform=iOS -archivePath build/App.xcarchive -allowProvisioningUpdates ${XCODEBUILD_AUTH_ARGS:-} DEVELOPMENT_TEAM=\"$APPLE_TEAM_ID\" MARKETING_VERSION=\"$npm_package_version\" CURRENT_PROJECT_VERSION=\"$(date -u +%Y%m%d%H%M)\" archive && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ios/App/ExportOptions.plist -exportPath build/export -allowProvisioningUpdates ${XCODEBUILD_AUTH_ARGS:-}",
"release:android": "yarn sync:android && cap build android",
"build": "yarn build:ios && yarn build:android",
"start:ios": "yarn build:ios && cap run ios --live-reload --port 3001",
diff --git a/upcoming-release-notes/fix-ios-app-startup-and-notch.md b/upcoming-release-notes/fix-ios-app-startup-and-notch.md
new file mode 100644
index 0000000000..9f7501f1d5
--- /dev/null
+++ b/upcoming-release-notes/fix-ios-app-startup-and-notch.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MatissJanis]
+---
+
+Fix the iOS mobile app getting stuck on the splash screen and the page header being hidden behind the notch