kylef / URITemplate.swift

Swift implementation of URI Template (RFC6570)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

s.swift_version = '5.0'

SentulAsia opened this issue · comments

I got this error when installing:

[!] Failed to load 'URITemplate' podspec:
[!] Invalid `URITemplate.podspec` file: undefined method `swift_versions=' for #<Pod::Specification name="URITemplate">
Did you mean?  swift_version=
               swift_version.

@SentulAsia I think the CocoaPods you are using us outdated, can you try again with cocoapods 1.7.x which adds support for swift versions?

@kylef I can’t change my cocoapods version until september... I guess I’ll stay to swift 4.2 then...

@kylef can you do this?, if yes then I'll submit a PR:

if spec.respond_to?(:swift_versions) then
    spec.swift_versions = ['4.2', '5.0']
else
    spec.swift_version = '5.0'
end

@SentulAsia That won't work because the specification will be converted by CocoaPods into JSON upon submission. You can make a copy of a podspec in Ruby and keep it in your project and reference it internally as a workaround.

@kylef Thanks for the follow up, already updated to latest version and that solved the issue. Thanks for the reminder.