madebybowtie / FlagKit

Beautiful flag icons for usage in apps and on the web.
MIT License
3.04k stars 324 forks source link

Update FlagKit.podspec #79

Open cyupa opened 5 years ago

cyupa commented 5 years ago

Add swift_versions to podspec file to avoid build failures with CocoaPods 1.8.0

blommegard commented 5 years ago

Hi, it works fine for me on 1.8.0:

➜  pod install          
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
cyupa commented 5 years ago

On our side it didn't:

Ruby version 2.4.1 and fastlane version 2.131.0.

Using cocoapods-core 1.8.0 Using cocoapods-deintegrate 1.0.4 Using cocoapods-downloader 1.2.2 Using cocoapods-plugins 1.0.0 Using cocoapods-search 1.0.0 Using cocoapods-stats 1.1.0 Using cocoapods-trunk 1.4.0 Using cocoapods-try 1.1.0 Using cocoapods 1.8.0

[!] Unable to determine Swift version for the following pods:

- `FlagKit-library` does not specify a Swift version and none of the targets (`Pods`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
blommegard commented 5 years ago

Ah, is your project a 100% objc one?

cyupa commented 5 years ago

No, we have to manually set the Swift version for a couple of pods and while we could do this for all pods, some don't necessarily require it - because they already support Swift 5. Some do due to them no longer being maintained or due to version lock so we have to specify the version manually.

I got the error message in the terminal o I decided to open a pull request. Maybe there are others that don't want to do the cocoapods post_install shenanigan to set the Swift version and as a thank you for sharing this on GitHub.

I looked back in the Swift update commit history since Swift 3.0 and most of the Changes were OS and XCode related - correct me if I'm wrong - so it would probably support out of the box Swift versions from 3.2 upwards.

Thanks again, Ciprian

StefaniOSApps commented 4 years ago

CocoaPods say: [!] Unable to determine Swift version for the following pods:

StefaniOSApps commented 4 years ago

its a 100% Swift Project and we need this flag.

StefaniOSApps commented 4 years ago

@blommegard @cyupa

StefaniOSApps commented 4 years ago

@wopian @gellermark @yageek @antontingstrom @hannseman @ReadmeCritic @edwardjewson @MosheBerman