swift3.1

Does _ArrayType or _ArrayProtocol not available in Swift 3.1?

六月ゝ 毕业季﹏ 提交于 2019-12-20 04:23:32
问题 I was using _ArrayType in my project when I was running on swift 2.1. I upgraded to swift 3.0.2 (Xcode 8.2.1) last week and I found here that _ArrayType is changed to _ArrayProtocol and it was working well. Today I upgraded my Xcode to 8.3.1, and it gives me error: Use of undeclared type '_ArrayProtocol' . Here is my code: extension _ArrayProtocol where Iterator.Element == UInt8 { static func stringValue(_ array: [UInt8]) -> String { return String(cString: array) } } What's wrong now? Why

Realm for Swift 3.1 - Command failed due to signal: Illegal instruction: 4

ⅰ亾dé卋堺 提交于 2019-12-11 04:49:53
问题 After updating Swift to v3.1, I got Realm frameworks replaced by the new version downloaded from Realm Swift 2.5.1 but get the following issue: Command failed due to signal: Illegal instruction: 4 Already checked this and this, but they didn't work. Here is the error description, not sure if it's helpful though. CompileSwift normal x86_64 /Users/linhcn/Documents/XcodeProjects/HerdManager/HerdManager/Models/ActionCategory.swift -target x86_64-apple-ios9.3 -enable-objc-interop -sdk

Module compiled with swift 3.1 cannot be imported in Swift 3.0.2

你离开我真会死。 提交于 2019-12-10 13:44:46
问题 Swift 3.1 came out and I'm receiving this error message in my project: Module compiled with swift 3.1 cannot be imported in Swift 3.0.2 So how do I tell Xcode to start updating my project and migrate it to Swift 3.1? 回答1: It is likely that you are including 3rd party frameworks/libraries. Those are what need to be updated/recompiled. If you are using Carthage or Pods you should just rebuild those libraries and make them available to your app. The problem isn't your code. When you compile it,

How to suppress warnings in Swift 3?

蹲街弑〆低调 提交于 2019-12-07 07:58:29
问题 Using clang* I could do #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" // ... #pragma clang diagnostic pop However this does not work in swift. So how to do suppress warnings in Swift? 回答1: EDIT: below instruction is for "deprecated declarations" warning. If you want to suppress different warnings then you should use flag relevant for the warning. Most of you probably use Clang, and it's warning flags can be found here. So if you want to suppress

Does _ArrayType or _ArrayProtocol not available in Swift 3.1?

懵懂的女人 提交于 2019-12-02 03:19:52
I was using _ArrayType in my project when I was running on swift 2.1. I upgraded to swift 3.0.2 (Xcode 8.2.1) last week and I found here that _ArrayType is changed to _ArrayProtocol and it was working well. Today I upgraded my Xcode to 8.3.1, and it gives me error: Use of undeclared type '_ArrayProtocol' . Here is my code: extension _ArrayProtocol where Iterator.Element == UInt8 { static func stringValue(_ array: [UInt8]) -> String { return String(cString: array) } } What's wrong now? Why _ArrayProtocol is undeclared in swift 3.1 while it was working in swift 3.0.2. Also when I look here in