Swiftpack.co - minddocdev/twilio-chat-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by minddocdev.
minddocdev/twilio-chat-ios 2.5.0
Twilio Chat iOS Stub as SPM
⭐️ 1
🕓 4 years ago
.package(url: "https://github.com/minddocdev/twilio-chat-ios.git", from: "2.5.0")

twilio-chat-ios

CircleCI

Twilio chat iOS library fully stubbed for SPM integrations.

Why?

In order to be able to run tests also on Linux systems, we abstract Swift code in SPMs as much as possible, that can be used by our iOS applications. The iOS application will have the real Twilio dependency (via Cocoapods), and the tests are run isolated in the Twilio Chat SPM package, which loads this SPM dependency.

Objective-C bridges and umbrella headers did not work as expected in this kind of integration, therefore we decided to transform those headers into swift files without implementing any logic and stubbing function returns.

Versions

Versions are linked via git tags.

  • 2.5.0

Twilio Chat iOS Carthage Dependency

Dependencies are transformed into Swift 5.0 files from Twilio's Carthage headers.

Generate binaries with Carthage

Twilio defines a Carthage dependency though, that can be set up in Xcode with a few hacks, following the using Swift package manager with Carthage guide.

In order to generate the dependency binaries that this project uses to create the Swift files, carthage needs to be installed.

brew install carthage

Then, checkout the Twilio repository

carthage update

Now, a Carthage folder should have been created (that won't be pushed to the repository), with a Checkouts subfolder.

To generate the TwilioChatClient real binaries:

carthage build

This will have generated a Builds subfolder. You can now check the Objective C headers for the Twilio library in Carthage/Builds/iOS/TwilioChatClient.framework/Headers.

GitHub

link
Stars: 1
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Related Packages

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics