简体   繁体   中英

Apple Mach-O Linker Error Parse

I recently added the iOS Parse Framework to my Xcode 5 project. I am getting 10 errors now... None from code. They are all Apple Mach-O Linker Errors. I took the framework out and the errors went away. I am using the latest Parse.framework, so I do not know why I am getting these errors.

I also have another question, now that I updated to Xcode 5.1, when ever I use the UITabBarController or just want to add a tab bar to a ViewController... I gets all weird. The entire bar turns a solid grey...

Parse Mach-O Linker Error Picture http://postimg.org/image/s0y7b6a23/

UITabController Problem Picture http://postimg.org/image/osp4kdyej/

According to Parse iOS quick start doc :

You need to have all these frameworks added to your build Target

在此输入图像描述

I had similar linker errors using v1.6.2 of the Parse SDK. except I got around 30 errors.

I ended up fixing the issue by removing the -ObjC linker flag from other linker flags under MyTarget > Build Settings > Linking.

其他链接器标志

This is what the sample Parse project found in the Quick Start section of the Parse docs does, so let's assume that it's correct.

您可以尝试删除第一个问题的目标 - >构建设置 - >库搜索路径下的路径。

Solution step by step for fixing this problem (it is useless to modify your Xcode project's configuration, you just have to use the latest versions of all softwares, API(s), tools + clean all XCode builds and everything will be alright):

1 - Use the latest versions of Xcode, Swift/Objective-C and iOS.

2 - Delete all Xcode builds.

rm -rf ~/Library/Developer/Xcode/DerivedData/*

3 - Install/Update Cocoapods (it is important to use the last version) to manage dependencies.

sudo gem install cocoapods

4 - Update your Podfile:

vim Podfile

pod '[Name of the API]', '>= [Any API version]'

5 - Update your local repository:

pod repo update

6 - Update the dependencies of the Xcode project:

pod update

Generally from that point your "Apple Mach-O Linker Error Parse" will disappear.

To your second question - I had images that were not sized correctly in my tab bar and got the same result you speak of. I deleted them out of the tab bar and it went back to normal. Not sure if this answers your question, but doing this solved the problem for me. Tab bar images should be 50x50.

好了2015年7月,我尝试了上面的所有解决方案,但最终解决了这个问题,通过使用Pocoa通过CocoaPods添加Parse并在我的项目中直接删除(或者不首先添加)框架。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM