Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

tray: move the iOS implementation to tray/ios

nyblnetaa830d2d76c2
diff --git a/.gitignore b/.gitignore
index 0a37b702..e1280d8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,5 +28,5 @@ working/
scripts/.cache/
# generated Xcode project — regenerate with `cd tray && xcodegen`
-tray/*.xcodeproj/
-tray/BentoTray/Resources/starter.bento.html
+tray/ios/*.xcodeproj/
+tray/ios/Resources/starter.bento.html
diff --git a/tray/README.md b/tray/README.md
index 1f42143b..804bcc0c 100644
--- a/tray/README.md
+++ b/tray/README.md
@@ -92,9 +92,13 @@ Needs **full Xcode** (Command Line Tools alone is not enough) and XcodeGen:
```sh
brew install xcodegen
-cd tray && xcodegen && open BentoTray.xcodeproj
+cd tray/ios && xcodegen && open BentoTray.xcodeproj
```
+Source lives under `tray/<platform>/` — `tray/ios/` today. The design below
+(the polyfill and its protocol) is platform-neutral; only the transport lookup
+and the native file layer are not.
+
`BentoTray.xcodeproj` is generated, never committed — a `.pbxproj` in git is a
merge-conflict magnet.
diff --git a/tray/BentoTray/AppDelegate.swift b/tray/ios/AppDelegate.swift
similarity index 100%
rename from tray/BentoTray/AppDelegate.swift
rename to tray/ios/AppDelegate.swift
diff --git a/tray/BentoTray/BentoDocument.swift b/tray/ios/BentoDocument.swift
similarity index 100%
rename from tray/BentoTray/BentoDocument.swift
rename to tray/ios/BentoDocument.swift
diff --git a/tray/BentoTray/DocumentBrowserViewController.swift b/tray/ios/DocumentBrowserViewController.swift
similarity index 100%
rename from tray/BentoTray/DocumentBrowserViewController.swift
rename to tray/ios/DocumentBrowserViewController.swift
diff --git a/tray/BentoTray/EditorViewController.swift b/tray/ios/EditorViewController.swift
similarity index 100%
rename from tray/BentoTray/EditorViewController.swift
rename to tray/ios/EditorViewController.swift
diff --git a/tray/BentoTray/Info.plist b/tray/ios/Info.plist
similarity index 100%
rename from tray/BentoTray/Info.plist
rename to tray/ios/Info.plist
diff --git a/tray/BentoTray/Resources/bridge.js b/tray/ios/Resources/bridge.js
similarity index 100%
rename from tray/BentoTray/Resources/bridge.js
rename to tray/ios/Resources/bridge.js
diff --git a/tray/BentoTray/SceneDelegate.swift b/tray/ios/SceneDelegate.swift
similarity index 100%
rename from tray/BentoTray/SceneDelegate.swift
rename to tray/ios/SceneDelegate.swift
diff --git a/tray/project.yml b/tray/ios/project.yml
similarity index 79%
rename from tray/project.yml
rename to tray/ios/project.yml
index 115dc2bc..f1dddd82 100644
--- a/tray/project.yml
+++ b/tray/ios/project.yml
@@ -1,4 +1,4 @@
-# XcodeGen spec — `brew install xcodegen && cd ios && xcodegen` produces
+# XcodeGen spec — `brew install xcodegen && cd tray/ios && xcodegen` produces
# BentoTray.xcodeproj. The project file is generated, never committed, so it
# can't rot into a merge-conflict magnet the way .pbxproj does.
name: BentoTray
@@ -11,7 +11,8 @@ targets:
type: application
platform: iOS
sources:
- - path: BentoTray
+ - path: .
+ excludes: [project.yml]
preBuildScripts:
# The seed shell for "new document". Copied from the current build rather
# than committed: a 587KB binary in git would churn on every release, and
@@ -19,8 +20,8 @@ targets:
# normal signed channel the first time it checks.
- name: Stage starter shell
script: |
- SRC="$SRCROOT/../slides/dist-single/Bento_Slides.bento.html"
- DST="$SRCROOT/BentoTray/Resources/starter.bento.html"
+ SRC="$SRCROOT/../../slides/dist-single/Bento_Slides.bento.html"
+ DST="$SRCROOT/Resources/starter.bento.html"
if [ -f "$SRC" ]; then
mkdir -p "$(dirname "$DST")" && cp "$SRC" "$DST"
elif [ ! -f "$DST" ]; then
@@ -28,7 +29,7 @@ targets:
fi
settings:
base:
- INFOPLIST_FILE: BentoTray/Info.plist
+ INFOPLIST_FILE: Info.plist
PRODUCT_BUNDLE_IDENTIFIER: page.bento.tray
TARGETED_DEVICE_FAMILY: "1,2" # iPhone and iPad
SWIFT_VERSION: "5.0"