This template should help get you started developing with Tauri, React and Typescript in Vite.
pnpm i
pnpm run tauri dev
pnpm run tauri android init
pnpm run tauri android dev
iPhone only, iOS 17 or newer. Needs Xcode, rustup target add aarch64-apple-ios aarch64-apple-ios-sim, and the network for the first build (SwiftPM fetches swift-rs for Tauri's Swift package).
pnpm run build:ios-simbuilds for the simulator into src-tauri/gen/apple/build/arm64-sim/BuckyOS.app; xcrun simctl install <device> <that path> installs it. The script removes the bundle of the last build first: Tauri would fail at the last step with "Directory not empty" and leave the old one there.
- The native side is Swift:
src-tauri/ios/ClientPlugin, a Tauri plugin thatbuild.rscompiles and links (Tauri's own Swift package is copied to.tauri/in it). Rust calls it byrun_mobile_plugin_async; what needs an answer at once goes through the C functions inClientBridge.h. src-tauri/Info.ios.plisthas what is only iOS's (Info.plistis also macOS's). Tauri merges both intogen/apple/buckyosapp_iOS/Info.plistat every build; the merged file is committed. A key taken out of them has to be taken out there too.project.ymlis whatproject.pbxprojwas generated from; without xcodegen, change both.
The client uses some sources of the buckyos Desktop as they are (Zone API wrappers, Activity, appearance, design tokens): @buckyos-desktop/* is src/frame/desktop/src/shared/* of a buckyos checkout next to this repository (branch main), or of .buckyos/ inside it, which is what CI checks out. They are referenced, never copied; change them in buckyos. The WebSDK (npm package buckyos) both sides import is this project's copy. Building fails with a message when no checkout is found.
Order of releases: the WebSDK is published first, then buckyos, then this repository.
矢量源文件为 src/assets/app-icon.svg(圆形底)。iOS 图标不能透明,另用满版紫色底的 src/assets/app-icon-ios.svg,两者的 B 图形相同,改一处时另一处也要改。启动页、欢迎页和关于页使用 src/assets/app-icon.png,桌面安装包与托盘使用 src-tauri/icons/ 下的对应尺寸资源。
使用项目已有的 Tauri CLI 重新生成平台图标:
pnpm exec tauri icon src/assets/app-icon.svg --ios-color '#5267DB'
pnpm exec tauri icon src/assets/app-icon-ios.svg -o /tmp/buckyos-ios-icon
cp /tmp/buckyos-ios-icon/ios/*.png src-tauri/icons/ios/
magick mogrify -alpha remove -alpha off src-tauri/icons/ios/*.png
magick src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png -resize 72x72 src-tauri/icons/android/mipmap-hdpi/ic_launcher.png
magick src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png -resize 72x72 src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.pngImageMagick 命令移除 iOS 图标的 alpha 通道,并确保 Android hdpi 启动图为 72×72。生成后,将 src-tauri/icons/icon.png 同步到 src/assets/app-icon.png;将 src-tauri/icons/ios/ 中的 PNG 同步到 src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/;将 src-tauri/icons/android/ 同步到 src-tauri/gen/android/app/src/main/res/,并将其中 mipmap-xxxhdpi/ic_launcher.png 同步到 src-tauri/icons/ic_launcher.png。Android 自适应图标使用蓝色背景填充透明区域;iOS 图标全部来自满版源图,不用第一条命令生成的那套。
BuckyOSApp first-party code is licensed under the GNU Affero General Public License, version 3 only (AGPL-3.0-only), the same license as BuckyOS; see LICENSE. See NOTICE for retained notices. Third-party dependencies and bundled assets keep their own licenses; the BuckyOS WebSDK (npm package buckyos) stays Apache-2.0.
When distributing binaries, provide the corresponding source and build materials required by the applicable licenses.