-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode build failure #6
Comments
You appear to have a mac that is using apple silicon. The underlying SDK needs to be updated to handle this but until that happens you can get around it by adding this to your Podfile ( # define architecture at the top level of your Podfile
architecture = `uname -p` # arm64 or i386
target 'YourAppNameHere' do
# ... you will have all your stuff in between here
post_install do |installer|
flipper_post_install(installer)
## add this here after the above
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if architecture === 'arm64' # only enable this for apple silicon
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
end
end
end
end
end |
Thanks for looking into this. I have a 4 year old mac. arm64 could be attributed to me running this on an actual iphone device? But regardless let me try the podfile changes you suggested and report back. |
I'm curious did you create a bridging header for swift or already have one? There is a step in the readme on how to do this if you haven't created one yet - https://github.com/homeeondemand/react-native-mapbox-navigation#ios-specific-instructions |
Yeah. I had that configured. I was able to resolve this issue ONLY for emulator by removing Here is the stackoverlow I created: https://stackoverflow.com/questions/66079852/xcode-react-native-undefined-symbol-swift-getfunctionreplacement which has more details. Feel free to close this issue but I do have one last question for you. I am seeing the lanugage as |
Hey glad you got it figured out for the simulator at least. I see that you received an answer in your stackoverflow post and hopefully that resolves it. I have witnessed some odd behavior with language in the navigation UI as well. I believe it is related to this - mapbox/mapbox-navigation-ios#2605. I left a comment in that thread. In the future I might add language prop and then set it on the native side. It should be using the language set by the device but I have witnessed some parts of the nav UI be different. |
Hi @rossmartin , I did what they said, but the error still continues. |
@nitinsh99 @mertozylmz What version of cocoapods are you using? I can't reproduce the issue with Xcode 12.4 and cocoapods 1.10.1 @mccooll Can you elaborate on the negativity? |
@nitinsh99 It appears that you marked that stackoverflow answer to your question as a solution. Does that solve your issue? |
hey @rossmartin @mertozylmz yeah.. following steps solved the issue for me
However, I am still seeing following issues which were not originally related to this issue
These two should be easily reproducible..thx |
Thanks for the details. Has your RN Xcode project gone through RN version updates? I think this can explain the need for step 1 and 2 in your solution. My next question was going to be around what version of cocoapods was being used. I should have asked that one first. In regard to the issues that are still there - I can't solve that 1st issue yet unfortunately. The 2nd issue you mention I should be able to implement that delegate method on the native side and provide a prop that accepts a callback function. Perhaps something like I'm going to close this issue for now and I'll follow up when I release a new version with the prop for handling the navigation ending. |
Hey @nitinsh99 I added an I could not find a delegate/callback in the SDK that gets called when you tap the "End Navigation" in the bottom banner. Now you will know when you have arrived at the destination though. |
We're also seeing nearly the same issue as nitinsh99. For us, it complains about the _swift_getFunctionReplacement50, but for x86_64. We have react-native : v0.63.4, cocoapods 1.10.1, and xcode : 12.0 (also tried 12.4). Removing |
@devguy22 this is a really nasty issue but I am pretty positive its not related to this react-native library as eventually things worked out for me without any change in this library.. The only I other think I could think of which you can try is flush out the derived data folder after you made library search path changes |
Thanks, we still see that error after trying to delete that DerivedData. Our error in XCode is this: Any ideas? We tried manually adding that .a library to our project (in addition to the libPods .a), but it didn't help. |
@devguy22 I am having the same issue and tried everything I could but nothing helps. Updated the xcode, downgrading the react-native, creating a fresh project but nothing seem to work |
Something interesting to note, when we pulled all the library source code into the project, we found everything works if it's marked as dynamically linked. Seems to be something related to the library being statically linked? Relevant lines from our Podfile:
|
So, I have gotten this to work for me. In my case, I did need to have the Mapbox Libraries load dynamically. In order to achieve this, I needed to:
Note, our app uses the expo libraries (not build environment) which requires |
Thanks for providing the details. I haven’t had time until now to catch up on emails. I closed on the purchase of a house yesterday and I’ve been busy with that and starting to move. I’ll be swamped in the coming weeks but I’ll try to help when I can. |
@LowBudgetMan @devguy22 I had some time to revisit this stuff tonight. I spent too much time going down this rabbit hole with the root cause of the library being statically linked. One thing I did do is publish If I get some more time I'll try and find a solution. Until cocoapods can incorporate dynamic swift pods then I may have to go the route that @LowBudgetMan mentions. |
@LowBudgetMan @devguy22 I was able to find a "solution". I found out how https://github.com/react-native-mapbox-gl/maps is getting around this issue and they are using this hack - https://github.com/react-native-mapbox-gl/maps/pull/714 I added that to the I'll be updating the readme also to document setting the |
Just an update on this specific issue and related ones (hopefully the last update needed) - It has been resolved as of release 1.0.2 and I have documented how to solve potential build issues in the readme - https://github.com/homeeondemand/react-native-mapbox-navigation#ios-specific-instructions |
@devguy22 @rossmartin Hey, I've been trying to implement this package in RN, got it working following @devguy22 advice with the use_frameworks! dynamic loading. But once i try to bring in some other packages (RNReanimated, react-native-screens, react-navigation) I get some non specific errors: Just wondering if anyone has experienced similar issues when trying to integrate this package into your app. THANK YOU! |
@adhendo try not using |
@zoolle only problem is im on a macbook m1/silicon so the use_frameworks! tag solved the issues i was having with the arch incompatibilities Edit: ok after searching around I think your solution is correct of specifying which pods should use dynamic frameworks instead of just using the |
FYI if you're using the react native map library, the workaround may cause a problem: https://github.com/react-native-mapbox-gl/maps/issues/1097#issuecomment-781647269. |
Hi all, I am getting following error during xcode build after installing this package
I am using
The text was updated successfully, but these errors were encountered: