Koloda icon indicating copy to clipboard operation
Koloda copied to clipboard

[Add] Package.swift

Open Wei18 opened this issue 2 years ago • 4 comments

As title, create Package.swift and binaryTarget pop.

About pop.zip

This script performs the following steps:

  1. Install Dependencies: Runs bundle install to set up Ruby dependencies.
  2. Clean Up: Removes previous builds and cache.
  3. Build Frameworks:
    • For iOS (arm64): Runs pod install and Rugby, then stores in popFrameworks/ios-arm64.
    • For Simulator (arm64): Builds and stores in popFrameworks/sim-arm64.
    • For Simulator (x86_64): Builds and stores in popFrameworks/sim-x86_64.
  4. Combine Architectures: Uses lipo to merge arm64 and x86_64 binaries into a single framework.
  5. Create XCFramework: Uses xcodebuild to bundle the iOS and simulator frameworks into pop.xcframework.

The resulting .xcframework is suitable for Xcode projects targeting both iOS devices and simulators.

For more details, you can download this file for reference to the source code: https://github.com/Wei18/pop/releases/download/1.0.12/setup-pop-zip.zip

Special thanks to @swiftyfinch:

  • https://github.com/swiftyfinch/Rugby

Wei18 avatar Oct 07 '22 09:10 Wei18

Why is no one merging it?

N-ihad avatar Jan 19 '23 08:01 N-ihad

By the way @Wei18 you sure about minimum version of Swift in Package.swift being 5.7?

// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

N-ihad avatar Jan 24 '23 10:01 N-ihad

By the way @Wei18 you sure about minimum version of Swift in Package.swift being 5.7?


// swift-tools-version: 5.7

// The swift-tools-version declares the minimum version of Swift required to build this package.

Not the minimum but current. The SwiftPackage is still developing and closing stability, so I think that others developers should follow the latest tools version. It's okay to commit other tools version of Package.swift

Wei18 avatar Jan 26 '23 19:01 Wei18