react-native-geolocation-service icon indicating copy to clipboard operation
react-native-geolocation-service copied to clipboard

'react_native_geolocation_service.modulemap' not found

Open itsphil opened this issue 3 years ago • 20 comments

I have already reviewed existing bugs for this repository, with regards to this issue, as well as of course trying multiple other resolutions from other sources.

My issue is that when I go to build my React Native (0.63.3) project I receive the following error from XCode (12.5).

I am using version 5.3.0-beta.1 of this library.

<unknown>:0: error: module map file '/Users/xxxxx/Library/Developer/Xcode/DerivedData/xxxxx-ecleklmmhmlvkgabouhmdsqprivh/Build/Products/Debug-iphonesimulator/react-native-geolocation-service/react_native_geolocation_service.modulemap' not found

itsphil avatar Jun 17 '21 13:06 itsphil

Can you try reinstalling the pods again ? Not sure what could be reason for this. Does this only occur during archiving or also during development ?

Agontuk avatar Jun 25 '21 13:06 Agontuk

I got same error in new project, at first was error like "yogakit/yogakit.modulemap' not found" after trying to fix yoga got this error 'react_native_geolocation_service.modulemap' not found'

StasEvo avatar Aug 19 '21 20:08 StasEvo

I got this problem today. Everything works fine on my main machine (android/windows), my laptop (android/Fedora) and on my Intel macbook (ios and android). I only get this error on my M1 mac. I'll allocate some time this weekend to investigate the problem and I'll update you guys if i find a fix for it.

@itsphil and @StasEvo can you confirm if your device is an M1 type or not? please. Also if you can share your package.json and Podfile that would help a lot.

rafetkhallaf avatar Oct 09 '21 01:10 rafetkhallaf

I'm also struggling with this issue, on an intel mac and on Github actions which also use an intel mac

rossjohnsonMP avatar Nov 04 '21 11:11 rossjohnsonMP

I am also facing same issue intel mac

ansarikhurshid786 avatar Nov 17 '21 10:11 ansarikhurshid786

@ansarikhurshid786 I managed to solve it yesterday, I had changed the platform target in my podfile from 10 to 11 but there were still references to 10 in xcode. changed them to 11 and it worked

rossjohnsonMP avatar Nov 17 '21 10:11 rossjohnsonMP

i just tried 5.2.0 build succeed.

ansarikhurshid786 avatar Nov 17 '21 10:11 ansarikhurshid786

Oh ok @rossjohnsonMP

ansarikhurshid786 avatar Nov 17 '21 10:11 ansarikhurshid786

Facing the same issue. Podfile platform target is already 11 . Any ideas?

sheriffmarley avatar Nov 18 '21 12:11 sheriffmarley

@sheriffmarley, check in xcode under Target > deployment info

rossjohnsonMP avatar Nov 18 '21 13:11 rossjohnsonMP

If it helps anyone, I had the same problem and I got it to build by adding 'arm64' to 'Excluded Architectures' under Build Settings, both in the main project and for the pod. I'm using react-native 0.66.0, on M1-machine in Xcode 13.

Build settings for the app under Targets (setting it under Project didn't seem to help):

image

Modified post_install in my Podfile. Since multiple pods were causing the 'modulemap not found'-error, this makes sure all of them adds 'arm64' to 'Excluded Architectures':

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

    # Added code below
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      end
    end
  end

Run 'pod install'

Note: I don't know if it's a good idea to apply these settings to pods where it's not needed, but I haven't noticed any issues.

gaspop avatar Nov 27 '21 17:11 gaspop

Unfortunately I won't be able to debug this if it's M1 specific. If anyone finds the solution please let me know. It builds fine on my intel mac with RN0.65 and Xcode 13

Agontuk avatar Dec 08 '21 18:12 Agontuk

Any update on this issue?

seiha-dev avatar Feb 07 '22 13:02 seiha-dev

Unfortunately I won't be able to debug this if it's M1 specific. If anyone finds the solution please let me know. It builds fine on my intel mac with RN0.65 and Xcode 13

NO ITS NOT M1 SPECIFIC

ahmadtech2 avatar Feb 07 '22 14:02 ahmadtech2

Faced this issue today, running on a M1 Mac, [email protected] and [email protected]. Doing as @rossjohnsonMP said fixed it. Already had platform :ios, '11.0' set on Podfile, but there were still some references to 10.0 on XCode files. On XCode, I selected the target I wanted on the project navigator, then Build Settings > Deployment > IOS Deployment Target > Changed it to 11.0, boom, it worked

Risovas avatar Feb 07 '22 18:02 Risovas

Facing the same issue with 5.2.0 and all 5.3.0-beta.X versions. Intel Macbook Pro. Solutions above do not work, are there any other workarounds?

dannyeddyy avatar Feb 17 '22 08:02 dannyeddyy

https://github.com/facebook/react-native/issues/28503 https://github.com/facebook/react-native/issues/29605

Anyone facing this can follow these issues for possible solutions.

Agontuk avatar Feb 18 '22 11:02 Agontuk

My steps to solve this issue:

  1. Modify Podfile ( https://github.com/Agontuk/react-native-geolocation-service/issues/287#issuecomment-980772489 )
pod deintegrate
sudo xcode-select --switch /Applications/Xcode.app
pod install
  1. Add 'libswiftDataDetection.tbd' and 'libswiftFileProvider.tbd' to Link Binary with Libraries phase call

avalko avatar Mar 15 '22 11:03 avalko

For me the post_install step from @gaspop was missing and finally solved the issue:

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

    # Added code below
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      end
    end
  end

wmonecke avatar Apr 25 '22 07:04 wmonecke

If it helps anyone, I had the same problem and I got it to build by adding 'arm64' to 'Excluded Architectures' under Build Settings, both in the main project and for the pod. I'm using react-native 0.66.0, on M1-machine in Xcode 13.

Build settings for the app under Targets (setting it under Project didn't seem to help):

image

Modified post_install in my Podfile. Since multiple pods were causing the 'modulemap not found'-error, this makes sure all of them adds 'arm64' to 'Excluded Architectures':

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

    # Added code below
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      end
    end
  end

Run 'pod install'

Note: I don't know if it's a good idea to apply these settings to pods where it's not needed, but I haven't noticed any issues.

thanks

Biplovkumar avatar May 09 '22 11:05 Biplovkumar