kylef / URITemplate.swift

Swift implementation of URI Template (RFC6570)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift 2.3 Support

tolkiana opened this issue · comments

Any plans to support Swift 2.3?
I ran the convert tool because I need it for one of my projects, it's on my fork, is that something you would like to have in a branch here?

Also how should I run the test? I noticed it doesn't have a bridging header, is that expected?

URITemplate 1.3.1 should work in Swift 2.3. Is there any particular issue you're having? The source code should be compatible.

I'm seeing something similar when I attempt to import via Carthage in XCode 8. I Tested the fork above and that seemed to do the trick.

A shell task (/usr/bin/xcrun xcodebuild -project /path/to/project/Carthage/Checkouts/URITemplate.swift/URITemplate.xcodeproj -scheme URITemplate -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** CLEAN FAILED **


The following build commands failed:
    Check dependencies
(1 failure)
** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)

I'm integrating through cocoapods and I was trying to convert my project to Swift 2.3, the converter tool was showing URITemplate on the list of targets to convert.

I just pulled version 1.3.1 in a test project but seems to do the same.

pod 'URITemplate', '~>1.3.1'

screen shot 2016-09-18 at 10 11 10 pm

Am I using a wrong version?

I saw you merged Swift 3.0 but unfortunately for my project I can not use Swift 3.0 yet.

For the question about the tests I just wanted to run them and make sure nothing was broken with the conversion.

@tolkiana 1.3.1 is the correct version. You can uncheck it from the migration converter. You will need to run pod install after you've migrated your user project to 2.3 because CocoaPods will introspect the SWIFT_VERSION flag and set it in the Pods.xcodeproj.

NOTE: You will need a CocoaPods 1.1.0 pre-release so that SWIFT_VERSION will be set correctly in the Pods project.

$ gem install cocoapods --pre
$ pod --version
1.1.0.rc.2

I think the reason Xcode selected it to be migrated is because the Pods.xcodeproj was generated by CocoaPods without a SWIFT_VERSION. This is because you ran pod install before migrating your project hence it didn't have a SWIFT_VERSION. This is expected.

Yeah, that worked for me, thanks!

It looks like Carthage hasn't implemented the feature to support SWIFT_VERSION (Carthage/Carthage#1445), so we still need that set in the .xcodeproj (such as tolkiana@8185e10).

I've seen a common convention amongst Swift frameworks to publish a topic branch swift-2.3. Will you create one for us Carthage users so we don't have to track a fork?

I've made stable branch from the 1.x version to add Swift 2.3 support and made a 1.4.0 release.

So, here are the past three releases and which Swift version they can be used with: