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

[Bug] PodSpec does not support iOS anymore #273

Closed
jonasbeckers opened this issue Dec 20, 2022 · 7 comments · Fixed by #274
Closed

[Bug] PodSpec does not support iOS anymore #273

jonasbeckers opened this issue Dec 20, 2022 · 7 comments · Fixed by #274

Comments

@jonasbeckers
Copy link

Expected Behavior:

BartyCrouch is compatible with iOS & macOS.

Current Behavior:

Only macOS is supported from version 4.14.0

@Jeehut
Copy link
Member

Jeehut commented Dec 20, 2022

@jonasbeckers Why would BartyCrouch support iOS? I have to admit, I have no idea how the CocoaPods support works here, but BartyCrouch itself only supports to be built for macOS as it can only be run on macOS (there's no Xcode for iOS). But as I did not add the CocoaPods support myself (it was a community contribution), I also don't fully understand how it's being used. If the macOS-only thing is a problem, feel free to post a PR adding back support for other platforms. But I had to explicitly add the supported platforms because CocoaPods was complaining while I made the last release.

Having that said, the official and recommended way to install BartyCrouch is via Homebrew. I know how that works and can provide more proper support for that. For CocoaPods, the community needs to help out.

@jonasbeckers
Copy link
Author

I use it as a dependency to call in my Run script phase. This way I can have different version for different projects.

@Jeehut
Copy link
Member

Jeehut commented Dec 21, 2022

Why would you want to have different versions for different projects? BartyCrouch doesn't exactly have breaking changes, especially not anymore now that I released RemafoX as its successor. So I think having the latest version installed via Homebrew is gonna be better. But your choice. As I said, I can't provide support for something that I didn't add or understand. It's up to the community.

@jonasbeckers
Copy link
Author

Allowing iOS in the podspec shouldn't be an issue, as it previously worked with older versions. Previously the podspec did not specify any limits on what platform was supported.

@Jeehut
Copy link
Member

Jeehut commented Dec 21, 2022

@jonasbeckers Previously, CocoaPods did not complain when I made a release. But recently it did. I had to specify the platforms explicitly. Adding iOS might still work, if you think so, feel free to post a PR where you've added back iOS, but make sure to test out everything works with building the Pod locally so I don't get an issue when I run pod trunk push. Then I'll happily make a new release.

@djbe
Copy link
Contributor

djbe commented Dec 29, 2022

Had the same thing happen with Sourcery (see krzysztofzablocki/Sourcery#1098). As @jonasbeckers mentioned, adding other platforms fixes this.

Although, the solution used in Sourcery (adding multiple platform definitions) seems to be undefined behaviour. According to the CocoaPods podspec docs, to support multiple platforms we should use deployment_target. So I've based my PR on how SwiftLint does it.

@Jeehut
Copy link
Member

Jeehut commented Dec 30, 2022

@djbe Thank you for providing a possible fix. Unfortunately, the pod trunk push failed with the following output:

pod trunk push                                                        

[!] Found podspec `BartyCrouch.podspec`
Updating spec repo `trunk`
Validating podspec
 -> BartyCrouch (4.14.1)
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | xcodebuild:  note: Building targets in dependency order
    - NOTE  | [iOS] xcodebuild:  /var/folders/n_/vfzcwr7j3gndx375gg3pf9600000gn/T/CocoaPods-Lint-20221231-23982-dnhtcm-BartyCrouch/App.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.1.99. (in target 'App' from project 'App')
    - NOTE  | xcodebuild:  note: Metadata extraction skipped. No AppIntents.framework dependency found. (in target 'App' from project 'App')
    - NOTE  | [iOS] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.1.99. (in target 'BartyCrouch' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.1.99. (in target 'Pods-App' from project 'Pods')
    - NOTE  | xcodebuild:  note: Using codesigning identity override: 
    - NOTE  | [tvOS] xcodebuild:  Pods.xcodeproj: warning: The tvOS Simulator deployment target 'TVOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.1.99. (in target 'Pods-App' from project 'Pods')
    - NOTE  | [tvOS] xcodebuild:  Pods.xcodeproj: warning: The tvOS Simulator deployment target 'TVOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.1.99. (in target 'BartyCrouch' from project 'Pods')
    - NOTE  | [tvOS] xcodebuild:  /var/folders/n_/vfzcwr7j3gndx375gg3pf9600000gn/T/CocoaPods-Lint-20221231-23982-dnhtcm-BartyCrouch/App.xcodeproj: warning: The tvOS Simulator deployment target 'TVOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.1.99. (in target 'App' from project 'App')
    - ERROR | [watchOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [watchOS] xcodebuild:  xcodebuild: error: Unable to find a destination matching the provided destination specifier:

[!] The spec did not pass validation, due to 1 error.

I just updated the versions by adding 2 MAJOR versions to iOS, tvOS, and watchOS. That god rid of the warnings, but it still failed with the watchOS error. So I removed watchOS from the list entirely for now, this worked. See 9d03ec1.

So, everyone please try updating to 4.14.1 and see if you still run into this issue. You might if you have the build script in a watchOS target. But at least iOS and tvOS targets should work now. Thanks to @djbe!

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 a pull request may close this issue.

3 participants