DJI SDK - Sample tutorials in Swift - ios

I was going through the DJI SDK and looking through the sample tutorials like TapFly and ActiveTrack Missions etc. but could only find the code in Objective C. Although they have mentioned that the code is available in Swift but I couldn't find it. Also, if it's only available in obj c, can I use the bridging header for the code using without making many changes in obj c while running my app coded in swift?

Everything in the MSDK-iOS is compatible with your Swift app

Related

Started React Native With Swift Instead Of Objective C

So I started a react native app using create-react-native-app and it created a lot of boilerplate code. Android is in JAVA which I am fine with. But the iOS is in Objective-C and I am more familiar with Swift. Is there anything I can do about that? I know most of my code is going to be in JavaScript anyways, but just wondering anyways.
Unfortunately, there is not a simple or one command way to convert your iOS code in your React Native project from Objective-C to Swift. However if you want to write a Native Module, which you'll need to eject from CRN or start a new project with react-native init, you can write new code in Swift.
You might also be interested in this post on how to bridge Swift and Objective-C code. Basically when you create a new swift file you need to make sure to select “Create Bridging Header” when prompted.
You're problem is not that clear. But lemme say this if you wanted to work on cross platform then react native is a good choice to that if you wanted to use javscript. Regarding on your question which is , lemme quote "But the IOS is in Objective C" which is you're wrong you can write an iOS native using both objective c , even c and c++ , ..and swift which you say your familiar with and if you're avoiding objective c then you can write iOS app purely in swift. Hope that helps.
Tips
1 for cross platform - and you want js (react native)
2. cross platform and you wanted to use c# (Xamarine)
3. iOS app which is native (Swift or objective c) or both
4. hybrid , you can try framework like ionic, cordova etc.
5. let us include android , you can use java(kotlin
You can convert swift to objective c or objective c to swift.
There are bunch of options for that, If you want to use javascript for converting than use obj2swift.js: https://github.com/okaxaki/objc2swift.
If you want to convert your code online than you can use online language converter like swiftify:
https://swiftify.com/#/converter/code/

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.

UIHierarchyView in Swift

I have converted a project from the attached link to Swift UIHierarchyView for Objective C – iOS platform
As I don't have a very good knowledge in Swift, I am looking for some help who can review this code and guide me further to make this project stable.

Is it possible to write iPhone app in both objective c and swift

My existing iOS app is in objective c language and i want to add more functionality in my app and i want to do that code in swift language.
So is it possible to create an app which contains both the languages(i.e. in objective c & swift) and Is my app will work fine?
In short answer, Yes.
If you have existing project written in objective-c then you can add new classes written in swift. You still have choice if you want to use swift 3.0 ot swift 2.0.
You have to use bridge class in order to achieve that. You will get more guide on Link provided on Apple website.
https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html
However going forward it would make sense that you spend more time on Learning Swift as Apple is now leaning towards Swift 3.0.
Here is link quick guide.

Does Swift support WebRTC?

Our team is in process of electing programming language to develop a new iOS application in which we have to write features to support video conversation.
The backend is written using WebRTC, now we have to decide which language to use in the iPhone app and we prefer Swift in this case.
However, I'm not sure Swift supports WebRTC or not.
My initial research show that we can implement the features using Objective-C. I found an example written in Objective-C which you can find the source code here.
However, I'm not sure about Swift. Does Swift also support WebRTC?
UPDATE 2023
Unfortunately, as of 2023 there still appears to be no completely Swift framework that implements the WebRTC protocol. Although the iOS framework hosted at webrtc.org can be fairly easily used in Swift apps, it is written mostly in objective C.
For those stumbling on this question, who just want to get webRTC running in your app this is still relatively easy using the cocoapod
UPDATE 2016
The easiest way is to get webRTC in your project is to simply install the CocoaPod using the directions at https://cocoapods.org/pods/WebRTC
If you have never used CocoaPods before you will need to first follow this guide: https://guides.cocoapods.org/using/getting-started.html
Original Answer
The simple answer to the question is that there are currently no open source libraries written in Swift conforming to the WebRTC protocol. You can still compile the code from the official WebRTC project into your app. Directions which may not lead to a successful build can be found here: https://webrtc.org/native-code/ios/
Finally, to clarify Omkar Guhilot's answer: Skylink is a company with a closed source SDK that is designed to work only with their paid stun-turn service, and https://github.com/alongubkin/phonertc requires cordova, which may not be ideal for many native ios developers.
Webrtc comes with Objective C interface. I dont think they will move to swift interface anytime soon. But You can always use them via bridging headers. I have written apprtc (webrtc's demo) in swift 2.3 version with help of bridging headers in github link with a description in this blog . I have planned to write 3.0 version and a swift wrappers over it.
Current version of webrtc framework doesn't require any pods or any extra bridging headers.
The framework can be generated by following instructions on this Link :
https://webrtc.github.io/webrtc-org/native-code/ios/
If you follow them correctly you will generate a framework add that framework in your project and follow the webrtc necessary steps and you will have a WEBRTC integrated project.
To know what all steps are necessary follow this link from appear.in
:
https://tech.appear.in/2015/05/25/Getting-started-with-WebRTC-on-iOS/
This will get you to a stage where you will be able to make calls between a browser and any iOS 8+ device
Yes swift supports WebRTC and there is one more library which you can use in swift link:- http://skylink.io/ios/
And the link that you have shared to which is written in Objective C, we should be able to use that as well in swift by creating a Bridging header
Have a look at this as well https://github.com/alongubkin/phonertc
Thanks
Omkar

Resources