[PR #128·129·130] The First Development Build on a Phone: Build Setup, Kakao SDK Initialization, the Start Screen
I wanted to test the customer app on a real phone, so I tried to make an EAS development build (a test version of the app that can be installed directly on a phone). Three things blocked it in turn, from the build itself to the first launch, and three PRs fixed them one by one.
| PR | What was blocked | Cause | Fix |
|---|---|---|---|
| #128 | The development build could not be made | No dev-client package, no project ID, iOS minimum version lower than the SDK’s | Installed the package pinned exactly, wrote the ID into the config, set the minimum version to 16.4 |
| #129 | Tapping Kakao login closed the app | App code never prepared the Kakao SDK | Prepare it once at the first login |
| #130 | Reopening showed Unmatched Route | No screen file received the start address (/) |
Added a screen that routes by login state |
1. The build was blocked from the start (PR #128)
- What was blocked: The build settings were meant for a development build, but three places were missing or wrong.
expo-dev-client, a package a development build requires, was not installed. The official docs say the build only succeeds with it installed, so Claude installed version 57.0.20, pinned exactly.- The config file had no EAS project ID. When I ran
eas init, it said values cannot be written automatically into a dynamic config file and only showed me the value. Claude then wrote it into the config file by hand. initfailed while reading the config. There were two causes: the Kakao app key environment variable was empty (the Kakao plugin raises an error on purpose, to prevent a build with an empty key), and the iOS minimum version setting (15.1) was lower than the SDK 57 minimum (16.4). The second would have blockedeas buildtoo, so it was a real bug and Claude changed it to 16.4.
- What was chosen:
- The install tool wrote
~57.0.20(with a tilde), but this repository uses exact versions only, so it was pinned to57.0.20. - Claude considered adding an environment-name line to
eas.jsonand did not. The official docs say a development-client profile picks the development environment automatically. - The error for an empty key was left alone. It is a safeguard against empty-key builds.
- The install tool wrote
- Checks: Claude confirmed that the config reads without errors with a placeholder key and shows the project ID, and
npm run verifypassed. I raneas initon my own computer to confirm its behavior. - Not confirmed: Claude did not run
eas build. It also could not confirm from an official list thatexpo-dev-client57.0.20 matches the SDK 57 recommended version exactly.
2. Tapping Kakao login closed the app (PR #129)
- The problem: With the Android development build installed on the phone, tapping the Kakao login button made the app close by itself. The dev server terminal printed
UninitializedPropertyAccessException, meaning the Kakao SDK was not ready. - The cause: Claude read the installed package source. The Kakao SDK only becomes ready on Android after JavaScript calls
initializeKakaoSDK(app key). The plugin settings in the config file only record the key and do not make that call, and the app code had no such call anywhere. It was a gap left by the earlier work that first added Kakao login (PR #104). - What was chosen: When
kakaoLogin()is first called, the SDK is prepared once, before login. On success the result is remembered and the call is not repeated; on failure the memory is cleared so the next login tries again. If the key is empty or preparation fails, it is turned into the existing SDK failure error (social_sdk_failed), so the login screen shows the guidance it already had. - Rejected alternative: Calling it from the app start file. That would call it at every start, even in flows that do not use Kakao, and many screen tests load the start file, so the impact is large.
- Checks: Tests were added first, and 4 failed before the fix. They check that the SDK is prepared once with the key before login, that repeated logins call it only once, that a failed preparation is retried on the next login, and that an empty key never calls the SDK.
npm run verifypassed. - Not confirmed: Whether Kakao login actually works on the phone, and how it behaves on iPhone. Claude could not find
initializeKakaoSDKin three pages of the official docs; the evidence is the installed package’s type definitions and Android source. - Lesson: The Kakao SDK plugin settings alone do not make the SDK ready. It only shows up when you tap the button on a device. When starting the dev server, the real native app key must be passed through the environment variable, not a placeholder.
3. Restarting showed “Unmatched Route” (PR #130)
- The problem: Closing and reopening the Android development build showed a screen reading “Unmatched Route: Page could not be found.” with the app’s address scheme (
ficl://). The start address when the app first opens is/, and no screen file received that address. The first time, the app was connected straight to the dev server and opened through a connection address, so the login screen appeared and the gap stayed hidden. A release build would have shown the same screen on first launch. - What was chosen: One screen file (
app/index.tsx) was added. When opened at/, it sends the user to the signed-in screen or the login screen depending on login state (Redirectis the expo-router part that sends to another address). While loading, the existing_layout.tsxalready does not draw this screen, so nothing extra was added. - Rejected alternative: Setting
initialRouteNameon theStack. It is hard to express a start screen that depends on login state, and it would touch the protected-screen structure of_layout.tsx. - Checks: The test was written first, and 2 failed (the address stayed at
/). After the fix, opening at/while signed out goes to the login screen, and while signed in goes to the signed-in screen.npm run verifypassed. - Not confirmed: Whether the login screen opens after closing and reopening the app on the phone.
- Lesson: expo-router tests pass even without a start-address screen (for example with
initialUrl: '/login'), so the gap only shows up on a real device’s first launch.
Who did what
- Me: I wanted to test on a real phone, tried to make the development build, and ran
eas initon my computer. - Claude (Claude Sonnet 5.5): Found the causes by reading, wrote the tests first, and fixed the three problems.
What I learned
Even when automated tests pass, some gaps only show up the first time the app runs on a real device. The Kakao SDK initialization and the start-address screen were like that, and both were JavaScript-only fixes, so no rebuild was needed.