Xcode compile error - linker undefined symbol - ios

I need your help. My Xcode stopped compiling my code with errors as in the image.
My setup: Xcode 13.1, Cocoapods + DevPods
Code compiled until yesterday morning, and now does not compile. Whats weird is that even code I have pushed on Monday to AppStore throws exact same errors as on image.
Tried clearing caches, deintegrate pods and install them again, removed xcode and installed one more time with xcode-install. Even upgraded from Big Sur to Monterey today and this also changed nothing.
Same is for build for simulator and for device
Apple Silicon on board, Xcode and Cocoapods native (not Rosetta)

One of my Dev pods decided for unknown reason to not link libc++ ... I fixed this by adding to it's .podspec file this line:
s.xcconfig = { 'OTHER_LDFLAGS' => '-lc++' }

Related

dyld: Library not loaded: /usr/lib/swift/libswiftWebKit.dylib

I'm getting this error when I run my app through iphone 6s ios version 13.1.2 but it is workin with ios version 14 and up. I tried deleting Pods, brew update, brew upgrade, brew cleanup and update my xcode to latest version but I still get this error. How to fix this error? thank you so much!
I had the same error and fixed it by going into my app in Xcode under the Project Navigator, then opening Frameworks, and deleting libSwiftWebKit.tbd. I had recently updated the deployment target to IOS 12 as well as updated the Podfile, which I think had something to do with it. I think there was a bug in an earlier version of Xcode or my Podfile settings, whereby I had to include libSwiftWebKit.tbd manually, but after recent updates, that was fixed such that it doesn't need to be included manually anymore.
I experienced the same issue and was exhausted with that because I tried different other suggestions but all were in vain. In the end, Deleting the Build folder from Xcode brought me luck.
So my suggestion will be, first of all, to try to
Delete the Build folder (Xcode > Products > Clean Build Folder) or (Shift+Command+K)
If it doesn't work then try other options.

App is working on Simulator but not on Device

I have these two errors in my project:
Cannot find protocol declaration for 'AppConsentDelegate'
Reference to 'AppConsentDelegate' is ambiguous
It's a library from CocoaPods and I don't understand why this is working on Simulator (I tried several ones on 13.5 and 14.4) and not on Device (I tried on 14.4). I can't even archive it.
Clean build and DerivedData folder, quit Xcode, pod deintegrate, pod clean and pod install don't solve the issue.
I'm not very familiar with Objective-C, please help me.

Xcode compilation unexpected results

✅ Xcode 10.2.1
I have a project, on which I worked in Xcode 10.2.1. Suddenly it started to get stuck building one of my many pods (one of 2, inconsistently). Says something like "Building <AppName>: <PodName> | Building 749 of 803 tasks". And while idle, it gets stuck "Indexing Text".
Update: This version is unable to Build or Index ANY project I try. True even for unchanged presets.
SOLVED: Restarting my machine was the solution
✅ Xcode 11.0 Beta 1
Just to test, I've opened this project in Xcode 11 Beta (1) and it worked just fine. I was able to Build and Run, Archive but not Distribute (AppStore Connect says tool is unsupported).
❌ Xcode 11.0 Beta 4
The latest available Beta, however, Builds and Runs this project with no problems, however, fails to Archive it.
Additional information
I tried cleaning, restarting; updating CocoaPods; reinstalling and reinitializing all Pods, nothing helped.
The issue appeared, seemingly, out of nowhere, not in between installing or updating any of the Pods.
It worked perfectly in Xcode 11.0 Beta 1, just as one would expect any version of Xcode to work with an .xcworkspace. No warnings, no errors, nothing.
Solved this whole thing by restarting my machine.

Unable to archive iOS app after updating to Xcode 7.3

I'm having problems archiving an iOS Swift application since the last Xcode update (Xcode 7.3), the application builds and runs correctly in debug mode but as soon as I try to archive it I get the following error:
No such module "RealmSwift"
Although it references RealmSwift it fails randomly importing this or any other pod.
The most strange point is that downgrading to Xcode 7.2.1 and Command Line tools 7.2 doesn't fix the problem.
I've clean Cocoapods cache, completely removed ~/Library/Developer folder, removed my Pods folder within the project folder. Even trying to archive with a different machine doesn't work. I rolled back to a version of the app released on Crashlytics and therefore successfully archived in the past with the same result.
Any thoughts about what could be wrong?

CodeSign error in simulator pod libs

I was implementing a share extension. Out of nowhere an error occurs when I try to build the project for iOS simulator:
CodeSign error: entitlements are required for product type 'Static Library' in SDK 'Simulator - iOS 8.4'. Your Xcode installation may be damaged.
The error appears on most included CocoaPods libraries:
It works perfectly fine on my iPhone 6.
What have I done before the error occurred
I merged a branch into another branch (git).
What have I tried to solve the error
Reverting the branch: no effect
deleting Pods directory and Pod.lock file and install pods again: no effect
UPDATE
I downloaded the iOS simulator 8.3 and I get the identical error (... in SDK 'Simulator - iOS 8.4' ...).
It seems that the Xcode installation was really broken. I deleted Xcode and installed it again. It works, now.

Resources