Closed
Description
Hi.
I've been reading here and there, and I am unsure how to use the framework with swift.
I've seen people aking their own wrappers in swift, but that was quite some months ago.
Following the issues in there, my understanding is that there's an official swift wrapper for using cocoalumberjack.
Having retrieved the lib with cocoapods , the beta 4 from 2.0.0, I still don't see any swift class there, and none of the example projects uses a swift also.
So I'm kinda confused how to make that work with the "official" means.
Any light that you can shed on this ?
Thx
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
rivera-ernesto commentedon Nov 27, 2014
I think that for now you should install the standard Objective-C library with CocoaPods and then manually import the
CocoaLumberjack.swift
wrapper, as CocoaPods doesn't yet support Swift.I will just make sure that the wrapper is preserved in the directory as currently it gets deleted by CocoaPods.
rivera-ernesto commentedon Nov 27, 2014
Also there is #400.
GuyFran commentedon Nov 27, 2014
I have added , as usual, the lib pod to my podfile. It's there.
Now I've manually imported the CocoaLumberjack.swift to my project (in swift).
But I get a compile error : import CocoaLumberjack -> "No such module"
Do I need to add on something ? Tweak the bridging header file ?
palewar commentedon Nov 27, 2014
@crazykoala May be this will help - http://swiftwala.com/cocoapods-is-ready-for-swift/
GuyFran commentedon Nov 28, 2014
I have followed the procedure indicated, and it's working for alamofire and swiftjson.
Not working for cocoalumberjack though.
I tried to paste
pod 'CocoaLumberjack', :git => "https://github.com/CocoaLumberjack/CocoaLumberjack.git", :branch => "podspec"
in my Podfile. No success. What would be the proper line for the podfile for this library ?
palewar commentedon Nov 28, 2014
@crazykoala Give this a try:
pod 'CocoaLumberjack', :git => "https://github.com/ValCapri/CocoaLumberjack.git"
GuyFran commentedon Nov 28, 2014
Ok this retrieves the pod with the .swift wrapper.
But still it doesn't compile afterwards.
Really no luck :/
rivera-ernesto commentedon Nov 28, 2014
@palewar Maybe also include the
:commit
.GuyFran commentedon Nov 28, 2014
@rivera-ernesto , is there such a way with the "official" repo ?
Or is there a step by step guide on how to include the lib with a swift project ? (with or without cocoapods)
rivera-ernesto commentedon Nov 28, 2014
Yes. You just set the official repository in the
:git
part.GuyFran commentedon Dec 1, 2014
I see , but I'm actually trying to get it working with Swift.
@palewar , when I use this branch, I get the swift class, but I get an error upon compile : " No such module CocoaLumberjack" on the import line.
Could you help me fix this ?
rivera-ernesto commentedon Dec 1, 2014
Closing this in favor of #383.
palewar commentedon Dec 1, 2014
@crazykoala Probably a silly question, but are you using
.xcworkspace
file to open and build project? Please share yourPodfile
with me or your github URL if it's a public project and I will see if I can do anything to get it working.67 remaining items