Reputation: 479
I have got a task to convert a project to Swift 3.0. But I dont have expertise in Swift language. Still I followed some tips and I have converted to Swift 3.0 and got many errors. Was able to fix around 100+ errors and still few are pending. I have done lots of searching but couldn't find any solutions. Someone can help me fix the issues? Don't feel that I am asking direct solutions. I am really stuck and thats why I am asking.
Please let me know if more info is needed.
So, below I am listed down few items which I can't fix so far.
First: This issue is resolved
self.audioFileStreamID = AudioFileStreamID()
self.audioQueue = AudioQueueRef()
For bothe these codes, I am getting error;
Cannot convert initializer for type 'AudioFileStreamID' with no arguments.
Second: This issue resolved
let status = AudioFileStreamOpen(self.pointer, AudioFileStreamPropertyListener, AudioFileStreamPacketListener, fileType, &self.audioFileStreamID)
Error message:
Cannot pass immutable value as inout argument. Implicit conversion from 'AudioFileStreamID' to 'AudioFileStreamID?' requires a temporary
Third:
self.type(of: init)(scheme: scheme, host: host, path: path, credential: credential)
Error message:
Expected expression in list of expressions
convenience init(scheme: String, host: String, path: String, credential: URLCredential) {
let url = NSURL(scheme: scheme, host: host, path: path)!
self.type(of: init)(url: url, credential: credential) //here also got the same error
}
Update: First and Second issues are fixed.
Upvotes: 0
Views: 152
Reputation: 3361
Update your cocoa pods and clear your derive data folder and try to run again.
In xcode 8 derived data folder changed,
Go to File -> Workspace setting -> then see this image,
Click on -> on path and clear that derived data folder.
Also check if some methods are deprecated in swift 3.0
Upvotes: 0