Skip to content

Commit 4fe566f

Browse files
authored
Fix compilation of the project when using Xcode 9 new build system and 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.
1 parent ce3a003 commit 4fe566f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

XLPagerTabStrip.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Pod::Spec.new do |s|
99
s.social_media_url = 'https://twitter.com/xmartlabs'
1010
s.ios.deployment_target = '8.0'
1111
s.requires_arc = true
12-
s.ios.source_files = 'Sources/**/*'
12+
s.ios.source_files = 'Sources/**/*.{h,m,swift}'
1313
s.ios.frameworks = 'UIKit', 'Foundation'
1414
s.resource_bundles = { 'XLPagerTabStrip' => ['Sources/ButtonCell.xib'] }
1515
end

0 commit comments

Comments
 (0)