Multiple Apple Mach-O Linker Error - ios

I had a working application, and then I learned to use cocoapods and I installed CWPopup. I had not tried to run the app since I started using the .xcworkspace instead of .xcodeproj so I think that may be the problem, but I'm not sure.
I had zero errors and then I tried to run it and now I have 14 errors, all saying Apple Mach-O Linker Error. Underneath each one I see different things mentioning twitter and facebook seesions and requests and such. I don't even use twitter or facebook in my app, this is a very basic app.

This error says that you lost some required frameworks or libraries in your project. Check in your Targets->Build Phases-> Link Binary With Labraries is all required frameworks and libraries added.

Related

Invalid Bundle - One or more dynamic libraries are not present in the dylib search path

I have problem when uploading new build to TestFlight. I get error:
Invalid Bundle - One or more dynamic libraries that are referenced by
your app are not present in the dylib search path.
I know there are many topics that are about this error but nothing help me so far. I am using Carthage for 3rd party libraries. I tried:
Always Embed Swift Standard Libraries - set to either YES or NO. Both doesn't work.
Check .ipa file with otool -L and all libraries from Carthage were there
I was thinking that problem could be with linking libz.tbd and libsc++.tbd but I removed them and it didn't help
When I disable bitcode when creating build app gets successfully to TestFlight but app is crashing at start
Anyone can help me with this? Thanks

Sudden Error when Uploading to iTunesConnect: ITMS-90635 Invalid Mach-O Format / ENABLE_BITCODE

Last week i was able to upload my ipa to iTunesConnect just fine. But as of today I am getting the following error when uploading via Application Loader:
ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle "Application.app/Frameworks/PSPDFKit.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(machine code) and arm64(machine code), while the nested bundle Mach-O contains armv7(bitcode and machine code) and arm64(bitcode and machine code). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting."
I am aware of the solutions proposed here: Xcode - Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store and in many others.
I have however no idea how to apply any of the proposed solutions to a Xamarin iOS project. I am not using any pods, instead I am using a Binding library for PSPDFKit, which I have created as described in the official documentation https://pspdfkit.com/guides/ios/current/other-languages/xamarin/.
As far as I can see there are two ways for me to go, either to enable bitcode in my project (which I have no idea how to do) OR to disable bitcode in the binding project for PSPDFKit (which I have also no Idea how to do).
I am grateful for any help or propositions.
I finally was able to do it, with one of the solutions from this post https://stackoverflow.com/a/37624641/2702513
What I had do do, was stripping the Bitcode from my library, which can be done with this command:
$ xcrun bitcode_strip -r {PATH_TO_LIBRARY} -o tmp.dylib
The command extracts the machine code from the library into the tmp.dylib file which then can be used instead of the library itself. In case of PSPDFKit the library is inside the framework.

App rejected by Itunes Connect - dynamic libraries

I submitted my App to the App Store, but it got rejected. I received an email saying :
Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.
I'm not using CocoaPods, so all external frameworks are installed manually. I've already tried to change the Dynamic library install Name to :
$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)
but I still get the same error from Apple.
EDIT: Still no solution for me.
I included my .tbd in the other linker flags as suggested here
I added #executable_path/Frameworks, #executable_path/../Frameworks and #loader_path/Frameworks to Runpath Search Paths as suggested on several posts.
I tried everything from this tutorial
I finally solved my problem by deleting all my external frameworks and libraries, and reinstalling them with CocoaPods.

Linker Error when using Google Play Services and Unity

I currently want to use Leaderboards from Google Play Services in Unity 5.
When I run the project on the device I receive a huge amount of linker errors:
I followed the instructions on https://github.com/playgameservices/play-games-plugin-for-unity#ios-setup. After the export I added the listed bundles and libraries. To be precise I have (dowloaded from https://developers.google.com/games/services/downloads/):
Play Games C++ SDK Version 1.4 (GoogleOpenSource.framework, GooglePlus.bundle, GooglePlus.framework)
Google-plus-ios-sdk-1.7.1 (gpg.framework, gpg.bundle)
I also made sure I set the -ObjC compiler flag. And I am sure I added the list of iOS libraries that are required by Google Play Services (AddressBook.framework, AssetsLibrary.framework, CoreData.framework, CoreTelephony.framework, CoreText.framework, Security.framework, libc++.dylib, libz.dylib). iOS Target is set to 7.0 and higher. You can see the library setup and bundle resources here (I cut of the non G+ libraries for a smaller graphic):
The errors seem to indicate a missing library. However I checked that the libraries are in the projects folder and linked in the binary libraries under Build Phases.
The only discrepancy between my setup and the documentation I could find is that there is no GooglePlayGames.bundle, but it now seems to be named gpg.bundle instead. However this should not result in linker errors.
Do you have any idea what could cause these errors?

Undefined symbols for architecture i386 linking facebook sdk

I am trying to link the facebook library to my app but i am getting this very strange error:
what does this mean? I got this to work on another app, the files and code are the same...
The error you are seeing is from the linker. When you compile your code, the compiler can find declarations for all the functions that you need, because you're including the facebook header (facebook.h). But when it comes time to link your program, the linker tries and fails to find compiled versions of those facebook methods. You need to bring the facebook SDK into your project and link against it.
The way I'm going to recommend linking against the Facebook SDK is actually one I haven't tried before, but it looks like the simplest way to get your project building:
Download and install the FacebookSDK framework from here.
Drag the FacebookSDK.framework bundle, which will end up in ~/Documents/FacebookSDK into your Xcode project.
When given the option, choose not to "Copy items into destination group's folder" and make sure that your application target is selected in the "Add to targets" section.
You may have to change your current #import/#include lines. To see the facebook methods from the framework you just imported, you should import like:
#import <FacebookSDK/FacebookSDK.h>

Resources