The Wayback Machine - https://web.archive.org/web/20230702112145/https://github.com/kiwix/apple
Skip to content

kiwix/apple

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

* coredata & entity

* project

* App

* model

* root view

* controller

* changelog
c03174b

Git stats

Files

Permalink
Failed to load latest commit information.

Kiwix for iOS & macOS

This is the home for Kiwix apps on iOS and macOS.

CodeFactor License: GPL v3 Drawing=

Mobile app for iPads & iPhones

  • Download the iOS mobile app on the App Store

Kiwix Desktop for macOS

Developers

Dependencies

Creating libkiwix.xcframework

Instructions to build libkiwix at on the kiwix-build repo.

The xcframework is a bundle of a library for multiple architectures and/or platforms. The libkiwix.xcframework will contain libkiwix library for macOS arch and for iOS. You don't have to follow steps for other platform/arch if you don't need them.

Following steps are done from kiwix-build root and assume your apple repository is at ../apple.

Build libkiwix

Make sure to preinstall kiwix-build prerequisites (ninja and meson).

If you use homebrew, run the following

brew install ninja meson

Make sure xcode command tools are installed

xcode-select --install

After you can build the libkiwix

git clone https://github.com/kiwix/kiwix-build.git
cd kiwix-build
# [iOS] build libkiwix
kiwix-build --target-platform iOS_multi libkiwix
# [macOS] build libkiwix
kiwix-build --target-platform macOS_arm64 libkiwix
kiwix-build --target-platform macOS_x86_64 libkiwix

Create fat archive with all dependencies

This creates a single .a archive named libkiwix which contains all libkiwix's dependencies. If you are to create an xcframework with multiple architectures/platforms, repeat this step for each:

  • macOS_x86_64
  • macOS_arm64
  • iOS_x86_64
  • iOS_arm64

You'll have to do it for both iOS archs although you built it using multi.

libtool -static -o BUILD_<target>/INSTALL/lib/libkiwix.a BUILD_<target>/INSTALL/lib/*.a

Add fat archive to xcframework

xcodebuild -create-xcframework -library BUILD_<target>/INSTALL/lib/libkiwix.a -headers BUILD_<target>/INSTALL/include -output ../apple/Libraries/libkiwix.xcframework

You can now launch the build from Xcode and use the iOS simulator or your macOS target.

Building Kiwix iOS or Kiwix macOS

  • Open project with Xcode open Kiwix.xcodeproj
  • Change the App groups (in Capabilities) and Bundle Identifier for both iOS and Bookmarks targets
    • App Group must be different and unique (ex: tld.mydomain.apple)
    • iOS Bundle Identifier must be different and unique (ex: tld.mydomain.apple.Kiwix)
    • Bookmarks Bundle Identifier must be a child of iOS one (ex: tld.mydomain.apple.Kiwix.Bookmarks)
    • if you are using a regular (non-paying) Apple Developer Account, you are limited in the number of App IDs you can use so be careful not to fumble much with those.
  • Change the Signing profile to your account.