Solvedreact native onesignal OneSignal OneSignalNotificationExtension build fail on Xcode 12 related to cocoapods / architecture / simulator issues
✔️Accepted Answer
I’m having some issues too with Xcode 12
I can successfully build the project on Xcode 11. However as soon as I open the Xcode12 and build the project I get the following error:
▸ Linking OneSignalNotificationServiceExtension
❌ clang: error: no such file or directory: '/Users/carloscuesta/project-folder/ios/build/project/Build/Products/Debug-iphonesimulator/libRCTOneSignal.a'
This doesn’t seems an error from OneSignal side. Looks like there’s something weird with cache or something like that,
things I tried:
- Delete Xcode Derived Data -
rm -rf ~/Library/Developer/Xcode/DerivedData/
- Clear react-native, yarn cache and reinstall dependencies.
- Reset simulator data and contents
- Restarted the computer
I don't know what else I should try, I would say that everything is linked properly since the application is working good on Production and the build works with Xcode 11.
I have the library linked manually using the OneSignal guide, any idea on how to fix this ? 🙏🏼
Typically when I got this issue it was solved by cleaning the DerivedData
but I can't get rid of the error
Other Answers:
i am using react-native-onesignal 3.9.1 on react native 0.60.0 version...I am able to resolve this issue by including x86_64 inside User-Defined settings (VALID_ARCHS)
I've discovered something weird,
If I try to build the application with Xcode 12, it always fails. However If I build the application first with Xcode 11 and then open up Xcode 12 and build the app it works
However as soon as I clean build and try to rebuild again with Xcode 12 it starts to fail with the same error again
Same error here with with Xcode 12 and onesignal-react-native 3.9.1 :-(
Projects were working before the update.
Description:
Just updated from Xcode 10 to Xcode 12, before on v10 this project built and run successful.
OneSignalNotificationExtension target build fail:
and 100 errors more
I'm not so good on Xcode and Mac so I'm sorry if it's no clear or misleading.
Thank you
Environment
react-native 0.63.2
onesignal-react-native 3.9.1
Xcode 12
Installed via npm and linked with pods
Steps to Reproduce Issue: