How do I run Backendless with Swift 3? - ios

I cannot get Backendless to compile in Xcode 8 with iOS 10 and Swift 3. I have updated to the latest version of Backendless-iOS-SDK via CocoaPods. Every time I try to compile, I am met with numerous errors in the parts of my code that access the Backendless SDK. Every time I fix the errors, countless more appear when I try to run. This makes me think I have done something wrong during the process of upgrading the SDK.
Any ideas what could be happening here? Is it expected that all my code that accesses Backendless needs to be changed when upgrading to Swift 3? (Please note that I have ALREADY Converted to the latest Swift 3 syntax).
Is the Backendless SDK now compatible with Xcode 8 and Swift 3?

Any ideas what could be happening here? Is it expected that all my code that accesses Backendless needs to be changed when upgrading to Swift 3? (Please note that I have ALREADY Converted to the latest Swift 3 syntax).
Yes, you might need to change the code if its not converted by the migrator.
Is the Backendless SDK now compatible with Xcode 8 and Swift 3?
Yes, because the Backendless SDK is in Objective C so there will be no issues using it.

There is issue on swift3 installation via cocoa pod as of the moment.. please use option 2 in the documentation... importing the lib adding it manually is better.

Related

Unsupported Swift Version 3.x in Xcode 10.3

I keep downloading sample codes and many times it says "Unsupported Swift Version 3.x...Use Xcode 10.1 to migrate the code to Swift 4".
Why is it not possible to migrate to Swift 4 using Xcode 10.3 or Xcode 11 beta?
More importantly, I am using Swift 4.2 in my own Project that has several dependancies as well through Pods. If I don't upgrade to Swift 5.1 or later, it seems my own project would start getting such errors in Xcode 12 or so, correct? While I can convert my own code to Swift 5.1, I have no idea if dependencies such as SwiftyDropbox would migrate to Swift 5.1 so easily. What implications it would have for my project in future and what could I do to future proof my project in that case?
Ask Apple. The company has decided – certainly for good reasons – to migrate files only to the Current Swift Syntax. Feel free to create legacy system partitions with older versions of Xcode to migrate code step by step.
The grace period to update the Swift version is long enough to ensure a smooth transition. At least Xcode allows to use the 3 most recent Swift versions in the same project. However you are responsible to maintain the version control. Check the dependencies periodically for updates. If a dependency is not able to release an update within the grace period it's not much good.

Alamofire 4.4 with Swift 3.1 'Cannot call value of non-function type 'HTTPURLResponse?'

I'm updating app from Swift 2.3 to Swift 3.1. I've got several errors ;/
enter image description here
With the version of swift from 2.3 you must have to update the Alamofire along with it.
The current version of Alamofire is 4.4
Do update your pod file and check the Readme file , Everything you need is already mentioned there. Do let us know if you are facing issues with it.

Convert from Swift 3.0 to Swift 2.3

I have a static library that I converter from old Swift to Swift 2.3 and later to Swift 3.0.
Now I need both version (2.3 and 3.0) of the library, but I forgot to take a backup of version 2.3. And I only have 3.0.
Is there a simple way to convert back from Swift 3.0 to Swift 2.3?
Simple, not really, but this will work.
If you don't have it, download XCode 7.3.1 from Apple
Open your library in the 7.3.1 version and correct whatever errors appear
Migrate the corrected code from step 2 into XCode 8.2 or lower (8.3 will not support Swift 2.3)
As mentioned in the comments, maintaining your code in a version control system will spare you problems like this in the future, and is generally just a good idea.
You don't even need to set up your own system, since git is part of MacOS, and XCode can handle simple git features for you.

How can I compile Swift 2.3 Code in Xcode 8

I have many issues with my project Swift 2.2 in Xcode8, the pod library generates many error, I did an update of cocoapods and library but I still have those errors, I have convert syntax to Swift 2.3 but the errors are still there. I do not want to convert swift 3 for the time being.
Here is a picture of errors :
Socket Io Client Swift errors
Thank you in advance and sorry for English errors.
Okay, so the problem is that the library you are using is Swift 3. So there is no point saying "I do not want to convert to Swift 3". You have converted to Swift 3 whether you like it or not. You do not need to compile this code as Swift 2.3. You need to compile it as Swift 3.
To run Swift 2.3 in Xcode8, set Use Legacy Swift Language Version to YES within your projects, your targets and your pod framework targets Build Settings.

Is it possible to use libraries written in an old version of swift in a project with a newer version of swift?

I'm working on a project in Swift 3. However, many libraries are still using Swift 2.3.
Is there a way of making use of them in my project as they are?
Since it's possible to use Objective C libraries in Swift, I figure there's a chance.
Maybe this reference from Apple answers the question:
unfortunately it would seem to be impossible:
First, Swift 2.3 and Swift 3 are not binary compatible so your app's entire code base needs to pick one version of Swift.
https://developer.apple.com/swift/blog/?id=36

Resources