Skip to main content

A Python script for creating XCFrameworks for CMake projects

Project description

iOSBuild

macOS Python GitHub License: MIT CI Build Read the Docs Documentation Status Coverage

Welcome to iOSBuild, a Python application for building CMake libraries for Apple systems. The aim of the project is to use a CMakeLists.txt file to generate an XCFramework containing static libraries for use across iOS and other Apple operating systems.

This project makes use of the ios-cmake toolchain to configure and build the libraries using CMake. The libraries are built for each of the specified platforms and combined into a single xcframework for each library. These may then be included in iOS, watchOS, visionOS, tvOS, and macOS applications using Xcode.

Pre-requisites

In order to run the code there are a number of non-Python projects which must be installed:

  • CMake (minimum tested version 3.22)
  • XCode (command line tools)
  • Apple SDKs for each of the specified targets
  • Python (versions 3.9-3.13 supported)

Optional Dependencies:

Since the project requires XCode and the SDK for each target platform, the project only works for macOS.

Getting started

This repository includes a simple example CMake project for testing the build system.

To build using pip from this repo:

pip install .
pip -m ios_build -v example

This builds the example project using sensible defaults for iOS (ARM64), iOS Simulator (ARM64), and macOS (ARM64). This configuration builds the files in a subdirectory build of the current directory, downloads the ios.toolchain.cmake file to the current directory and installs the libraries and the xcframework to install. If successful, this outputs a file libiosbuildexample.xcframeworks in the install/ directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iosbuild-0.1.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iosbuild-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file iosbuild-0.1.0.tar.gz.

File metadata

  • Download URL: iosbuild-0.1.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.21

File hashes

Hashes for iosbuild-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a229366acba799f3b1af003fc04a65ce0d0dc1d86021420bda52a3b73a9d4d26
MD5 50bc8fdacf45b4a0262d9aa8424bd239
BLAKE2b-256 c768820f4d6e700ff797451103270f2b232770046260f4c294e4a1655fdacff8

See more details on using hashes here.

File details

Details for the file iosbuild-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iosbuild-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.21

File hashes

Hashes for iosbuild-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ac7405199457317b704efc331eedebb9bcac20af24663fa315075c8a450a537
MD5 68bfe9a08ebe5c8ae87dbc80516f0620
BLAKE2b-256 6f3503eeafbe7f36fb97dd3c25838529c414e4324829dfa3e31145fb4373544e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page