-
-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Build In Xcode 7.1 #466
Comments
Sounds super strange, since we have tests passing on every commit running Xcode 7.1, which explicitly test CocoaPods linter. I would suggest tyin to clean your derived data and/or reinstalling all your pods. |
Same thing here... |
Hi @nlutsenko.
I'm sorry for the inconvenience. |
@shushutochako adding code to the Podfile is a workaround, not a solution. Same problem here with CocoaPods 0.39.0, Xcode 7.1 & Parse 1.9.1. @nlutsenko why is the style |
One million times THIS. Same goes for Bolts. Also, referencing Bolts with I've been doing the refactoring here, @nlutsenko and will be glad to push them through. |
Looks like Bolts imports are also affected.
Bolts is broken too:
@BellAppLab I don't think that |
You're right, @fluidsonic. |
@BellAppLab just tested it.
|
Yes, @fluidsonic. I did the same test here, which is why I suggested the |
The correct import directive is actually |
Another good call. I'll be refactoring based on these findings. If you come across anything else, please let us know, @fluidsonic. |
Although still a workaround I think the best trick is to use a proxy header: Bolts.h
And then instead of This should work with and without CocoaPods & with and without modules. |
Feel free to submit those if you like. |
Bolts: BoltsFramework/Bolts-ObjC#179 Facebook SDK is also affected: https://developers.facebook.com/bugs/1512425999080858/ |
Replacing angular with quoted imports is not the best thing to do (will expand more on this). |
This issue only affects modules, not static libraries. Bolts, Parse and Facebook SDK are all broken for us due to angular imports. After a lot of compiling and fixing we can finally build our project again using the pull requests #469, BoltsFramework/Bolts-ObjC#179 and facebook/facebook-ios-sdk#801. |
I've been keeping a bridging library between Parse and Swift, with a couple of helper methods that encapsulate common patterns in implementing Parse enabled apps: https://github.com/BellAppLab/Parsable.git Since Xcode 7.1, there has been red warnings all over the place. The situation is dire and some locals say we are not going to recover from this ever. Back to you at the studio. P.S.: AFAIK, when building Swift apps with Obj-C dependencies, one has to use the |
Thanks, @fluidsonic. Were you able to build FB's SDK? I'm having issues with |
@BellAppLab yes, we addressed the Facebook SDK issues in this pull request. So many libraries (including Parse and Facebook SDKs) are cross-referencing headers from other frameworks. I'm happy to see that Xcode 7.1 requires the library authors to clean up their mess :) |
👆 Man, you saved my day. |
@BellAppLab |
@fluidsonic Unfortunately, though: So if you mix and match Obj-C and Swift dependencies, you're stuck with |
@BellAppLab yep, like I said :) Using modules/frameworks is a good step forward towards cleaner libraries so this is good anyway. @nlutsenko angular imports should be used when importing other framework's headers, not the headers of the own frameworks. Local imports should use quotes. |
@fluidsonic The style should explicitly be This syntax is 1:1 mappable to I've tested this right now with http://cl.ly/dd6C |
@nlutsenko I agree that you use |
@fluidsonic You're right. Misread it! ;) Here's a podfile:
|
@nlutsenko here, I broke your project :) https://www.dropbox.com/s/qasax83bonprhde/YoloTest11.zip?dl=0 |
@fluidsonic Aha! Finally, someone got us a repro project. Thank you, let me look into it.
Please take a look at Foundation.framework, say NSObject.h - there are imports all over the place for the same Foundation.framework.
Framework - renamed? I don't think this is valid because first - we aren't going to rename the framework, second - as long as you are using modulemaps everything will be great. The only reason why quoted imports work for you here, is due to custom |
System frameworks seem to be special. For example I can Anyway quoted imports are local i.e. relative to the file which contains the import. Since all headers are in the Framework's Here's an example project with both frameworks pre-built for iPhone 4s simulator. https://www.dropbox.com/s/dicskwko04e0523/YoloTest12.zip?dl=0 |
Besides, FB's SDKs weren't always called |
@fluidsonic Why can't you |
@fluidsonic This has much wider impact than just Parse and Bolts. |
@nlutsenko
Good catch with the CocoaPods issue. I didn't notice the generated A custom module map could indeed solve the problem. I'll test this too. |
Custom module map - not a solution. Tested it right now, doesn't seem to work. Even if you change the umbrella header to angular imports - that still doesn't work. @fluidsonic Feel free to close those PRs, as it feels this is a wider problem that just imports in our SDK. Note on system frameworks: I think simply due to the fact, that headers there couldn't be found without angular imports - it works. Those frameworks are not special in any way when it comes down to imports. |
@nlutsenko indeed, CocoaPods messes with the Header Search Path only for Pods, not for the project itself (at least when using frameworks) and unsetting the search path also fixes the issue. Thanks! |
Glad I could help! |
As a temporary workaround, I added the following lines to my podfile: post_install do |installer|
`find Pods -regex 'Pods/Parse.*\\.h' -print0 | xargs -0 sed -i '' 's/\\(<\\)Parse\\/\\(.*\\)\\(>\\)/\\"\\2\\"/'`
`find Pods -regex 'Pods/Bolts.*\\.h' -print0 | xargs -0 sed -i '' 's/\\(<\\)Bolts\\/\\(.*\\)\\(>\\)/\\"\\2\\"/'`
`find Pods -regex 'Pods/Parse.*\\.h' -print0 | xargs -0 sed -i '' 's/#import <Bolts\\/BFTask.h>/#import <Bolts\\/Bolts-umbrella.h>/'`
end |
We unset all Pod's Podfile: post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configuration_list.set_setting('HEADER_SEARCH_PATHS', '')
end
end |
@cbot +1 |
@fluidsonic @cbot @nlutsenko |
@fluidsonic trying to use your pull request for both parse and bolts I get that annoying issue at
The same issue at line 2 of Parse+Bolts.h file |
@chlebta What is the issue? |
@fluidsonic I've tried the workaround but I get this issue `include of non-modular header inside framework module 'Parse.FileName' |
When you use this workaround and run |
Is there a solution yet. I am on Parse 1.10, ParseFacebookUtilsV4 1.9.1 and FBSDKCoreKit 4.8, FBLoginKit 4.8 and FBShareKit 4.8 I tried downgrading to Parse 1.8, Import FB 4.7 and all the above work arounds, All of them fail. Please advice. |
Looks like the issues has been fixed in Cocoapods on the master branch, see CocoaPods/CocoaPods#4420 |
Closing this issue out, since it's been fixed in CocoaPods master. |
I upgraded to XCode 7.1 yesterday.
When using Cocoapods, the module will no longer build for me with the error
Is there a workaround?
The text was updated successfully, but these errors were encountered: