mxcl / PromiseKit

Promises for Swift & ObjC.
MIT License
14.23k stars 1.46k forks source link

Erros with <angled> imports on promisekit.h file (version 1.7) #428

Closed matteonovelli-zz closed 8 years ago

matteonovelli-zz commented 8 years ago

I've got this errors when I try to compile on release:

- ERROR | xcodebuild:  /Users/matteo/Library/Developer/Xcode/DerivedData/App-agyylfaavsayemdgzozvlpmubnef/Build/Products/Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:44:9: error: 'NSNotificationCenter+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild:  /Users/matteo/Library/Developer/Xcode/DerivedData/App-agyylfaavsayemdgzozvlpmubnef/Build/Products/Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:50:9: error: 'NSURLConnection+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild:  /Users/matteo/Library/Developer/Xcode/DerivedData/App-agyylfaavsayemdgzozvlpmubnef/Build/Products/Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:59:9: error: 'UIActionSheet+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild:  /Users/matteo/Library/Developer/Xcode/DerivedData/App-agyylfaavsayemdgzozvlpmubnef/Build/Products/Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:62:9: error: 'UIAlertView+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild:  /Users/matteo/Library/Developer/Xcode/DerivedData/App-agyylfaavsayemdgzozvlpmubnef/Build/Products/Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:65:9: error: 'UIView+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild:  /Users/matteo/Library/Developer/Xcode/DerivedData/App-agyylfaavsayemdgzozvlpmubnef/Build/Products/Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:68:9: error: 'UIViewController+PromiseKit.h' file not found with <angled> include; use "quotes" instead

If I replace imports by "quotes" imports everything works fine but I don't know if it is a good solution. Can someone help me please?

mxcl commented 8 years ago

You have not provided enough information for us to help you, Xcode version? PromiseKit version? How did you install PromiseKit? Etc.

matteonovelli-zz commented 8 years ago

I'm using Xcode 7.3 and PromiseKit v 1.7 installed via cocoapods 1.0 Errors occur only when I try to compile on release.

- ERROR | xcodebuild: ../Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:44:9: error: 'NSNotificationCenter+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild: ../Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:50:9: error: 'NSURLConnection+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild: ../Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:59:9: error: 'UIActionSheet+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild: ../Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:62:9: error: 'UIAlertView+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild: ../Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:65:9: error: 'UIView+PromiseKit.h' file not found with <angled> include; use "quotes" instead
- ERROR | xcodebuild: ../Release-iphonesimulator/PromiseKit/PromiseKit.framework/Headers/PromiseKit.h:68:9: error: 'UIViewController+PromiseKit.h' file not found with <angled> include; use "quotes" instead

Here is my podfile:

target 'OMApi' do

    pod 'AFNetworking', '2.6.0'
    pod 'AFNetworkActivityLogger', '2.0.4'
    pod 'PromiseKit', '~> 1.0'
    pod 'JSONModel', '~> 1.0'

end

Thanks!

mxcl commented 8 years ago

You're building at the command line with xcodebuild? Does the same happen in Xcode with the Archive option?

matteonovelli-zz commented 8 years ago

I'm running pod spec lint

mxcl commented 8 years ago

I believe this may be a change in how CocoaPods specifies its import path since 1.0.

nathanhosselton commented 8 years ago

Closing manually since GitHub will not auto close commits not merged into master.

ManueGE commented 8 years ago

In case anyone is still interested, I fixed the issue by adding this lines in the bottom of my Podfile:

post_install do |installer|
    `find Pods -regex 'Pods/PromiseKit/objc/PromiseKit.h' -print0 | xargs -0 sed -i '' 's/\\(<\\)\\(.*\\)\\(>\\)/\\"\\2\\"/'`
end