Many errors after update to swift 3 - ios

Hello i'm working on swift 2 with parse then i just updated to swift 3
and i got many errors the app was working perfect. Here is some errors i would get help with:
Another swift file
other errors:
How cannot assign that object into nsarray and it was working good.
so how could i fix them, any help will be appreciate.

You should read Swift 3.0 Migration Guide. It covers everything you need to know about new Swift 3 API changes. Since standard library changed a lot, it is common for third party frameworks to not work fully since they all use standard library as an underlying framework.

Related

Using Swift Cocoapods in Objective-C project

Good day,
I am relatively new in Swift language. I have been using objective-c.
Recently I tried adding a swift pods into my objective-c project but I get loads of errors that I know nothing of. I am attaching the screenshot. Can you please take a look and help me out with this. thankyou!

How can I put in charts with swift 3 Xcode 8?

I'm beginner swift developer. Just for a week now I've been trying to implement some kind of chart into my app. I know Swift 4 and Xcode 9 are already out but I'm still using Swift 3 and Xcode 8. I've read a lot of tutorials and different pages but still I'm not able to find any working ones. All examples are either too old or for swift 4. I've learned about using Cocoapods and other frameworks such as Firebase or Alamofire work just fine.
Please let me know if you can help me with finding some chart library that actually works as it is supposed to.
To get things materialistic and kick off, for building charts in iOS try Charts library. One of the best third-party libs out there.
Or check this list for even more awesome iOS charts libraries.

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

Can we build and upload ios app with swift and objective-c mixed code?

Actually, I am working on one app and started with the objective-c. Now i have started working on swift with the same app for the further development and it will work with both the class (objc and swift).
Now I have doubt that it will accept by apple store or not.
Please help me.
This is fine, Apple provides the mechanisms for interacting with both and will not drop support for Objective-C for quite sometime. Many large organisations still have the majority of their code written in Obj-C (including Apple) so they need to give people time to transition, they aren't going to switch over immediately to a relatively immature language.
You can use Swift and Objective-c together. There is no issue in it. You need to create a bridging header file.
Please read this
Swift and Objective-C in the Same Project

How to implement AVCam for Swift

Hello I have found two links about AVCam
Apple: https://developer.apple.com/library/ios/samplecode/AVCam/History/History.html
alex-chan/AVCamSwift: https://github.com/alex-chan/AVCamSwift
The first link has demo files that work perfectly, but its in Object-C - can someone show me documentation on converting Object-C to Swift?
The second link I have downloaded the files but it will not run in my 4s - can someone tell me why?
I would like to have a swift version so I can easily adopt it into my swift build + thanks again SO!
if you have a working objc version why not just import it with a bridging header? there is no one document about converting obj-c to swift, if you really want to convert it you are going to need to do it line by line.
also what exactly are you trying to do? get a live camera feed displayed? these docs have been ported to swift and would suit that purpose but you would need to get the input port first.
https://developer.apple.com/library/mac/documentation/AVFoundation/Reference/AVCaptureVideoPreviewLayer_Class/index.html#//apple_ref/occ/clm/AVCaptureVideoPreviewLayer/layerWithSession:
Update: how to import obj-c headers, a newer way to create them that isnt quite as talked about yet is to just create any normal .m file or objective c file then select yes to creating a briding header, it configures everything for you.
That being said it may be worth while to play around with the basics a bit more and maybe follow a few guides before attempting to implement this type of feature if you are having issues with following the links.
Here is a random application creation guide http://www.ioscreator.com/tutorials/calculator-tutorial-in-ios8-with-swift that should teach you alot. i would recommend following and reading through stuff like this until you have a bit more of a footing and can come up with more of an exact question. no one here is going to rewrite the apple program for you and your questions are extremely broad.

Resources