As mentioned in CocoaPods/CocoaPods#9686 I'm seeing different behaviour from embedding a pod into my app and using the sample project generated by pod gen.
- running
xcodebuild on the generated project builds for maccatalyst instead of ios
- Swift-Version specification for included pods does not seem to be passed along correctly.
To reproduce, clone https://github.com/gereons/CocoapodsGenTest and run the included gen-build.sh script.
This will produce an error
Compiling UIViewController+UIEmptyState.swift
/.../TestLib/gen/TestLib/UIEmptyState/src/UIEmptyState/UIViewController+UIEmptyState.swift:228:18: 'bringSubviewToFront' has been renamed to 'bringSubview(toFront:)'
view.bringSubviewToFront(newView)
^~~~~~~~~~~~~~~~~~~
while the same call in TestLib/Classes/ReplaceMe.swift compiles without problems.
This build finishes with the output
The following build commands failed:
CompileSwift normal x86_64 /.../TestLib/gen/TestLib/UIEmptyState/src/UIEmptyState/UIViewController+UIEmptyState.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
Ld /Users/gereon/Library/Developer/Xcode/DerivedData/TestLib-abhbyfdhfvwgoxeuoxkqludfutcv/Build/Products/Debug-maccatalyst/TestLib/TestLib.framework/Versions/A/TestLib normal x86_64
(emphasis mine)
Including this test pod into an app shows none of these errors.
As mentioned in CocoaPods/CocoaPods#9686 I'm seeing different behaviour from embedding a pod into my app and using the sample project generated by
pod gen.xcodebuildon the generated project builds for maccatalyst instead of iosTo reproduce, clone https://github.com/gereons/CocoapodsGenTest and run the included
gen-build.shscript.This will produce an error
while the same call in
TestLib/Classes/ReplaceMe.swiftcompiles without problems.This build finishes with the output
(emphasis mine)
Including this test pod into an app shows none of these errors.