This is the home for Kiwix apps on iOS and macOS.
- Download the iOS mobile app on the App Store
- Download Kiwix Desktop on the Mac App Store
- Download Kiwix Desktop DMG file
- An Apple Developer account (doesn't require membership)
- Latest Apple Developers Tools (Xcode)
- Its command-line utilities (
xcode-select --install
) CoreKiwix.xcframework
(libkiwix)
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 CoreKiwix.xcframework
will contain libkiwix library for macOS archs 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
.
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. Make sure to download an iOS SDK if you want to build for iOS.
xcode-select --install
Then you can build libkiwix
git clone https://github.com/kiwix/kiwix-build.git
cd kiwix-build
# [iOS] build libkiwix
kiwix-build --target-platform iOS_arm64 libkiwix
kiwix-build --target-platform iOS_x86_64 libkiwix # iOS simulator in Xcode
# [macOS] build libkiwix
kiwix-build --target-platform macOS_x86_64 libkiwix
kiwix-build --target-platform macOS_arm64_static libkiwix
This creates a single .a
archive named merged.a
(for each platform) which contains libkiwix and all it's dependencies.
Skip those you don't want to support.
libtool -static -o BUILD_macOS_x86_64/INSTALL/lib/merged.a BUILD_macOS_x86_64/INSTALL/lib/*.a
libtool -static -o BUILD_macOS_arm64_static/INSTALL/lib/merged.a BUILD_macOS_arm64_static/INSTALL/lib/*.a
libtool -static -o BUILD_iOS_x86_64/INSTALL/lib/merged.a BUILD_iOS_x86_64/INSTALL/lib/*.a
libtool -static -o BUILD_iOS_arm64/INSTALL/lib/merged.a BUILD_iOS_arm64/INSTALL/lib/*.a
If you built macOS support for both archs (that's what you want unless you know what you're doing), you need to merge both files into a single one
mkdir -p macOS_fat
lipo -create -output macOS_fat/merged.a \
-arch x86_64 BUILD_macOS_x86_64/INSTALL/lib/merged.a \
-arch arm64 BUILD_macOS_arm64_static/INSTALL/lib/merged.a
xcodebuild -create-xcframework \
-library macOS_fat/merged.a -headers BUILD_macOS_x86_64/INSTALL/include \
-library BUILD_iOS_x86_64/INSTALL/lib/merged.a -headers BUILD_iOS_x86_64/INSTALL/include \
-library BUILD_iOS_arm64/INSTALL/lib/merged.a -headers BUILD_iOS_arm64/INSTALL/include \
-output ../apple/CoreKiwix.xcframework
You can now launch the build from Xcode and use the iOS simulator or your macOS target. At this point the xcframework is not signed.
- Open project with Xcode
open Kiwix.xcodeproj/project.xcworkspace/
- Change the Bundle Identifier (in Signing & Capabilities)
- Select appropriate Signing Certificate/Profile.