Skip to content

Generated project behaves differently from embedding the Pod in an App. #54

Description

@gereons

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions