Embrace Cocoapods
Yes there are desperate times, maybe because things get worse before they get better. Anyway, please use Cocoapods in your projects.
Install CocoaPods:
1 | sudo gem install cocoapods |
It would not work if you are in China, try:
1 | gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/ |
Try install CocoaPods again:
1 | sudo gem install cocoapods |
Up and running, next setup the Pod:
1 | pod setup |
Navigate to the directory containing your project:
1 | cd someDirectory |
Open the Podfile using command (or edit it using any text editor):
1 | open -a Xcode Podfile |
Modify Podfile (just for example):
1 | platform :ios, ‘8.0’ |
Save it and Go back to terminal (still at your project directory):
1 | pod install |
From now on you have to use the .xcworkspace of your project. And before starting your work, remember to include these framework in the General, Linked Frameworks and Libraries.
You could find a better tutorial by googling.