ios emulator build fails

  • 1 April 2022
  • 1 reply

Badge +5

I am running react-native-purchases 4.5.3 on an m1 MacBook with xCode 14. Building works fine on a physical device but fails on emulator with this error:


fatal error: module map file '/Users/xxxxxx/Library/Developer/Xcode/DerivedData/xxxxxxx-aypdoepholwfczhdoyntaygzhteb/Build/Products/Debug-iphonesimulator/PurchasesCoreSwift/PurchasesCoreSwift.modulemap' not found
1 error generated.

Has anyone experienced that problem?

1 reply

Userlevel 3
Badge +5

Hey @womo,

Thanks for reaching out about this! These types of errors can definitely be frustrating 😔 So, I’ve tried to replicate this on my machine to see how I can help but I have not been able to replicate it. My setup looks like:

  • RNPurchase 4.5.3
  • M1 with macOS 12.3
  • Xcode 13.3 (latest)

I think I’ve seen this issue past I’ve when using using an unsupported deployment target version, if derived data was messed up, or if the RN libraries weren’t properly linked. 

I would probably start debugging there by verifying deployment version, clearing your derived data and rebuilding, and then making sure all of your RN libraries are properly linked. My next problem solving thing would be to create a new simple RN project and only add Purchases to see if it builds in the project. From there, you can determine if its a a machine issue or a project issue.

Hopefully some of the helps! Keep me updated because I want to make sure that we are able to help you get this running on simulators 😊