简体   繁体   中英

App compiles for a simulator but not a physical device

Recently I tried integrating a pod but as soon as I do I get this error:

ld: in /Users/bentran/Library/Developer/Xcode/DerivedData/Nervy-ggvazspfamkfqmgbpaglrqonunrk/Build/Products/Debug-iphoneos/UXCam.framework/UXCam(UXCam.o), building for iOS, but linking in object file (/Users/bentran/Library/Developer/Xcode/DerivedData/Nervy-ggvazspfamkfqmgbpaglrqonunrk/Build/Products/Debug-iphoneos/UXCam.framework/UXCam(UXCam.o)) built for iOS Simulator, file '/Users/bentran/Library/Developer/Xcode/DerivedData/Nervy-ggvazspfamkfqmgbpaglrqonunrk/Build/Products/Debug-iphoneos/UXCam.framework/UXCam' for architecture arm64

Ive seen many other stackoverflow posts talking about this issue but in reverse (app compiles for physical device but not for simulator). Does anyone know how to fix this?

Edit: Running lipo -info /Users/bentran/Library/Developer/Xcode/DerivedData/Nervy-ggvazspfamkfqmgbpaglrqonunrk/Build/Products/Debug-iphoneos/UXCam.framework/UXCam

Produces: Architectures in the fat file: /Users/bentran/Library/Developer/Xcode/DerivedData/Nervy-ggvazspfamkfqmgbpaglrqonunrk/Build/Products/Debug-iphoneos/UXCam.framework/UXCam are: arm64 x86_64 i386

I was facing the same problem. Updating the react-native-ux-cam package to version 5.3.1, then updating the pods solved it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM