MongoSwift Pod contains 100 compiler errors. Unable to build after install - ios

I have an iOS app I am planning on integrating with MongoDB. After installing the pod files, upon build I get about 100 errors and I'm not really sure what's causing it or how to fix them.
Added a screenshot of some of the errors. They are all almost exactly the same.
I have tried reinstalling the MongoDB cocoapod (pod 'StitchSDK', '~> 5.0.0') With the same results.
I'm using Xcode 10.2, set Swift language to 4.0, iOS target build to 11.0 (I may have done these completely wrong though.)
Expecting to be able to build the app with no errors.

You can now use the latest version, StitchSDK 6.0.0.
You will need to wait for the SDK to be updated. Meanwhile, you can download a previous version of Xcode. You will be able to test iOS apps with iOS 12.1.4, but NOT 12.2 and up
https://github.com/mongodb/stitch-ios-sdk/issues/156.

Related

Xcode Cloud fail on ci_post_clone.sh

Couldn't find enough information about Xcode cloud and is wondering if anyone is facing any issues using cocoapods with Xcode cloud.
I am aware that I need to add a file called ci_post_clone.sh if I have cocoapods.
Almost every time, my Xcode cloud build will fail on the ci_post_clone.sh script where according to the log, installing some cocoa pod fail. And the cocoa pod fail varies, each time, a different cocoapod will fail.
For example, below is the log. I never have problem getting AMPopTip, GooglePlaces error, and this is the first time.I am aware that AMPopTip SDK is quite old and its not updated regularly.
I am just trying to understand how common this problem is and how have any of you bypass it.
Some of the things I have done is,
Clean, rebuild via Xcode Cloud
Run multiple times, each time, error varies and if I am lucky, the build will succeed. So far, I only manage to get 1 successful build out of 5 tries.
First build
Second build
Third build
Xcode cloud environment are
Xcode version: 13.4.1
macOS version: macOS Monterey 12.4
Local machine environment are
Xcode version: 13.4.1
macOS version: macOS Monterey 12.4
cocoapods version 1.11.3

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.

Building old version of React-Native app with Xcode 11

I just started working on an already existing React-Native app that needs a really small update, but that has not been updated since October 2019.
The first thing I need, in order to start updating it, is to build the app. That is where I cannot find a way to do it.
At the moment, I’m trying to build the app only on iOS and not on Android.
First of all the current toolset versions I’m using are:
React-Native version: 0.53.3
Xcode version: 11.4.1
iOS SDK: 13.4
Node version: 8.16.6
NPM version: 6.14.1
I initially had problem with third-party tools, but I managed to fix it through manually installing them in the node-modules/react-native folder.
Now I’m getting errors about Xcode not finding headers of the modules the app is using
like, for example,
React/RCTViewManager.h file not found
Or, similarly, the GoogleSignIn.h headers in the RNGoogleSignIn module
I believe it’s just an error of how libraries are imported in Xcode, because as a test I have created a new react-native “test app” with the same exact versions of react-native and node, then I installed the core dependencies needed to perform the update on the original app, and I managed to build it without problems.
I’ve also tested building the app on an old Mac with macOS 10.14, using Xcode 9, but I’ve got different errors, always related to importing headers of modules.
This is the toolkits versions of the “old Mac”:
React-Native version: 0.53.3
Xcode version: 9.4.1
iOS SDK: 11.3
Node version: 8.16.6
NPM version: 6.14.1
Searching online I know that some of the problems I have faced (like the third-party react-native manual install) have been fixed in react-native updates, but I’m not expert enough with the technology to be sure that I can handle the update process without introducing bugs. I would prefer to just make this version run for now and facing the updating process later.
Do you have any suggestion of things about what I can do in order to successfully build the app?

If anyone ever comes here with a similar problem: the solution was pretty simple.
Be sure you're using the .xcworkspace file in your iOS folder, and not the .xcodeproj. This is used to automatically (and correctly) load the Pods dependencies in Xcode without having to manually link them.
Be sure that you installed the dependencies correctly with the right version of Cocoapods. We had to use an old version (1.5.x) that would automatically downloaded some pod dependencies. Our error was due to Facebook SDK. Newer versions of cocoapods did not download it, while the 1.5.x version would download it.

Issues rebuilding alamofire with iOS 10

I have an iOS app that worked great in iOS 9 but when I upgraded to iOS 10, I am getting an error with alamofire. When I build the app it says
"Module file was created using an older version of the compiler, rebuild 'Alamofire' and try again"
I have attempted to rebuild it by typing carthage update and it does rebuild the framework files but when I re-add them as embedded or linked binaries, I get the same error. How can I go about diagnosing and fixing this issue? I suspect that this isn't an iOS 10 issue in particular but more just a rebuilding that I am failing to grasp.
Change Xcode's command line tools to point to the 8 beta app:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/
See the Swift 3.0 issue on the Alamofire repo for more info.

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.

Resources