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

Support Swift 4 #2

Closed
ArthurXu424 opened this issue Sep 21, 2017 · 4 comments
Closed

Support Swift 4 #2

ArthurXu424 opened this issue Sep 21, 2017 · 4 comments

Comments

@ArthurXu424
Copy link

Do you have a plan to support Swift 4?

@IvanRublev
Copy link
Owner

IvanRublev commented Sep 23, 2017 via email

@IvanRublev
Copy link
Owner

You can use the PersistentStorageSerializable framework with Xcode 9 and Swift 4.0 projects.

Via Carthage

Use as before - no changes needed.

Via Cocoapods

Add following script to the end of your project's Podfile.

  # Manually making chosen pods swift version to be 3.2
  post_install do |installer|
    swift32pods = ['PersistentStorageSerializable']
    installer.pods_project.targets.each do |target|
      if swift32pods.include? target.name
        print "Changing #{target.name} pod swift version to 3.2\n"
        target.build_configurations.each do |config|
          config.build_settings['SWIFT_VERSION'] = '3.2'
        end
      end
    end
  end

@ArthurXu424
Copy link
Author

Thank you for feedback, I add the framework to my project when swift 3, after I update Xcode to 9.0, Xcode9 told me that /.../Serial Port/SerialPortConfigs.swift:11:8: Module file's minimum deployment target is OS X v10.11: /.../Library/PersistentStorageSerializable/PersistentStorageSerializable.framework/Modules/PersistentStorageSerializable.swiftmodule/x86_64.swiftmodule
I try to modify your project setting to meet swift 4's requirement, but an issue occur, shows as photo below.

screen shot 2017-09-26 at 21 24 44

@IvanRublev
Copy link
Owner

Yes, this issue is known. I'm thinking what can be done.
Meanwhile, please, stick to Carthage or Cocapods solution mentioned earlier or change the SWIFT_VERSION build setting to 3.2 for the framework target.

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

No branches or pull requests

2 participants