-
Notifications
You must be signed in to change notification settings - Fork 318
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
Linker error with Xcode 12 and CocoaPods 1.9.3 — building for iOS, but linking in dylib file #2674
Comments
Hi, glad to hear your making progress. This linker error looks like CocoaPods/CocoaPods#10026. Upgrading to CocoaPods 1.10.rc.1 should fix the error. Please let us know if it persists after upgrading CocoaPods. |
Confirmed, cocoa pods 1.10.rc.1 fixed the problem |
@1ec5 @ehmjaysee I have the same problem, installed 1.10.0.rc.1 but I still have the same problem, can build for simulator but cannot for my device |
@MarcoCarnevali, did you run |
Here is what I did after I upgraded to 1.10.rc.1
|
@1ec5 yes, I even deintegrated pod and re-installed from scratch. Both debug and release scheme, Xcode 12.0.1, iPhone 8 Plus with iOS 13 |
Are you able to build for the “Any iOS Device” target? What are the values of the following build settings in your application target (as applicable)?
|
@1ec5 no, can't build for |
Seems that I fixed it, after several different try I was able to make it work, seems that you have to pod deintegrate, remove derived data, pod install and it should work! Thank you guys |
Actually little update, I can build it for my simulator and device but I cannot archive it. odd issue, archive is successfull but I can't locate it on the finder or organizer. |
Hi,
Do you want also my pod file? |
@lfongaroScp that error is a different one I think it's better if you open a new issue |
@MarcoCarnevali, I have the same problem as you |
https://stackoverflow.com/a/63955114 This post solved the problem for me |
@Knapiii this fixed your problem with the archive? |
This sounds similar to the workaround we put into #2667. I suppose it’s possible that CocoaPods fails to apply the workaround sometimes, in which case it might work to deintegrate and reintegrate as in #2674 (comment).
That’s quite strange. Does Xcode print out anything to the system console or build log related to the archive? |
@1ec5 nothing there and the archive is successful. I can find it on finder but when I open it : The archive could be corrupted or unreadable |
Same problem here with Cocoapods 1.10.0.rc.1
|
By way of an update, this issue was resolved in #2677 by removing a build phase that was incompatible with CocoaPods.
This is expected, because of CocoaPods/CocoaPods#10026.
This is unexpected. 😕 #2674 (comment) lists some build settings; if you provide that information about your project here, it might be clearer whether the workaround is being applied correctly. |
The same struggle here. The app was compiling, archiving, and working alright. Last working build is still available on Testflight https://testflight.apple.com/join/1TpdHGJ4 Then I changed package manager, from Carthage to Cocoapod. It works in the simulator. As soon as I try the real device, I get tons of weird errors. I have CocoaPods 1.10.rc.1 I tried this: https://stackoverflow.com/questions/24993752/os-x-framework-library-not-loaded-image-not-found And this https://stackoverflow.com/questions/2718246/xcode-warning-multiple-build-commands-for-output-file |
@byvalentino, what Xcode version are you using, and which device were you building for? What are your values for the build settings listed in #2674 (comment)? For what it’s worth, we’ve gotten fewer reports of problems with Carthage, provided that you use the workaround in #2676. |
iPhone 8, iOS 13.7
|
I think the workaround we applied in the podspec is supposed to clear out
This project builds without errors in Xcode 12.0.1 and runs on an iPhone 8 device running iOS 13.7 in both the Debug and Release configurations. These are some of the cases we tested before landing the workaround in #2667, so I wonder if the issue is that the workaround isn’t being applied. Have you also tried |
If anyone has been holding off to avoid using a prerelease version of CocoaPods, v1.10.0 just came out and it includes the fix for CocoaPods/CocoaPods#10026. |
My iPhone iOS devices are not working with my account please help me my iPhone 11 iPhone pro Max |
Update your Xcode to 12.2 (if you are using macOS Big Sur) and install cocoapods version 1.10.rc.1. It will fix the error. |
Problem alive and kicking for me. Then, it continued with Xcode 12.2, macOS Big Sur, Cocoapods --pre, and Mapbox for Native React. Tried all these https://stackoverflow.com/questions/34433818/xcode-7-2-successful-archives-will-not-show-in-organizer-but-will-show-in-archi/45925542#45925542 Now the project compiles and runs only on a real device, not on iOS simulator. Builds are successful when archiving; however, the generated archive is corrupted and it does not show in the Organizer, thus the App can't be distributed on Appstore. Just removing the following link from Podfile fixes the problem of corrupted Archives, but the App results amputated, as it no longer includes the Map.
|
If you’re using CocoaPods and your application target has a custom value for the |
We just hotfixed the map SDK v6.2.2 and v6.3.0 podspecs on CocoaPods trunk to address another linker error that could occur, but you may need to wipe your CocoaPods caches to obtain the fix: mapbox/mapbox-gl-native-ios#549 (comment). |
I found a fix that is an abomination, but it works. At the same time, since it works, the problem seems simple. How to fix it? https://stackoverflow.com/questions/64933102/xcode-builds-successfully-a-corrupted-archive-not-showing-in-organizer-as-soon/64989153#64989153 |
#2672 (comment) has a status update on the migration to XCFrameworks in the navigation SDK’s dependency tree. The short story right now is that MapboxCoreNavigation v1.2.0-beta.1 is out of the woods and should even build for simulators on an M1 Mac; however, MapboxNavigation is still blocked by the map SDK: mapbox/mapbox-gl-native-ios#171.
Downgrading to CocoaPods v1.9.x is unlikely to be a solution, at least not for anyone who needs to build in Xcode 12.x. |
Forgive my naivety, but is the only viable workaround to downgrade to Cocoapods 1.9.3? The error I'm seeing is similar to the one described in this issue, but not exactly the same - it can be seen in #2852 |
Completely destroying my Cocoapods setup, cleaning the cache, and upgrading to Mapbox Navigation 1.3.0 resolved this for me. I can now build for both the simulator and real iOS devices. |
I have the same issue |
Getting similar issue on a Flutter App using https://pub.dev/packages/flutter_mapbox_navigation. After excluding arm64 architecture, I am finally ending up with this -
Any suggestions? |
Progress. I can now install v1.0.0 with cocoapods without error. However I cannot build for any iOS target other than simulator. I get the error:
ld: building for iOS, but linking in dylib file (/Users/mjc/Library/Developer/Xcode/DerivedData/test-eogwsxynjracdvgsbxwkmhvsrfzy/Build/Products/Debug-iphoneos/MapboxCommon.framework/MapboxCommon) built for iOS Simulator, file '/Users/mjc/Library/Developer/Xcode/DerivedData/test-eogwsxynjracdvgsbxwkmhvsrfzy/Build/Products/Debug-iphoneos/MapboxCommon.framework/MapboxCommon' for architecture arm64
I tested this by creating a new empty Xcode project and a new Podfile:
Using Xcode 12.0.1
pod version 1.9.3
The text was updated successfully, but these errors were encountered: