I am currently working on a native iOS application that uses version 100.x and has a significant amount of code developed in Objective-C. We are considering upgrading to the new ArcGIS version 200.x. However, we are uncertain whether this new version supports Objective-C classes. Is it necessary to migrate our existing codebase to Swift to use version 200.x?
Solved! Go to Solution.
I believe you could probably have parts of your app written in Objective-C because of Objective-C and Swift bridging. But ultimately anything that works directly with the Maps SDK will probably need to be written in Swift because the Swift Maps SDK takes advantage of Swift only features. Also, the Swift Maps SDK uses SwiftUI for displaying Maps and Scenes. While SwiftUI does integrate with UIKit, you would need to write some Swift code to wrap the Maps SDK and be able to glue it to any Objective-C code.
Every project is different. If your project has a large amount of Objective-C code that does not interact with the Maps SDK, then you might be able to reuse a large part of the Objective-C logic. However, if every file in your project references some Maps SDK types, then it might not be possible to reuse that code without significant rearchitecting. And at that point, it might as well be rewritten in Swift.
Many of us on the team used Objective-C for years, even pre-ARC with manual retains/releases. And we all find Swift superior in almost every way. All the benefits of Swift will lead to an app that is higher in quality and the code will be easier to maintain and reason about.
I believe you could probably have parts of your app written in Objective-C because of Objective-C and Swift bridging. But ultimately anything that works directly with the Maps SDK will probably need to be written in Swift because the Swift Maps SDK takes advantage of Swift only features. Also, the Swift Maps SDK uses SwiftUI for displaying Maps and Scenes. While SwiftUI does integrate with UIKit, you would need to write some Swift code to wrap the Maps SDK and be able to glue it to any Objective-C code.
Every project is different. If your project has a large amount of Objective-C code that does not interact with the Maps SDK, then you might be able to reuse a large part of the Objective-C logic. However, if every file in your project references some Maps SDK types, then it might not be possible to reuse that code without significant rearchitecting. And at that point, it might as well be rewritten in Swift.
Many of us on the team used Objective-C for years, even pre-ARC with manual retains/releases. And we all find Swift superior in almost every way. All the benefits of Swift will lead to an app that is higher in quality and the code will be easier to maintain and reason about.
Thanks for your reply @rolson_esri