Files

23 lines
1.1 KiB
TypeScript

/**
* The iOS app. Tauri can build it only on macOS with Xcode, and putting it on a phone needs an
* Apple developer account (free for one's own device; paid for TestFlight and the App Store).
* Elsewhere this refuses with that reason instead of failing somewhere deep in the CLI
* (CLAUDE.md §8, *iOS cannot be built on Windows*; tauri-platforms.md G-T1).
*
* tsx scripts/ios.ts on macOS: `tauri ios init` once, icons, then `tauri ios build --debug`
*/
import { existsSync } from 'node:fs';
import { join } from 'node:path';
import { SRC_TAURI, tauri } from './tauri.js';
if (process.platform !== 'darwin') {
console.error(
'ios: the iOS app can only be built on macOS with Xcode (and an Apple developer account to run it on a phone).\n' +
`ios: this machine is ${process.platform}. Nothing was built. See .agents/features/tauri-platforms.md, G-T1.`
);
process.exit(1);
}
if (!existsSync(join(SRC_TAURI, 'gen', 'apple'))) tauri('ios', 'init', '--ci');
await import('./icons.js');
tauri('ios', 'build', '--debug', ...process.argv.slice(2));