Starting with Helpshift iOS SDK version 7.7.0, we will be introducing Swift language support in our SDK. The existing Objective-C API will remain unchanged to ensure apps that upgrade to the new SDK do not face any breaking changes.
Helpshift recommends you to share this information with your developers so that they prepare well for the release.
Why do we need Swift?
- Swift is the state-of-the-art programming language recommended by Apple for building modern iOS apps.
- Additionally, with Swift 5, Apple has also introduced ABI stability. It includes the Swift run-time in current and future versions of Apple’s platform operating systems.
- Swift is also a continuously improving technology with all new language and compiler level optimizations being introduced by Apple.
- Swift has a lot of stability benefits that come from using a modern language. On the contrary, Objective-C is considered soon to be deprecated technology.
Hence, we have decided to implement Swift 5 in our SDK along with an existing Objective-C code. Since the source code of Swift 5 is compatible with Swift 4, therefore when upgrading, there will be no change in Swift versions for the Swift applications using the Helpshift SDK.
Impact of Swift on your Apps
Starting with SDK version 7.7.0, the iOS SDK will Swift code along with the current ObjC implementation. When upgrading to version 7.7.0, your developers will need to make certain changes in the Build Settings section if you are not currently using Swift in your native applications.
- Add `/usr/lib/swift` as the first entry in the Runpath search paths setting
- Add `$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)` to the Library Search paths
We will keep working on improving the on-boarding guide to include the above and any other changes that we might require.
Swift run-time libraries:
Swift run-time libraries are required by every app which has Swift code when running on a user’s device. These run-time libraries are bundled with all iOS versions higher than iOS 12.1. Since these libraries are missing in lower iOS versions, Apple will package these with your app when uploading to the App store. For apps that are already using Swift, there will be no impact on the final download size of the app when upgrading to iOS SDK version 7.7.0. For apps that are not using Swift, there will be a slight increase in the final download size of approximately 2 MB, but this will be restricted to devices running iOS 12.1 or lower only.
iOS SDK versions 7.6 and below support Xcode 10.0 and above. Unfortunately due to a bug in Xcode, Xcode 10.0 and 10.1 are not able to build apps with Swift code. When using these Xcode versions, apps will crash on iOS versions 12.1 and below. When upgrading to SDK version 7.7.0 apps, you will need to migrate using Xcode 10.2 or higher to build their applications.`