Search code examples
iosswiftcocoapodsxcglogger

Trouble installing XCGLogger swift_2.0


I am trying to install XCGLogger Swift 2.0 using xcode7.4 beta using cocoapods.

Here is my pod file.

platform :ios, '8.0'
use_frameworks!

target 'City Summer School' do
    pod 'Firebase', '>= 2.3.3'
    pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
end

target 'City Summer SchoolTests' do
    pod 'Firebase', '>= 2.3.3'
    pod 'XCGLogger', :git => 'https://github.com/DaveWoodCom/XCGLogger.git', :branch => 'swift_2.0'
end

Yet when I try and compile I get this error.

error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: /Users/nim/Library/Developer/Xcode/DerivedData/City_Summer_School-cwdihbtsferehfbcdcilbmzrnqbp/Build/Products/Debug-iphonesimulator/City Summer School.app/Frameworks/XCGLogger.framework/XCGLogger (No such file or directory)

Have I missed something in the install?

To add additional information

I ran pod install, from the terminal after I configured my Podfile which added to my already existing xcworkspace file.

In the project settings under Linked Frameworks and Libraries?

Pods_City_Summer_School.framework was listed as required.

This is a conversion from Swift 1 --> Swift 2.0


Solution

  • You're leaving out a lot of missing information about your setup. I actually just installed XCGLogger tonight in a new Swift 2 project and it works.

    1. Did you open xcode with the workspace file generated by 'pod install' and build from there? You have to use the workspace, not the "old" project file.
    2. Is the pod framework set as optional in your project (not the pod project) settings under Linked Frameworks and Libraries?