question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expo-dev-launcher plugin inject code to AppDelegate everytime when run prebuild

See original GitHub issue

Summary

I created an expo v44 project and installed expo-dev-client, when I runned expo prebuild -p ios multiple times, I found that this code was inject repeatly: image I found the issue may caused by expo-dev-launcher, the extra $& made appDelegate.includes(DEV_LAUNCHER_APP_DELEGATE_ON_DEEP_LINK) always return false?

Managed or bare workflow? If you have made manual changes inside of the ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

Package versions

expo-dev-client: “~0.8.4”

Environment

expo-env-info 1.0.2 environment info: System: OS: macOS 12.2.1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node npm: 6.14.16 - ~/.nvm/versions/node/v14.19.0/bin/npm Watchman: 2021.06.07.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.10.2 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 29, 30, 31 Build Tools: 29.0.2, 31.0.0 System Images: android-30 | Google Play Intel x86 Atom_64, android-31 | Google Play ARM 64 v8a IDEs: Android Studio: Arctic Fox 2020.3.1 Patch 4 Arctic Fox 2020.3.1 Patch 4 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild npmPackages: expo: ~44.0.0 => 44.0.6 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 npmGlobalPackages: eas-cli: 0.47.0 expo-cli: 5.3.0 Expo Workflow: managed

Reproducible demo

  1. expo init
  2. npm i expo-dev-client
  3. expo prebuild -p ios # run this command multiple times

view your AppDelegate.m file, you will find this code exists multiple times, it should only exist once

#if defined(EX_DEV_LAUNCHER_ENABLED)
  if ([EXDevLauncherController.sharedInstance onDeepLink:url options:options]) {
    return true;
  }

Stacktrace (if a crash is involved)

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
ajsmthcommented, Mar 15, 2022

thanks for submitting this issue! looks like I was able to reproduce this as you’ve described, so we’ll have a fix for this in the next release – I don’t think this should impact your app other than being an annoying bit of extra boilerplate

0reactions
github-actions[bot]commented, Jun 30, 2022

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Config Plugins - Expo Documentation
Config plugins are a system for extending the Expo config and customizing the prebuild phase of managed builds. Internally Expo CLI uses config...
Read more >
The prebuild plugin does not run on every build which is ...
I used the plugin to auto-generate the build version from the GIT repository information. From prebuild plugin documentation: "Commands of type ...
Read more >
How to add an AppDelegate to a SwiftUI app
Learn Swift coding for iOS with these free tutorials.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found