CodeSign error in simulator pod libs - ios

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.

Related

Xcode compile error - linker undefined symbol

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++' }

Xcode build error when building onto device - Library not found for -lDoubleConversion

So my app has run and built successfully on the Xcode simulators. The app is a react native app
However when trying to put it onto a device I get the error.
What steps do I need to take to get this to work?
Library not found for -lDoubleConversion
Notes:
-I am running the Xcode workspace file
-I did try use_framework! in the Podfile but I don't think that was right and caused more issues
also tried adding it to the podfile
The reason I had this error is that my iOS version required in my podfile was not the same as that as the min version in xcode.
The error generated by xcode wasn't helpful in this case and pretty ambiguous given the range of answers on the internet

Carthage, Xcode 9. "xcodebuild timed out while trying to read *.xcodeproj" error

Today I downloaded xCode 9 and started converting everything to Swift 3.2/4, so I can build and run my project.
As it was expected carthage complaint about some project that they could not be build, as they were not compatible with Swift 3.2/4. I had to find the versions that were compatible and build them.
I also had to use --no-use-binaries, as some frameworks are precompiled with previous versions of Swift.
I then got the following error:
xcodebuild timeout while trying to read AWSiOSSDKv2.xcodeproj
So far I was probably not getting this error, as i was downloading AWS framework precompiled. Now that carthage had to compile it locally, something was missing and was creating the timeout.
To sort it out I did the following steps:
Open the timed out project in Xcode
Do not do anything
Run "Carthage build --platform iOS"
Everything compiled without any errors. It seams that once the project is opened in Xcode, Xcode is automatically adding something that is missing and the project compiles then.
This process has to be followed after every "carthage update", as the update will download a fresh xcode project.

error: Invalid bitcode version (Producer: '800.0.35.0_0' Reader: '703.0.31_0')

When I try to Archive my application on Xcode 7.3.1, I am getting following error:
error: Invalid bitcode version (Producer: '800.0.35.0_0' Reader:
'703.0.31_0') clang: error: linker command failed with exit code 1
(use -v to see invocation)
I was able to successfully Archive my app yesterday, can any one please help me?
i had this error before ...
you may try the following solution it worked for me
search for bitcode keyword in app --> Build Settings and change it to NO
then archive again -->
it should work fine now
Install Xcode 8:
https://developer.apple.com/download/
Xcode 8 GM seed may be used to submit apps to the App Store.
More info:
In my case I updated to the latest Facebook iOS SDK 4.15.1. Since that library was updated with Xcode 8 and I was still using Xcode 7.3.1 it caused the error.
https://developers.facebook.com/docs/ios/change-log-4.x
Updated for Xcode 8 GM and iOS 10.
So, double check 3rd party libraries.
Or if you don't mind disabling bitcode:
Go to build settings search bitcode and change "Enable Bitcode" to "No".
I also faced the same problem, and as suggested by #Nate,
the issue was because of a third party SDK integrated in our project using Cocoapods.
To help me figure out which one of the 15 pods i had in the project was responsible, i did the following:
Create a new xcode project
Copy the Podfile from your original project to the newly created project's directory
Do pod install
Remove one or more of the pods⋆
Archive the new project, and see if it succeeds, if not repeat step 4 till you are able to archive
⋆(you can also try something like binary search, wherein you delete the first half pods in your Podfile and see if the new project archives)
Once you've figured out the library causing the issue, keep downgrading the library by explicitly specifying the version in Podfile, until the project archives successfully.
And then you can use that version of the library to archive and upload to the app store.
If you are using lib or pod that mean that one of them built by a higher version of your current Xcode, you can either update your code or return back to the previous version where the pods were built by your current version.
If you ran pod update check the pods updated if you ran pod install check the dates of the pods comparing to the release date of your Xcode that will will lead you to the responsible pod.
I got it while I was building using Xcode 8.2.1 and the pod built by Xcode 8.3.1
I also faced this error: Invalid bitcode version (Producer: '800.0.24.1_0' Reader: '703.0.31_0') I have googling so many but unable to find the proper solution. I tried Myself and solved this probable
In my case this error occurs after adding FBSDK by drag and drop that we all usually do.
You can resolve this problem by following these steps:
Delete all pod script in build Phases.
Delete the dragged FBSdks file from the project.
Exit xcode and delete 3 things "Pod folder","Podfile.lock" and "Projectworkspace"
Search and add FBSDK pod link in podfile
Install the pod again by using terminal.... now open Xcode archive your project build.
good solutions, but disabling bitcode worked for some people.
edit :- it worked for me too.
but in future your app might be in problem or (build not optimised by Appstore) if your project is **Bitcode Disable **.
Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.
Note: For iOS apps, bitcode is the default, but optional. If you
provide bitcode, all apps and frameworks in the app bundle need to
include bitcode. For watchOS apps, bitcode is required
So thats why try to figure out error solutions right way.
The error basically says:
The static linker could not correctly link a certain bitcode bundle, which was
produced using Producer: '902.0.39.2', and is being read using Reader:
'900.0.37'.
You can look up at https://gist.github.com/yamaya/2924292 to identify the Xcode versions for the corresponding compiler versions. In the current case, the reader (our Xcode version) is Xcode 9.0, whereas the producer (Xcode version of typically a third party SDK) is Xcode 9.4. The incompatibility between the two is the root cause of this issue.
You may either:
turn off the bitcode as discussed in other answers, or
roll-back the SDK to a previous version that worked well, or
update your codebase to use the newer Xcode version.

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?

Resources