Skip to content

beekpr/ios-binaries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ios-binaries

A place to keep binary dependencies. Those binaries can by imported by Swift Package Manager or CocoaPods.

Caution

Do not delete releases on this repository or binaries attached to those releases. This would break our CI builds.

What are tags for?

Every new swift version requires new version of swift binaries, which is why we have separate tags like swift-5.7. Swift version is usually incremented with every new major release of Xcode.

In case of ObjC libraries, each time we update libraries we bump version which is integer, e.g. objc-v2

ℹ️ We keep legacy objc tag, for past release where we did not version Objetive-C releases

How to upload binaries

  1. In one directory, prepare zipped xcframeworks that you want to upload
  2. Calculate checksum file using this command:
find . -name "*.zip" -print0 | sort -z | xargs -r0 sha256sum > checksums-tag.txt
  1. Create a release in github with a new tag (does not matter on which commit).
  2. Rename checksums-tag to match the tag you picked. Example: checksums-swift-5.7.txt
  3. Upload zipped frameworks and checksum file.
  4. Add the checksums file to ios-base repository under BeekeeperPackage.
  5. Use the new tag in Package.swift.

Note: checksums file is not required, but simplifies the process of migration to new version or adding new libraries.

FrameworkGenerator

ios-base dependends on a number of obsolete libraries which do not support SPM. Because of that, we developed a workaround:

  1. Have a dummy iOS project.
  2. Added necessary pods to the project.
  3. Wrote a script that generates xcframeworks for those projects.
  4. Published those xcframeworks as a release.
cd FrameworkGenerator
sh Scripts/build/build_targets.sh

Realm & RxSwift

We don't have to build those frameworks (althought we could, through FrameworkGenerator). They are built and uploaded to github by their own developers, but we have to repack them into our release workflow. They are providing multiple .xcframeworks packaged together, while we need to have every xcframework in a separate zip. https://github.com/ReactiveX/RxSwift/releases https://github.com/realm/realm-swift/releases

Building ogg & opus

Those two libraries, written in C, are special. See: https://github.com/beekpr/ios-AudioXCFrameworks

To generate ogg.xcframework and opus.xcframework, run these commands:

git clone git@github.com:sbooth/AudioXCFrameworks.git --recurse-submodules
cd AudioXCFrameworks/ogg
make
cd ../opus
make