# SumSlide mobile SDK for iOS

Edit `.pptx` presentations inside your own iOS app: the SumSlide core runs in your app process (no server, no
network) and the editor page runs in a `WKWebView`. The document comes in and goes out as bytes.

## What is in the box

| Path | What |
|---|---|
| `SumSlideCore.xcframework` | the core: static library for device (`ios-arm64`) and simulator (`ios-arm64-simulator`), C header and module map (`import SumSlideCore`) |
| `sumslide/` | the editor page (`mobile.html`, scripts, fonts) — add as a folder reference |
| `Sources/SlidesEditorView.swift` | `SumSlideSession` (core session) and `SlidesEditorView` (WKWebView + bridge) |
| `example/ExampleApp.swift`, `example/Info.plist` | reference host: opens `sample.pptx`, saves edits to Documents |
| `sample.pptx` | a small deck to prove the integration |
| `VERSION` | version and SHA-256 of the core and page |

## Steps 1-2-3

1. Add `SumSlideCore.xcframework` to your target (embed: do not embed, it is static), add the `sumslide/` folder as
   a folder reference, add `Sources/SlidesEditorView.swift`.
2. Create a session and the view:

   ```swift
   let session = SumSlideSession()
   let slides = try session.open(name: "deck.pptx", data: bytes)   // number of slides
   let editor = SlidesEditorView(session: session)
   editor.onSave = { name, data in try? data.write(to: documents.appendingPathComponent(name)); return name }
   ```
3. Put `editor` into your view hierarchy. Saving (Cmd+S, File ▸ Save) calls `onSave` with the `.pptx` bytes.

iOS 17 or later, arm64.
