toshi0383 / TVMLKitchen

Swifty TVML template manager with or without client-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v1.0.0 cocoapod is not being recognized as Swift 3.0

AlexanderTheOkay opened this issue · comments

I've updated my pod to v1.0.0 to get the Swift 3.0 version. The framework will not compile with my Swift 3.0 project, as Xcode still recognizes TVMLKitchen v1.0.0 as Swift 2.2.

As a note, I've taken the source from the Swift 3.0 branch and included it directly in my project, and everything works fine. This seems to be an issue with the cocoapod itself.

This was an issue with Module caching. Once the cache was cleared, everything was picked up correctly.

Maybe we need .swift-version file on top level, which I don't really like...

To get it to work, I had to go to Build Settings and set "Use Legacy Swift Language Version" to "No" explicitly. It's set to "Unspecified" by default, which causes the error I was seeing.

I think setting that flag will fix the issue across the board. Hopefully it makes the .swift-version file unnecessary.

I see. Thanks for info.

I tried it by myself, and it did not require .swift-version file to compile.
Here is the Podfile I used.

target 'test'
use_frameworks!
pod 'TVMLKitchen'

Just chiming in here, I'd recommend adding the following to your podfile to autoset everything to 3.0 if you have issues.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end