Closed bear-ei closed 4 months ago
Without an error cannot tell what's wrong. If you can create a reproducible example I can take a more detailed look.
https://github.com/bear-ei/op-sqlite-react-native-macos-example
This is a pristine React Native for macOS project. After installing dependencies and Pods, the issue can be reproduced by running npx react-native run-macos
.
The app ran just fine for me <img src="https://github.com/user-attachments/assets/30bfc53f-4fd8-49c7-941f-4ff51b61086d" width="300"/>
Did:
I have captured an error message through XCODE. Cannot initialize a variable of type 'BOOL' (aka 'signed char') with an rvalue of type 'id _Nullable'
.
If possible, could you tell me what issues this might be related to? Many thanks.
Hard to say, chatGPT has the following suggestions:
Ensure that both machines are using the same version of Xcode. Differences in the compiler or SDK versions might cause discrepancies.
• Open Xcode and go to Xcode > About Xcode to check the version.
Verify that the project settings are identical on both machines.
• Compare Build Settings, Build Phases, and Build Rules.
• Ensure the same deployment target and architectures are selected.
Try cleaning the build folder and rebuilding the project.
• In Xcode, go to Product > Clean Build Folder or press Shift + Command + K.
Ensure that any third-party libraries or frameworks are correctly installed and configured.
• Verify that the necessary pods or dependencies are installed and up to date.
• If using CocoaPods, run pod install to ensure consistency.
Ensure the compiler and language settings are consistent.
• In Build Settings, check Objective-C Language Dialect and C Language Dialect.
• Verify that Nullability settings are the same.
Check for any environment variables or path differences.
• Compare the output of env or printenv in the terminal on both machines.
• Ensure the PATH variable includes the correct paths for Xcode tools.
Ensure the correct version of Xcode Command Line Tools is installed.
• Run xcode-select --install to install or update the Command Line Tools.
Sometimes, derived data can cause issues. Try deleting it.
• In Xcode, go to Window > Organizer > Projects, select your project, and delete the derived data.
Describe the bug CompileC /Users/bearei/Library/Developer/Xcode/DerivedData/Bearei-cfkefzitawvsoiahawyfiooznfcf/Build/Intermediates.noindex/Pods.build/Debug/op-sqlite.build/Objects-normal/x86_64/OPSQLite.o /Users/bearei/Documents/code/bear/client/Bearei/node_modules/@op-engineering/op-sqlite/ios/OPSQLite.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'op-sqlite' from project 'Pods')
Versions:
Reproducible example npx react-native-macos-init Initialises a new react-native-macos project. Failed at compile time.