Closed andreialecu closed 3 years ago
I was able to get it to build by adding an empty swift file to the project so that a bridging header is created.
And more importantly removing this:
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
"\"$(inherited)\"",
);
From project.pbxproj
for both debug and release. I haven't tested for side effects, but now it builds and runs in arm64 mode on the simulator.
I'm not sure why this is required, might be an issue with React Native.
Another solution? I have the same problem.
I don't know of the side effects either, but @andreialecu's suggestion helped me to get the project running in the simulator. It would run fine on a physical device, but it would fail with 100 errors every time I tried to do a simulator run.
For me it was this change
So fixing this and patching the package fixed it for me
In node_modules/react-native-geolocation-service
Open react-native-geolocation-service.podspec
Change s.dependency "React"
back to s.dependency "React-Core"
Follow the steps to add a patch https://www.npmjs.com/package/patch-package
All worked fine after that after yarn install, pod install
For me it was this change
So fixing this and patching the package fixed it for me
In
node_modules/react-native-geolocation-service
Openreact-native-geolocation-service.podspec
Change
s.dependency "React"
back tos.dependency "React-Core"
Follow the steps to add a patch https://www.npmjs.com/package/patch-package
All worked fine after that after yarn install, pod install
Awesome. This worked for me. Can you please explain why do we need to do this ? I'm curious...!!! Thanks in advance.
This is on a Mac Mini using the new M1 Apple Silicon chip.
It seems that the pods fail to compile when the
arm64
architecture is enabled, which is by default. I am not sure why this happens, but it seems to be related to swift.If I add
arm64
toExcluded Architectures
the build completes properly, but the entire app getsarm64
disabled and it performs poorly on the simulator.These warnings appear:
And afterwards it lists 100+ errors similar to:
Any suggestions for things to try would be appreciated!