open-webrtc-toolkit / owt-client-native

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
389 stars 181 forks source link

Support swift package manager #584

Open rouzbeh-abadi opened 2 years ago

rouzbeh-abadi commented 2 years ago

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

jianjunz commented 2 years ago

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.

gurhub commented 2 years ago

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