Skip to content
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

Fix compilation of the project when using Xcode 9 new build system and CocoaPods #506

Merged
merged 1 commit into from
Apr 10, 2018

Conversation

DenTelezhkin
Copy link
Contributor

With current podspec, one .xib file is getting picked up as a source, and is getting into Xcode Compile Sources build step in CocoaPods generated project.

New build system is more strict than the old one, and prohibits this by saying:

error: unexpected duplicate task: CompileXIB /Path-To-Project/Pods/XLPagerTabStrip/Sources/ButtonCell.xib (in target 'XLPagerTabStrip')

This behavior is described in this CocoaPods issue.

This PR changes source_files search path from being * to more specific code-related one *.{h,m,swift}, thus picking only sources into sources.

This fix can be verified by installing XLPagerTabStrip, trying to build with new Build System - it will fail. Then you can remove ButtonCell.xib file from Pods -> XLPagerTabStrip -> Compile Sources build phase and this time project will build successfully.

…d CocoaPods

With current podspec, one .xib file is getting picked up as a source, and is getting into Xcode Compile Sources build step in CocoaPods generated project. 

New build system is more strict than the old one, and prohibits this by saying:

```
error: unexpected duplicate task: CompileXIB /Path-To-Project/Pods/XLPagerTabStrip/Sources/ButtonCell.xib (in target 'XLPagerTabStrip')
```

This behavior is described in [this CocoaPods issue](CocoaPods/CocoaPods#7079).

This PR changes source_files search path from being * to more specific code-related one *.{h,m,swift}, thus picking only sources into sources.

This fix can be verified by installing XLPagerTabStrip, trying to build with new Build System - it will fail. Then you can remove ButtonCell.xib file from Pods -> XLPagerTabStrip -> Compile Sources build phase and this time project will build successfully.
@mtnbarreto
Copy link
Member

👍

@mtnbarreto mtnbarreto merged commit 7647974 into xmartlabs:master Apr 10, 2018
@DenTelezhkin DenTelezhkin deleted the patch-1 branch April 11, 2018 08:14
@bestwnh
Copy link

bestwnh commented Aug 14, 2018

@mtnbarreto This change may need a push. The podspec file in cocoapods not change yet. https://github.com/CocoaPods/Specs/blob/master/Specs/4/f/b/XLPagerTabStrip/8.0.1/XLPagerTabStrip.podspec.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants