Swift and Objective-C

Share:

These questions were only shown to the developers who chose Swift or Objective-C as one of their three primary programming languages.

Which Apple platforms do you develop for?

Do you use Swift and Objective-C together in the same project?

Most of the new projects being created are written in Swift, but larger companies still often support legacy Objective-C frameworks

Krzysztof Zabłocki

Creator of Sourcery and other OSS projects which power 80k+ apps

Do you write unit-tests for your Swift or Objective-C development?

Cross-platform developers: Swift or Objective-C users that use cross-platform technologies. Mobile developers: Swift orObjective-C users that develop for mobile platforms.

Testing in the community has gotten better in the last few years, but it's still pretty bad in comparison to other stacks. Some of it is a lack of proper education from Apple, and some of it is poor architecture choices, given that writing tests for MVC is more complicated than in other architecture patterns.

Krzysztof Zabłocki

Creator of Sourcery and other OSS projects which power 80k+ apps

There is still a significant opportunity for Swift/Objective-C developers to embrace unit testing. Those who do will stand out from the crowd.

Jon Reid

Coach and Trainer at Industrial Logic, Author of iOS Unit Testing by Example

Which unit-testing frameworks do you regularly use?

Apple has made significant improvements to XCTest and Xcode support for testing. I've seen a lot fewer people using alternative frameworks than in past years, as the cost of the learning curve and dealing with support issues usually outweighs the benefits.

Krzysztof Zabłocki

Creator of Sourcery and other OSS projects which power 80k+ apps

Which mock / matcher frameworks do you use?

Do you use UI tests?

UI Tests are much slower to run and often less reliable, they aren't great for TDD workflow, and most companies don't run them on each PR. Instead they are scheduled on CI or nightly builds.

Krzysztof Zabłocki

Creator of Sourcery and other OSS projects which power 80k+ apps

Which UI testing frameworks do you regularly use?

Which dependency manager do you use?

Do you plan to replace CocoaPods dependencies with SPM packages?

Which database engine / framework combination do you use?

Do you develop with Swift on Linux?

Do you develop server-side projects using Swift?

I’m not really surprised to see a slow rate of adoption here since it's still a pretty new stack in comparison to the alternatives. But I spoke to a bunch of engineers working with Swift on Server, and all I heard was praise regarding how well it works.

Krzysztof Zabłocki

Creator of Sourcery and other OSS projects which power 80k+ apps

Swift and Objective-C:

2022

Thank you for your time!

We hope you found our report useful. Share this report with your friends and colleagues.

If you have any questions or suggestions, please contact us at surveys@jetbrains.com.