Skip to content

iOS port of Fcitx5, currently not working. 小企鹅输入法 iOS 还用不了

License

Notifications You must be signed in to change notification settings

fcitx-contrib/fcitx5-ios

Repository files navigation

Fcitx5 iOS

Fcitx5 input method framework ported to iOS.

Build

This project is NOT managed by Xcode, but Xcode is needed for iOS SDK.

Install dependencies

brew install cmake extra-cmake-modules gettext
IOS_PLATFORM=SIMULATOR ./scripts/install-deps.sh

Apply patches

git apply --directory=fcitx5 patches/fcitx5.patch
git apply --directory=engines/libime/src/libime/core/kenlm patches/kenlm.patch
git apply --directory=engines/fcitx5-rime patches/rime.patch # if building with Rime

Build with CMake

cmake -B build -G Xcode \
  -DURL_SCHEME=fcitx \
  -DCHINESE_ADDONS=ON \
  -DHALLELUJAH=ON \
  -DRIME=ON \
  -DIOS_PLATFORM=SIMULATOR
cmake --build build --config Debug

You can also use Cmd+Shift+B in VSCode to execute a task.

Play with simulator

xcrun simctl list devices
xcrun simctl boot UUID
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
xcrun simctl install booted build/src/Debug-iphonesimulator/Fcitx5.app

After the first time you execute xcrun simctl install, you need to add Fcitx5 in Settings -> General -> Keyboard -> Keyboards -> Add New Keyboard.

  • Simulator is not emulator (virtual machine). Simulator file system is mapped from host filesystem. A process in simulator is a process in macOS.
  • App and input method (custom keyboard extension) are different programs. They share a directory (via App Group) in ~/Library/Developer/CoreSimulator/Devices/UUID/data/Containers/Shared/AppGroup.

Credits

About

iOS port of Fcitx5, currently not working. 小企鹅输入法 iOS 还用不了

Topics

Resources

License

Stars

Watchers

Forks