Developer Guide
- Current features only: Page-aware AI explanations; iCloud JSON page cache (
inf6.pagecache); YAML library viewer (read-only). - Requires OpenAI API key: inf6’s AI explanations need your OpenAI API key. It is stored locally (User Defaults). Get one at platform.openai.com/api-keys.
 - Fix “Invalid redeclaration of 
seedInitialDirectory” if you see that build error. - Add/replace iOS & iPadOS App Icons with the required sizes and 
Contents.json. - Understand JSON vs YAML (what is saved where).
 
Setup (OpenAI API Key)
Required: An OpenAI API key is mandatory to use AI explanations. / OpenAI の API キーが必須です。
- Create/Sign in to OpenAI: Visit platform.openai.com/api-keys and generate a new secret key.
 - Enter your key in inf6: In the app, open the gear icon → OpenAI API Key, paste the key, then Save.
 - Test: Open any PDF page and run “Create Explanation”. If the key is missing/invalid, the app shows an error.
 
Billing & Privacy: Usage is billed by OpenAI per token. Your key stays on‑device (User Defaults). Only your prompts and minimal context are sent to the API.
Overview
        inf6 helps you read technical texts and create page-aware AI explanations.
        Explanations and notes are stored as iCloud JSON (inf6.pagecache), and a
        read-only YAML viewer lets you browse existing YAML libraries on iPhone and Mac.
        AI features require your OpenAI API key (see Setup).
      
Main Features
Page-aware AI Explanations NEW
Create explanations grounded in on-page text (JP/EN). Cancel / retry supported.
iCloud Page Cache (JSON)
Notes and explanations are saved as inf6.pagecache in your iCloud container. Use the same Apple ID to keep devices in sync.
YAML Library Viewer (Read-only)
Browse YAML files stored in iCloud. Great for keeping a structured knowledge library alongside your notes.
Comfortable Reading UI
Zoom HUD, thumbnail sidebar, split view, and detail-pane font scaling for long reading sessions.
Fix: “Invalid redeclaration of seedInitialDirectory”
      - Search in 
BookLibraryView.swiftforseedInitialDirectoryand keep only one set of these helpers (macOS & iOS): 
// MARK: - Seed initial directory for file/folder pickers
#if os(macOS)
@inline(__always)
private func seedInitialDirectory(_ panel: NSOpenPanel) {
    if let u = BookLibraryView.lastPDFFolderURL() {
        panel.directoryURL = u
    }
}
#endif
#if canImport(UIKit)
@inline(__always)
private func seedInitialDirectory(_ picker: UIDocumentPickerViewController) {
    if let u = BookLibraryView.lastPDFFolderURL() {
        picker.directoryURL = u
    }
}
#endif
      - Remove duplicate wrappers 
DocumentFilePickerWrapper/DocumentFolderPickerWrapperif they exist twice. - Remove duplicate “bookmark helpers” blocks (
lastPDFFolderURL/rememberPDFFolder) if duplicated. - Clean build (Shift+Cmd+K) and build again.
 
App Icons (iOS & iPadOS)
Add AppIcon.appiconset inside Assets.xcassets with these required sizes:
- iPhone: 20@2x, 20@3x, 29@2x, 29@3x, 40@2x, 40@3x, 60@2x, 60@3x
 - iPad: 20@1x, 20@2x, 29@1x, 29@2x, 40@1x, 40@2x, 76@1x, 76@2x, 83.5@2x
 - Marketing: 1024×1024 (no alpha)
 
Sample Contents.json
        {
  "images":[
    {"idiom":"iphone","size":"20x20","scale":"2x","filename":"icon_iphone_20x20@2x.png"},
    {"idiom":"iphone","size":"20x20","scale":"3x","filename":"icon_iphone_20x20@3x.png"},
    {"idiom":"iphone","size":"29x29","scale":"2x","filename":"icon_iphone_29x29@2x.png"},
    {"idiom":"iphone","size":"29x29","scale":"3x","filename":"icon_iphone_29x29@3x.png"},
    {"idiom":"iphone","size":"40x40","scale":"2x","filename":"icon_iphone_40x40@2x.png"},
    {"idiom":"iphone","size":"40x40","scale":"3x","filename":"icon_iphone_40x40@3x.png"},
    {"idiom":"iphone","size":"60x60","scale":"2x","filename":"icon_iphone_60x60@2x.png"},
    {"idiom":"iphone","size":"60x60","scale":"3x","filename":"icon_iphone_60x60@3x.png"},
    {"idiom":"ipad","size":"20x20","scale":"1x","filename":"icon_ipad_20x20@1x.png"},
    {"idiom":"ipad","size":"20x20","scale":"2x","filename":"icon_ipad_20x20@2x.png"},
    {"idiom":"ipad","size":"29x29","scale":"1x","filename":"icon_ipad_29x29@1x.png"},
    {"idiom":"ipad","size":"29x29","scale":"2x","filename":"icon_ipad_29x29@2x.png"},
    {"idiom":"ipad","size":"40x40","scale":"1x","filename":"icon_ipad_40x40@1x.png"},
    {"idiom":"ipad","size":"40x40","scale":"2x","filename":"icon_ipad_40x40@2x.png"},
    {"idiom":"ipad","size":"76x76","scale":"1x","filename":"icon_ipad_76x76@1x.png"},
    {"idiom":"ipad","size":"76x76","scale":"2x","filename":"icon_ipad_76x76@2x.png"},
    {"idiom":"ipad","size":"83.5x83.5","scale":"2x","filename":"icon_ipad_83_5x83_5@2x.png"},
    {"idiom":"ios-marketing","size":"1024x1024","scale":"1x","filename":"icon_marketing_1024x1024.png"}
  ],
  "info":{"version":1,"author":"xcode"}
}
      After replacing the icon set, select it in Targets → General → App Icons and Clean Build Folder.
Data Format (JSON & YAML)
- Page explanations & notes: saved as 
iCloud JSON(inf6.pagecache). - YAML Library: viewer only (read-only) at present. Editing UI is not included.
 
iCloud Sync
- Start on iPhone, continue on Mac — your page cache and YAML files stay in step.
 - OpenAI key & privacy: AI features require your OpenAI API key. The key is stored locally (User Defaults). You control when requests are sent.
 
Requires iCloud Drive enabled on both devices. Network conditions may affect sync timing.
Screens
        
        
      Contact
Support / bug reports: support@inf6.com
See Support page for setup (iCloud Drive, permissions) and FAQs.
Download
The app will be available on the App Store for iPhone and Mac (via Mac build). The link will be posted here after review.