Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[dev-client] Allow running projects without app.json #3371

Merged

Conversation

fson
Copy link
Contributor

@fson fson commented Apr 7, 2021

Why

We allow bare projects to not have an app.json / app config module, but previously trying to run a project without an app.json in dev client resulted in an error.

Please define "ios.bundleIdentifier" in app.json.

How

This PR changes this so that when app.json exists, but we can detect a bundle identifier from the Xcode project, no error is thrown and we simply use the bundle identifier from the native project.

Test Plan

Created an app using npx crna -t with-dev-client, removed app.json and verified that expod run:ios works.

@linear
Copy link

linear bot commented Apr 7, 2021

ENG-655 Create app.json if it doesn't exist when using --dev-client and launching with `i` or `a` hotkeys

In BundleIdentifier.ts We try to read the bundle identifier from the native project and app config, and if the native project config exists but app config does not then we attempt to manually update the app config. Problem: if there is no app config file, we bail out with an error rather than handling it automatically:

Please define "ios.bundleIdentifier" in app.json.

You can resolve this by creating an empty app.json, but we should just create it for the user.

I assume the same problem exists when launching the dev client for Android.

@fson fson requested a review from brentvatne April 7, 2021 17:54
@EvanBacon EvanBacon merged commit ab30775 into master Apr 8, 2021
@EvanBacon EvanBacon deleted the ville/eng-655-create-appjson-if-it-doesnt-exist-when branch April 8, 2021 18:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants