Stremio / stremio-core-swift

Port of stremio-core-kotlin wrapper to work on Apple devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stremio-core-swift

stremio-core-swift is a wrapper for Apple operating systems, based on stremio-core-kotlin. Any changes that are not specific to Apple should be contributed to stremio-core-kotlin.

Adding as an SPM Package

To integrate stremio-core-swift into your project, simply add it as a Swift Package Manager (SPM) package. It will automatically handle everything for you:

  • Protobuf will be generated at Xcode compile time.
  • The compiled Rust binary will be fetched from the releases.

Alternatively, complie Rust Binary on Your Mac

To compile the Rust binary on your macOS machine, follow these steps:

  1. Install Apple Rust Dependencies:

    Run the following command to install the necessary dependencies:

    Support/installDependencies.command
  2. Compile rust code:

    make all
  3. Define the XCFramework in Package.swift:

    Uncomment the local binary target in the Package.swift file:

    .binaryTarget(name: "XCFramework", path: ".build/StremioCore.xcframework")
    //.binaryTarget(name: "XCFramework", url: url, checksum: sha256)
  4. Add the Local Package in Xcode:

    Finally, add the package as a local package in Xcode.

About

Port of stremio-core-kotlin wrapper to work on Apple devices

License:MIT License


Languages

Language:Rust 81.4%Language:Swift 16.5%Language:Makefile 1.7%Language:C 0.3%Language:Shell 0.2%