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

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

Open
gereons opened this issue Apr 6, 2020 · 2 comments
Open

Comments

@gereons
Copy link

gereons commented Apr 6, 2020

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.

@segiddins
Copy link
Contributor

Is it the difference between swift 4.2 and swift 4?

@gereons
Copy link
Author

gereons commented Jun 4, 2020

I don't think so - changing swift_versions in the .podspec to 4.0 also complains about the renaming issue (although maccatalyst isn't mentioned anymore).

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

No branches or pull requests

2 participants