owt-client-native icon indicating copy to clipboard operation
owt-client-native copied to clipboard

Support swift package manager

Open rouzbeh-abadi opened this issue 3 years ago • 2 comments

Is there any way to use this iOS SDK in a swift package manager?

rouzbeh-abadi avatar Mar 11 '22 00:03 rouzbeh-abadi

The iOS SDK is written in Objective-C. We don't have a plan to rewrite it in Swift or add a Swift wrapper so far.

jianjunz avatar Mar 11 '22 01:03 jianjunz

Actually, it's possible to add SMP support. No need to re-write or add a Swift wrapper class.

Creating C Language Targets

C language targets are similar to Swift targets, except that the C language libraries should contain a directory named include to hold the public headers.

To allow a Swift target to import a C language target, add a target in the manifest file. Swift Package Manager will automatically generate a modulemap for each C language library target for these 3 cases:

The Swift Package Manager is the way for iOS developers.

Resource

https://github.com/apple/swift-package-manager/blob/main/Documentation/Usage.md#creating-c-language-targets

gurhub avatar Jun 09 '22 07:06 gurhub