1
votes

caveat: new to cocoapods... I have a swift xcode project and I'm trying to use the XCGLogger pod, but after adding it to the podfile, (with use_frameworks! ), pod install -- everything looks good:

enter image description here

but when I put the import XCGLogger in my appdelegate, the compiler tells me No such module: XCGLogger.

import UIKit
import Crashlytics
import XCGLogger

What could I have done wrong (this time:) ?

thanks!

1
How are you importing it? (line of code please)Schemetrical
@Schemetrical added imports to question.Billy Pilgrim
Are you launching the .xcworkspace that was created by cocoapods?NSWill

1 Answers

4
votes

According to: https://github.com/DaveWoodCom/XCGLogger

How to Use

Add the XCGLogger project as a subproject to your project, and add either the iOS or OS X library as a dependancy of your target(s). Under the General tab of your target, add the XCGLogger.framework to the Embedded Binaries.

Then, in each source file:

import XCGLogger

You don't need cocoapods for this. Download the .zip from the link above. Unzip and use the .xcodeproj located in the Library directory for step 1...

  1. Add the XCGLogger project as a subproject: enter image description here

  2. Add the iOS library as a dependency of your target: enter image description here

  3. Under the General tab, add the XCGLogger.framework to the Embedded Binaries: enter image description here

Then...

import XCGLogger

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        // Override point for customization after application launch.

        let log = XCGLogger.defaultInstance()

        return true
    }

And that's it.