I would like to add SwiftyJSON to my app.
I install it using the terminal and create a Podfile in the same folder.
I follow all the steps onSwiftyJSON on github. When I compile the xcode, it turns out the error:
It seems that I did not have a module called SwiftyJSON.modulemap.
What's wrong with that?
If you are working in swift 2.3 the pod is:
pod 'SwiftyJSON', '~> 2.4'
This is the pod that working properly.
Related
My earlier version of swift was in 2.2.
I have updated Alamofire using different options like
pod 'Alamofire', '~> 4.0'
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.5.0'
Whenever I open the workspace, it asks to convert to latest, I opted for swift 2.3. But the Xcode shows the errors below:
Header 'Alamofire-Swift.h' not found
Could not build Objective-C module 'Alamofire'
and inside Alamofire
Cannot convert value of type 'SecTrustResultType' to expected argument type 'UInt32'
I have deleted the files under the folders ~/Library/Developer/Xcode/DerivedData and build again . Same errors display.
What may be the wrong thing I did ?
As per Alamofire documentation it will work only with :
CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+.
I followed following steps and it's working fine :
Open your terminal -
sudo gem update --system
sudo gem install -n /usr/local/bin cocoapods --pre (It will install prerelease version 1.1.0.rc.3 because final version not came yet)
pod setup
pod repo update
remove all pods of your project and install it again ( Comment pod names by # -> Do pod update and again by removing # -> Do pod update )
I am new to Swift, but I learned the basics. I wanted to import a framework but I ran into issues. I will now explain what steps I followed and what failed.
I installed cocoapods by using terminal command: sudo gem install cocoapods
I then navigated to my projects root directory with terminal then used command: pod init
It created a podfile, and I edited it as I have shown below.
platform :ios, '8.0'
use_frameworks!
target 'Testy' do
end
target 'TestyTests' do
pod 'Kingfisher', '~> 1.8.1'
end
target 'TestyUITests' do
pod 'Kingfisher', '~> 1.8.1'
end
I then closed xcode and started the project by clicking 'Testy.xcworkspace' file.
At this point, I did not add any code, just built the project without issues, problems start here.
When i try to import my framework and build, it gives the follow error:
Cannot load underlying module for 'Kingfisher'
So what might be the problem here? If you need additional info, ask me and I can provide.
In your Podfile, you do not have "pod 'Kingfisher', '~> 1.8.1'" listed for the target "Testy".
I'm trying to import Parse SDK with cocoapods (version 0.37.2). I have recentl but right after doing a pod install There is no Parse.framework in the Pod folder...
When I try to build the app, it failed because with it doesn't find the parse.h from #import <Parse/Parse.h> in the bridging header file (which is quite normal because there is no Parse Framework).
Is this possible that as I previously used Parse for another project, when my computer downloads it, it changes the name, such as Parse.framework(2) and then the system can't retrieve it...
Here are the messages from terminal right after the pod install (which look good):
Analyzing dependencies
Downloading dependencies
Installing Bolts 1.2.0 (was 1.2.0)
Installing Parse 1.7.5 (was 1.7.5)
Generating Pods project
Integrating client project
And this is what the podfile looks like :
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
`pod 'Parse', '~> 1.7.5'``
Last point: I have recently upgraded my version of rbenv (from 2.1.2 to 2.2.2) and as Cocoapods is in ruby, I am wondering there could be a link....
Any help would be grateful !
Thanks
What is your version of your cocoapods?
If you are using 0.38.0, it might be changes of CocoaPods make the spec fail. Try to replace
pod 'Parse', '~> 1.7.5'
with
pod 'Parse', podspec: 'https://gist.githubusercontent.com/siuying/6a548f1924ed3243aeb5/raw/ccea130108b14afbaf22dbe828f75a62d750a4a0/Parse.podspec.json'
and see if it works for you.
If your "Objective-C Bridging Header" in project level it's possible to get this error. You should set this in target level! After added in your target please don't forget to remove from project level. This must solve your problem, I solve like this.
Senario:
I'm studying parse.com inter-table relationship via code.
I've set up a cocoapod dependency and am working from the .workspace.
This is the podfile content:
platform :ios
pod 'Parse', '~> 1.7.2.1'
However I received the following compiler error:
Apparently I'm missing a Library.
What am I doing wrong?
Try rerunning pod update from the project folder via the command line, then cleaning your build.
Also, you don't need to be quite to specific with your podfile. Try this instead:
platform :ios
pod 'Parse', '~> 1.7'
I am developing app using CXFeedParser. But after doing all the integration,
The File "MWImageParser.m" is generating error.
# import "tidy.h" and "buffio.h" not found
buffio.h and tidy.h is a part of TidyLib.
Simple solution is to include its source in your project (see include and src folder).
Other solution is to include a cocoapod tidy-html5 (seems to be experimental, so be careful). There is a cocoapod for MWFeedParser too.
Check the Cocoapods website for more information (if you still need).
Basically, after installation (via sudo gem install cocoapods), you need to create the following Podfile in your project root, with the following content:
pod 'MWFeedParser', '~> 1.0'
pod 'tidy-html5', '~> 0.0'
Then run pod install and open the generated xcworkspace.
Note: only Podfile and Podfile.lock should be added to source control. The Pods directory can be ignored.
Edit: You are using CXFeedParser. If you look at the CXFeedParser podspec, you'll see it has a dependency with CTidy. So remove MWFeedParser from your project and have the following Podfile:
pod 'MWFeedParser', '~> 1.0'
pod 'CTidy', '~> 0.3'
There is very simply way i have found, no need to do any pod setup, just download the Tidy.h and Buffio.h from GIT Hub and include in Your project, and it will run smoothly..
Finally solved my own question.