Skip to content

Support Swift 4 #2

Closed
Closed

Description

@ArthurXu424

Do you have a plan to support Swift 4?

Activity

  1. IvanRublev commented on Sep 23, 2017

    @IvanRublev
    Owner
  2. IvanRublev commented on Sep 26, 2017

    @IvanRublev
    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
    
  3. ArthurXu424 commented on Sep 26, 2017

    @ArthurXu424
    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

  4. IvanRublev commented on Sep 26, 2017

    @IvanRublev
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions