'EXDevMenu-Swift.h' file not found

Hi,

I have a new error while building my app

'EXDevMenu-Swift.h' file not found

#import <EXDevMenu-Swift.h>

After updating react-native-firebase

expo doctor                              
✔ Found all copies of expo-modules-autolinking
Expected package expo-modules-autolinking@~0.8.1
Found invalid:
  expo-modules-autolinking@0.9.0
  (for more info, run: npm why expo-modules-autolinking)
✔ Found all copies of @expo/config-plugins
  All copies of @expo/config-plugins satisfy ^4.1.0
✔ Found all copies of @expo/prebuild-config
  All copies of @expo/prebuild-config satisfy ^4.0.0

I am using expo 45.0.6 and the following plugins

 "plugins": [
      "@react-native-firebase/app",
      ["expo-build-properties", {"ios": {"useFrameworks": "dynamic"}}],
      [
        "expo-media-library",
        {
          "photosPermission": "Allow $(PRODUCT_NAME) to access your photos.",
          "savePhotosPermission": "Allow $(PRODUCT_NAME) to save photos.",
          "isAccessMediaLocationEnabled": true
        }
      ]
    ]

and for iOS
"jsEngine": "jsc"

I have added expo-build-properties following react-native-firebase/CHANGELOG.md at main · invertase/react-native-firebase · GitHub

Locally (after running expo prebuild & pod install), running the app gives the following errors:

:x: (node_modules/expo-dev-menu/ios/EXDevMenuAppInfo.m:20:15)

18 | DevMenuManager *manager = [DevMenuManager shared];
19 |

20 | if (manager.currentManifest != nil) {
| ^ property ‘currentManifest’ not found on object of type ‘DevMenuManager *’
21 | appName = [manager.currentManifest name];
22 | appVersion = [manager.currentManifest version];
23 | }

:x: (node_modules/expo-dev-menu/ios/EXDevMenuAppInfo.m:21:24)

19 |
20 | if (manager.currentManifest != nil) {

21 | appName = [manager.currentManifest name];
| ^ property ‘currentManifest’ not found on object of type ‘DevMenuManager *’
22 | appVersion = [manager.currentManifest version];
23 | }
24 |

:x: (node_modules/expo-dev-menu/ios/EXDevMenuAppInfo.m:22:27)

20 | if (manager.currentManifest != nil) {
21 | appName = [manager.currentManifest name];

22 | appVersion = [manager.currentManifest version];
| ^ property ‘currentManifest’ not found on object of type ‘DevMenuManager *’
23 | }
24 |
25 | NSString *engine = @“JSC”;

:x: (node_modules/expo-dev-menu/ios/EXDevMenuAppInfo.m:26:19)

24 |
25 | NSString *engine = @“JSC”;

26 | if ([[[[manager currentBridge] batchedBridge] bridgeDescription] containsString:@“Hermes”]) {
| ^ no visible @interface for ‘DevMenuManager’ declares the selector ‘currentBridge’
27 | engine = @“Hermes”;
28 | }
29 |

:x: (node_modules/expo-dev-menu/ios/EXDevMenuAppInfo.m:30:32)

28 | }
29 |

30 | NSString *hostUrl = [manager.currentManifestURL absoluteString] ?: @“”;
| ^ property ‘currentManifestURL’ not found on object of type ‘DevMenuManag’
31 |
32 | appInfo[@“appName”] = appName;
33 | appInfo[@“appIcon”] = appIcon;

can you run npm why expo-modules-autolinking@0.9.0 to see where it comes from?

node_modules/expo-modules-autolinking
expo-modules-autolinking@“^0.9.0” from the root project
expo-modules-autolinking@“0.9.0” from expo@45.0.6

I have tried to rollback to expo 45.0.5 and expo-modules-autolinking 0.8.1 and same issue occurs

can you look at the diff since your last successful build to try to determine which change led to this build error?

I have updated the following dependencies

@react-native-firebase from 14.11.0 to 15.0.0
expo from 45.0.5 to 45.0.6
expo-modules-autolinking from 0.8.1 to 0.9.0

and small updates for native-base, react-hook-form, react-native-toast-message

in app.json file, the only modification is config-plugins from

"plugins": ["@react-native-firebase/app"]

to

  ["expo-build-properties", {"ios": {"useFrameworks": "dynamic"}}],
      "@react-native-firebase/app",
      [
        "expo-media-library",
        {
          "photosPermission": "Allow $(PRODUCT_NAME) to access your photos.",
          "savePhotosPermission": "Allow $(PRODUCT_NAME) to save photos.",
          "isAccessMediaLocationEnabled": true
        }
      ]
    ]

We’re experiencing the exact same error while attempting to update to SDK 45 (specifically 45.0.5). However, we are not using react-native-firebase.

It’s originating in the expo-dev-menu pod’s EXDevMenuAppInfo.m file (node_modules/expo-dev-menu/ios/EXDevMenuAppInfo.m). Doesn’t look like there’s a EXDevMenu-Swift.h file anywhere in our project.

Our Expo Doctor returns free of issues. Here’s the error in Xcode

can you try narrowing it down to an exact cause? it’s hard for us to debug without more detail info about the root cause or a reproducible example

in Xcode logs

/Users/expo/workingdir/build/node_modules/expo-dev-menu/ios/EXDevMenuAppInfo.m:3:9: fatal error: 'EXDevMenu-Swift.h' file not found
#import <EXDevMenu-Swift.h>
        ^~~~~~~~~~~~~~~~~~~

⚠️  (/Users/expo/Library/Developer/Xcode/DerivedData/niceandcomobile-hamodiixzgfsswgplhvlcrjjsoxo/Build/Intermediates.noindex/ArchiveIntermediates/niceandcomobile/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/expo-dev-menu.build/Objects-normal/arm64/EventHandlerRegistry.dia:1:1)

CompileC /Users/expo/Library/Developer/Xcode/DerivedData/niceandcomobile-hamodiixzgfsswgplhvlcrjjsoxo/Build/Intermediates.noindex/ArchiveIntermediates/niceandcomobile/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/expo-dev-menu.build/Objects-normal/arm64/EXDevMenu_vers....
^ Could not read serialized diagnostics file: error(in target 'expo-dev-menu' from project 'Pods')
(warning truncated)

3839

› Compiling expo-dev-menu Pods/expo-dev-menu » EXDevMenuAppInfo.m

3840

❌  (node_modules/expo-dev-menu/ios/EXDevMenuAppInfo.m:3:9)

  1 | // Copyright 2015-present 650 Industries. All rights reserved.
  2 | #import "EXDevMenuAppInfo.h"
> 3 | #import <EXDevMenu-Swift.h>
    |         ^ 'EXDevMenu-Swift.h' file not found
  4 | #import <EXManifests/EXManifestsManifestFactory.h>
  5 | 
  6 | @implementation EXDevMenuAppInfo

3841

› Compiling expo-dev-menu Pods/expo-dev-menu » DevMenuVendoredModulesUtils.m

3842

▸ ** ARCHIVE FAILED **

here’s a good guide for you to help narrow it down fyi/manual-debugging.md at main · expo/fyi · GitHub

I am removing one by one my modifications and running builds

My build fails as soon as I add "expo-build-properties" with following plugin configuration

 [
        "expo-build-properties",
        {
          "ios": {
            "useFrameworks": "dynamic"
          }
        }
      ]

So it’s not related to react-native-firebase or expo version

1 Like

The build issue is caused by

 {
          "ios": {
            "useFrameworks": "dynamic"
          }
        }

thanks for the info. what version of expo-dev-client do you have installed?

You’re welcome - Thanks for you help

expo-dev-client@~1.0.0:
version “1.0.0”

1 Like

able to reproduce it here: GitHub - brentvatne/mlecoq

thanks, i reported this to the dev client team

1 Like

you can downgrade to expo-dev-client@0.8.6 to resolve this for now

I have tried with 0.8.6 and I have another build error

❌  (node_modules/expo-updates/ios/EXUpdates/ReactDelegateHandler/ExpoUpdatesAppDelegateSubscriber.swift:9:7)

   7 |   public func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
   8 |     if EXAppDefines.APP_DEBUG {
>  9 |       EXUpdatesControllerRegistry.sharedInstance().controller = EXUpdatesDevLauncherController.sharedInstance()
     |       ^ cannot find 'EXUpdatesControllerRegistry' in scope
  10 |     }
  11 |     return true
  12 |   }

4101

▸ ** ARCHIVE FAILED **

We see the same error when downgrading to expo-dev-client@0.8.6 using a Expo bare app (in the process of upgrading from sdk 44 to sdk 45). Our Podfile uses the following use_frameworks configuration

use_frameworks! :linkage => :static

I’ve included our entire Podfile below in case it can be helpful

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules")

platform :ios, '12.0'
install! 'cocoapods', :deterministic_uuids => false

require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}
use_modular_headers!
use_frameworks! :linkage => :static

target 'Joro' do
  use_expo_modules!
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  pod 'RNGoogleSignin', :path => '../node_modules/@react-native-google-signin/google-signin'
  pod 'expo-dev-launcher', path: '../node_modules/expo-dev-launcher', :configurations => :debug
  pod 'expo-dev-menu', path: '../node_modules/expo-dev-menu', :configurations => :debug

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  # Uncomment to opt-in to using Flipper
  #
  # if !ENV['CI']
  #   use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
  # end

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

    # Workaround `Cycle inside FBReactNativeSpec` error for react-native 0.64
    # Reference: https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-812543933
    installer.pods_project.targets.each do |target|
      if (target.name&.eql?('FBReactNativeSpec'))
        target.build_phases.each do |build_phase|
          if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
            target.build_phases.move(build_phase, 0)
          end
        end
      end
    end
  end

  post_integrate do |installer|
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
  end

end