# Breeder iOS Handoff

This is a direct iOS wrapper around the current Breeder web app. The UI and game player are bundled under `BreederIOS/app`, and the Swift shell loads them in a fullscreen `WKWebView`.

What is included:

- The current Breeder editor UI.
- Touch-oriented iOS mode through the bundled `ios-shell` path.
- In-app Stories shelf.
- `.breeder.zip` import from the Stories shelf.
- Linked story import through the hosted web player with `?story=`.
- Game export on iPhone saves a playable Story inside Breeder instead of generating a separate executable.
- Story playback uses the same Breeder player code as preview/export.
- Story tuning lets you change page task/theme/loop/fit settings and save a new story copy.
- Story zip sharing is available from the Stories shelf when iOS Web Share supports files.
- Files/Share document handoff is registered for Breeder story zips. For very large video stories, use the in-app Import button because it keeps the file transfer inside WebKit.

Build on Mac:

```bash
cd Breeder/iOS/BreederIOS
APPLE_TEAM_ID=YOURTEAMID ./build_ipa_on_mac.sh
```

If Xcode asks for signing:

1. Open `BreederIOS.xcodeproj`.
2. Select target `BreederIOS`.
3. Set your Team under Signing & Capabilities.
4. Keep bundle id or change `com.local.breeder.ios`.
5. Product > Archive.
6. Distribute App > Development or Ad Hoc, depending on how you sideload.

Important:

- A real `.ipa` needs macOS, Xcode, and Apple signing credentials. This Windows machine can create the source handoff but cannot produce a valid signed iPhone archive.
- If you change the Windows/web Breeder app, copy `Breeder/index.html` and `Breeder/src` back into `Breeder/iOS/BreederIOS/BreederIOS/app`.
- Large videos are stored in iOS WebKit IndexedDB for Stories. Keep first tests small, then scale up.
- The app supports portrait, landscape left, and landscape right. Portrait is listed first in Info.plist so first launch and iPhone testing favor portrait.
