Browse Source

Merge pull request #870 from mozilla/ios-prototype-3

Implement ios prototype version
Danny Coates 6 years ago
parent
commit
e42ad175db

+ 2 - 0
.gitignore

@@ -8,4 +8,6 @@ dist
 .pytest_cache
 android/app/src/main/assets/vendor.js
 android/app/src/main/assets/android.js
+ios/send-ios/assets/ios.js
+ios/send-ios/assets/vendor.js
 

+ 21 - 0
ios/generate-bundle.js

@@ -0,0 +1,21 @@
+const child_process = require('child_process');
+const fs = require('fs');
+const path = require('path');
+
+child_process.execSync('npm run build');
+
+const prefix = path.join('..', 'dist');
+const json_string = fs.readFileSync(path.join(prefix, 'manifest.json'));
+const manifest = JSON.parse(json_string);
+
+const ios_filename = manifest['ios.js'];
+fs.writeFileSync(
+  'send-ios/assets/ios.js',
+  fs.readFileSync(`${prefix}${ios_filename}`)
+);
+
+const vendor_filename = manifest['vendor.js'];
+fs.writeFileSync(
+  'send-ios/assets/vendor.js',
+  fs.readFileSync(`${prefix}${vendor_filename}`)
+);

+ 158 - 0
ios/ios.js

@@ -0,0 +1,158 @@
+/* global window, document, fetch */
+
+const MAXFILESIZE = 1024 * 1024 * 1024 * 2;
+
+const EventEmitter = require('events');
+const emitter = new EventEmitter();
+
+function dom(tagName, attributes, children = []) {
+  const node = document.createElement(tagName);
+  for (const name in attributes) {
+    if (name.indexOf('on') === 0) {
+      node[name] = attributes[name];
+    } else if (name === 'htmlFor') {
+      node.htmlFor = attributes.htmlFor;
+    } else if (name === 'className') {
+      node.className = attributes.className;
+    } else {
+      node.setAttribute(name, attributes[name]);
+    }
+  }
+  if (!(children instanceof Array)) {
+    children = [children];
+  }
+  for (let child of children) {
+    if (typeof child === 'string') {
+      child = document.createTextNode(child);
+    }
+    node.appendChild(child);
+  }
+  return node;
+}
+
+function uploadComplete(file) {
+  document.body.innerHTML = '';
+  const input = dom('input', { id: 'url', value: file.url });
+  const copy = dom(
+    'button',
+    {
+      id: 'copy-button',
+      className: 'button',
+      onclick: () => {
+        window.webkit.messageHandlers['copy'].postMessage(input.value);
+        copy.textContent = 'Copied!';
+        setTimeout(function() {
+          copy.textContent = 'Copy to clipboard';
+        }, 2000);
+      }
+    },
+    'Copy to clipboard'
+  );
+  const node = dom(
+    'div',
+    { id: 'striped' },
+    dom('div', { id: 'white' }, [
+      input,
+      copy,
+      dom(
+        'button',
+        { id: 'send-another', className: 'button', onclick: render },
+        'Send another file'
+      )
+    ])
+  );
+  document.body.appendChild(node);
+}
+
+const state = {
+  storage: {
+    files: [],
+    remove: function(fileId) {
+      console.log('REMOVE FILEID', fileId);
+    },
+    writeFile: function(file) {
+      console.log('WRITEFILE', file);
+    },
+    addFile: uploadComplete,
+    totalUploads: 0
+  },
+  transfer: null,
+  uploading: false,
+  settingPassword: false,
+  passwordSetError: null,
+  route: '/'
+};
+
+function upload(event) {
+  console.log('UPLOAD');
+  event.preventDefault();
+  const target = event.target;
+  const file = target.files[0];
+  if (file.size === 0) {
+    return;
+  }
+  if (file.size > MAXFILESIZE) {
+    console.log('file too big (no bigger than ' + MAXFILESIZE + ')');
+    return;
+  }
+
+  emitter.emit('upload', { file: file, type: 'click' });
+}
+
+function render() {
+  document.body.innerHTML = '';
+  const striped = dom(
+    'div',
+    { id: 'striped' },
+    dom('div', { id: 'white' }, [
+      dom('label', { id: 'label', htmlFor: 'input' }, 'Choose file'),
+      dom('input', {
+        id: 'input',
+        type: 'file',
+        name: 'input',
+        onchange: upload
+      })
+    ])
+  );
+  document.body.appendChild(striped);
+}
+
+emitter.on('render', function() {
+  document.body.innerHTML = '';
+  const percent =
+    (state.transfer.progress[0] / state.transfer.progress[1]) * 100;
+  const node = dom(
+    'div',
+    { style: 'background-color: white; width: 100%' },
+    dom('span', {
+      style: `display: inline-block; width: ${percent}%; background-color: blue`
+    })
+  );
+  document.body.appendChild(node);
+});
+
+emitter.on('pushState', function(path) {
+  console.log('pushState ' + path + ' ' + JSON.stringify(state));
+});
+
+const fileManager = require('../app/fileManager').default;
+try {
+  fileManager(state, emitter);
+} catch (e) {
+  console.error('error' + e);
+  console.error(e);
+}
+
+function sendBase64EncodedFromSwift(encoded) {
+  fetch(encoded)
+    .then(res => res.blob())
+    .then(blob => {
+      emitter.emit('upload', { file: blob, type: 'share' });
+    });
+}
+
+window.sendBase64EncodedFromSwift = sendBase64EncodedFromSwift;
+
+render();
+
+window.webkit.messageHandlers['loaded'].postMessage('');

+ 77 - 0
ios/send-ios-action-extension/ActionViewController.swift

@@ -0,0 +1,77 @@
+//
+//  ActionViewController.swift
+//  send-ios-action-extension
+//
+//  Created by Donovan Preston on 7/26/18.
+//
+
+import UIKit
+import WebKit
+import MobileCoreServices
+
+var typesToLoad = [("com.adobe.pdf", "application/pdf"), ("public.png", "image/png"),
+                   ("public.jpeg", "image/jpeg"), ("public.jpeg-2000", "image/jp2"),
+                   ("com.compuserve.gif", "image/gif"), ("com.microsoft.bmp", "image/bmp"),
+                   ("public.plain-text", "text/plain")]
+
+class ActionViewController: UIViewController, WKScriptMessageHandler {
+
+    @IBOutlet var webView: WKWebView!
+    var typeToSend: String?
+    var dataToSend: Data?
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        self.webView.frame = self.view.bounds
+        self.webView?.configuration.userContentController.add(self, name: "loaded")
+        self.webView?.configuration.userContentController.add(self, name: "copy")
+
+        if let url = Bundle.main.url(
+            forResource: "index",
+            withExtension: "html",
+            subdirectory: "assets") {
+            self.webView.loadFileURL(url, allowingReadAccessTo: url.deletingLastPathComponent())
+        }
+        // Get the item[s] we're handling from the extension context.
+        
+        for item in self.extensionContext!.inputItems as! [NSExtensionItem] {
+            for provider in item.attachments! as! [NSItemProvider] {
+                for (type, mimeType) in typesToLoad {
+                    if provider.hasItemConformingToTypeIdentifier(type) {
+                        provider.loadDataRepresentation(forTypeIdentifier: type, completionHandler: { (data, error) in
+                            OperationQueue.main.addOperation {
+                                self.typeToSend = mimeType
+                                self.dataToSend = data
+                            }
+                        })
+                        return
+                    }
+                }
+            }
+        }
+    }
+
+    public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
+        print("Message received: \(message.name) with body: \(message.body)")
+        if (message.name == "loaded") {
+                let stringToSend = "window.sendBase64EncodedFromSwift('data:\(self.typeToSend ?? "application/octet-stream");base64,\(self.dataToSend?.base64EncodedString() ?? "")')";
+                self.webView.evaluateJavaScript(stringToSend) { (object: Any?, error: Error?) -> Void in
+                    print("completed")
+                }
+        } else if (message.name == "copy") {
+            UIPasteboard.general.string = "\(message.body)"
+        }
+    }
+
+    override func didReceiveMemoryWarning() {
+        super.didReceiveMemoryWarning()
+        // Dispose of any resources that can be recreated.
+    }
+
+    @IBAction func done() {
+        // Return any edited content to the host app.
+        // This template doesn't do anything, so we just echo the passed in items.
+        self.extensionContext!.completeRequest(returningItems: self.extensionContext!.inputItems, completionHandler: nil)
+    }
+
+}

+ 63 - 0
ios/send-ios-action-extension/Base.lproj/MainInterface.storyboard

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="ObA-dk-sSI">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Image-->
+        <scene sceneID="7MM-of-jgj">
+            <objects>
+                <viewController title="Image" id="ObA-dk-sSI" customClass="ActionViewController" customModule="send_ios_action_extension" customModuleProvider="target" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="zMn-AG-sqS">
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="528"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <navigationBar contentMode="scaleToFill" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="NOA-Dm-cuz">
+                                <rect key="frame" x="0.0" y="20" width="320" height="44"/>
+                                <items>
+                                    <navigationItem id="3HJ-uW-3hn">
+                                        <barButtonItem key="leftBarButtonItem" title="Done" style="done" id="WYi-yp-eM6">
+                                            <connections>
+                                                <action selector="done" destination="ObA-dk-sSI" id="Qdu-qn-U6V"/>
+                                            </connections>
+                                        </barButtonItem>
+                                    </navigationItem>
+                                </items>
+                            </navigationBar>
+                            <wkWebView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="evD-vF-hKQ">
+                                <rect key="frame" x="0.0" y="64" width="320" height="464"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <wkWebViewConfiguration key="configuration">
+                                    <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
+                                    <wkPreferences key="preferences"/>
+                                </wkWebViewConfiguration>
+                            </wkWebView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="VVe-Uw-JpX" firstAttribute="trailing" secondItem="NOA-Dm-cuz" secondAttribute="trailing" id="A05-Pj-hrr"/>
+                            <constraint firstItem="NOA-Dm-cuz" firstAttribute="leading" secondItem="VVe-Uw-JpX" secondAttribute="leading" id="HxO-8t-aoh"/>
+                            <constraint firstItem="NOA-Dm-cuz" firstAttribute="top" secondItem="VVe-Uw-JpX" secondAttribute="top" id="we0-1t-bgp"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="VVe-Uw-JpX"/>
+                    </view>
+                    <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+                    <size key="freeformSize" width="320" height="528"/>
+                    <connections>
+                        <outlet property="view" destination="zMn-AG-sqS" id="Qma-de-2ek"/>
+                        <outlet property="webView" destination="evD-vF-hKQ" id="DVP-CH-cJP"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="137.59999999999999" y="98.950524737631198"/>
+        </scene>
+    </scenes>
+</document>

+ 53 - 0
ios/send-ios-action-extension/Info.plist

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleDisplayName</key>
+	<string>send-ios-action-extension</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>XPC!</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>NSExtension</key>
+	<dict>
+		<key>NSExtensionAttributes</key>
+		<dict>
+			<key>NSExtensionActivationRule</key>
+			<string>SUBQUERY (
+            extensionItems,
+            $extensionItem,
+            SUBQUERY (
+            $extensionItem.attachments,
+            $attachment,
+            (
+            ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;com.adobe.pdf&quot;
+            || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.image&quot;
+            || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.plain-text&quot;
+            || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.png&quot;
+            || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.jpeg&quot;
+            || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.jpeg-2000&quot;
+            || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;com.compuserve.gif&quot;
+            || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;com.microsoft.bmp&quot;
+            )
+            ).@count == 1
+            ).@count == 1</string>
+		</dict>
+		<key>NSExtensionMainStoryboard</key>
+		<string>MainInterface</string>
+		<key>NSExtensionPointIdentifier</key>
+		<string>com.apple.ui-services</string>
+	</dict>
+</dict>
+</plist>

+ 526 - 0
ios/send-ios.xcodeproj/project.pbxproj

@@ -0,0 +1,526 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 50;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		E34149C621017A3A00930775 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E34149C521017A3A00930775 /* AppDelegate.swift */; };
+		E34149C821017A3A00930775 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E34149C721017A3A00930775 /* ViewController.swift */; };
+		E34149CB21017A3A00930775 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E34149C921017A3A00930775 /* Main.storyboard */; };
+		E34149CD21017A3D00930775 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E34149CC21017A3D00930775 /* Assets.xcassets */; };
+		E34149D021017A3D00930775 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E34149CE21017A3D00930775 /* LaunchScreen.storyboard */; };
+		E355478521028193009D206E /* help.html in Resources */ = {isa = PBXBuildFile; fileRef = E355478421028193009D206E /* help.html */; };
+		E355478921092E22009D206E /* assets in Resources */ = {isa = PBXBuildFile; fileRef = E355478821092E22009D206E /* assets */; };
+		E355478C210A534F009D206E /* ios.js in Resources */ = {isa = PBXBuildFile; fileRef = E355478B210A534F009D206E /* ios.js */; };
+		E355478E210A5357009D206E /* generate-bundle.js in Resources */ = {isa = PBXBuildFile; fileRef = E355478D210A5357009D206E /* generate-bundle.js */; };
+		E397A0B2210A641C00A978D4 /* ActionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E397A0B1210A641C00A978D4 /* ActionViewController.swift */; };
+		E397A0B5210A641C00A978D4 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E397A0B3210A641C00A978D4 /* MainInterface.storyboard */; };
+		E397A0B9210A641C00A978D4 /* send-ios-action-extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = E397A0AF210A641C00A978D4 /* send-ios-action-extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		E397A0BF210A6B5500A978D4 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = E397A0BE210A6B5500A978D4 /* assets */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		E397A0B7210A641C00A978D4 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = E34149BA21017A3900930775 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = E397A0AE210A641C00A978D4;
+			remoteInfo = "send-ios-action-extension";
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		E397A0BD210A641C00A978D4 /* Embed App Extensions */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 13;
+			files = (
+				E397A0B9210A641C00A978D4 /* send-ios-action-extension.appex in Embed App Extensions */,
+			);
+			name = "Embed App Extensions";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		E34149C221017A3900930775 /* send-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "send-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		E34149C521017A3A00930775 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+		E34149C721017A3A00930775 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
+		E34149CA21017A3A00930775 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		E34149CC21017A3D00930775 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		E34149CF21017A3D00930775 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		E34149D121017A3D00930775 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		E355478421028193009D206E /* help.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = help.html; sourceTree = "<group>"; };
+		E355478821092E22009D206E /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = assets; sourceTree = "<group>"; };
+		E355478B210A534F009D206E /* ios.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ios.js; sourceTree = SOURCE_ROOT; };
+		E355478D210A5357009D206E /* generate-bundle.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "generate-bundle.js"; sourceTree = SOURCE_ROOT; };
+		E397A0AF210A641C00A978D4 /* send-ios-action-extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "send-ios-action-extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
+		E397A0B1210A641C00A978D4 /* ActionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionViewController.swift; sourceTree = "<group>"; };
+		E397A0B4210A641C00A978D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
+		E397A0B6210A641C00A978D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		E397A0BE210A6B5500A978D4 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = "send-ios/assets"; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		E34149BF21017A3900930775 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		E397A0AC210A641C00A978D4 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		E34149B921017A3900930775 = {
+			isa = PBXGroup;
+			children = (
+				E34149C421017A3900930775 /* send-ios */,
+				E397A0B0210A641C00A978D4 /* send-ios-action-extension */,
+				E34149C321017A3900930775 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		E34149C321017A3900930775 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				E34149C221017A3900930775 /* send-ios.app */,
+				E397A0AF210A641C00A978D4 /* send-ios-action-extension.appex */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		E34149C421017A3900930775 /* send-ios */ = {
+			isa = PBXGroup;
+			children = (
+				E355478D210A5357009D206E /* generate-bundle.js */,
+				E355478B210A534F009D206E /* ios.js */,
+				E34149C521017A3A00930775 /* AppDelegate.swift */,
+				E34149C721017A3A00930775 /* ViewController.swift */,
+				E34149C921017A3A00930775 /* Main.storyboard */,
+				E34149CC21017A3D00930775 /* Assets.xcassets */,
+				E34149CE21017A3D00930775 /* LaunchScreen.storyboard */,
+				E34149D121017A3D00930775 /* Info.plist */,
+				E355478421028193009D206E /* help.html */,
+				E355478821092E22009D206E /* assets */,
+			);
+			path = "send-ios";
+			sourceTree = "<group>";
+		};
+		E397A0B0210A641C00A978D4 /* send-ios-action-extension */ = {
+			isa = PBXGroup;
+			children = (
+				E397A0BE210A6B5500A978D4 /* assets */,
+				E397A0B1210A641C00A978D4 /* ActionViewController.swift */,
+				E397A0B3210A641C00A978D4 /* MainInterface.storyboard */,
+				E397A0B6210A641C00A978D4 /* Info.plist */,
+			);
+			path = "send-ios-action-extension";
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		E34149C121017A3900930775 /* send-ios */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = E34149D421017A3D00930775 /* Build configuration list for PBXNativeTarget "send-ios" */;
+			buildPhases = (
+				E355478A210A4C43009D206E /* ShellScript */,
+				E34149BE21017A3900930775 /* Sources */,
+				E34149BF21017A3900930775 /* Frameworks */,
+				E34149C021017A3900930775 /* Resources */,
+				E397A0BD210A641C00A978D4 /* Embed App Extensions */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				E397A0B8210A641C00A978D4 /* PBXTargetDependency */,
+			);
+			name = "send-ios";
+			productName = "send-ios";
+			productReference = E34149C221017A3900930775 /* send-ios.app */;
+			productType = "com.apple.product-type.application";
+		};
+		E397A0AE210A641C00A978D4 /* send-ios-action-extension */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = E397A0BC210A641C00A978D4 /* Build configuration list for PBXNativeTarget "send-ios-action-extension" */;
+			buildPhases = (
+				E397A0AB210A641C00A978D4 /* Sources */,
+				E397A0AC210A641C00A978D4 /* Frameworks */,
+				E397A0AD210A641C00A978D4 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "send-ios-action-extension";
+			productName = "send-ios-action-extension";
+			productReference = E397A0AF210A641C00A978D4 /* send-ios-action-extension.appex */;
+			productType = "com.apple.product-type.app-extension";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		E34149BA21017A3900930775 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastSwiftUpdateCheck = 0940;
+				LastUpgradeCheck = 0940;
+				ORGANIZATIONNAME = "Donovan Preston";
+				TargetAttributes = {
+					E34149C121017A3900930775 = {
+						CreatedOnToolsVersion = 9.4.1;
+					};
+					E397A0AE210A641C00A978D4 = {
+						CreatedOnToolsVersion = 9.4.1;
+					};
+				};
+			};
+			buildConfigurationList = E34149BD21017A3900930775 /* Build configuration list for PBXProject "send-ios" */;
+			compatibilityVersion = "Xcode 9.3";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = E34149B921017A3900930775;
+			productRefGroup = E34149C321017A3900930775 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				E34149C121017A3900930775 /* send-ios */,
+				E397A0AE210A641C00A978D4 /* send-ios-action-extension */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		E34149C021017A3900930775 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				E355478C210A534F009D206E /* ios.js in Resources */,
+				E355478921092E22009D206E /* assets in Resources */,
+				E355478E210A5357009D206E /* generate-bundle.js in Resources */,
+				E34149D021017A3D00930775 /* LaunchScreen.storyboard in Resources */,
+				E355478521028193009D206E /* help.html in Resources */,
+				E34149CD21017A3D00930775 /* Assets.xcassets in Resources */,
+				E34149CB21017A3A00930775 /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		E397A0AD210A641C00A978D4 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				E397A0B5210A641C00A978D4 /* MainInterface.storyboard in Resources */,
+				E397A0BF210A6B5500A978D4 /* assets in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		E355478A210A4C43009D206E /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "node generate-bundle.js\n";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		E34149BE21017A3900930775 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				E34149C821017A3A00930775 /* ViewController.swift in Sources */,
+				E34149C621017A3A00930775 /* AppDelegate.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		E397A0AB210A641C00A978D4 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				E397A0B2210A641C00A978D4 /* ActionViewController.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		E397A0B8210A641C00A978D4 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = E397A0AE210A641C00A978D4 /* send-ios-action-extension */;
+			targetProxy = E397A0B7210A641C00A978D4 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		E34149C921017A3A00930775 /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				E34149CA21017A3A00930775 /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+		E34149CE21017A3D00930775 /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				E34149CF21017A3D00930775 /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+		E397A0B3210A641C00A978D4 /* MainInterface.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				E397A0B4210A641C00A978D4 /* Base */,
+			);
+			name = MainInterface.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		E34149D221017A3D00930775 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 11.4;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+			};
+			name = Debug;
+		};
+		E34149D321017A3D00930775 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 11.4;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SWIFT_COMPILATION_MODE = wholemodule;
+				SWIFT_OPTIMIZATION_LEVEL = "-O";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		E34149D521017A3D00930775 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_STYLE = Automatic;
+				INFOPLIST_FILE = "send-ios/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = "com.mozilla.send-ios";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_VERSION = 4.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		E34149D621017A3D00930775 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_STYLE = Automatic;
+				INFOPLIST_FILE = "send-ios/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = "com.mozilla.send-ios";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_VERSION = 4.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Release;
+		};
+		E397A0BA210A641C00A978D4 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				INFOPLIST_FILE = "send-ios-action-extension/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+					"@executable_path/../../Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = "com.mozilla.send-ios.send-ios-action-extension";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				SWIFT_VERSION = 4.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		E397A0BB210A641C00A978D4 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				INFOPLIST_FILE = "send-ios-action-extension/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+					"@executable_path/../../Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = "com.mozilla.send-ios.send-ios-action-extension";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				SWIFT_VERSION = 4.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		E34149BD21017A3900930775 /* Build configuration list for PBXProject "send-ios" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				E34149D221017A3D00930775 /* Debug */,
+				E34149D321017A3D00930775 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		E34149D421017A3D00930775 /* Build configuration list for PBXNativeTarget "send-ios" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				E34149D521017A3D00930775 /* Debug */,
+				E34149D621017A3D00930775 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		E397A0BC210A641C00A978D4 /* Build configuration list for PBXNativeTarget "send-ios-action-extension" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				E397A0BA210A641C00A978D4 /* Debug */,
+				E397A0BB210A641C00A978D4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = E34149BA21017A3900930775 /* Project object */;
+}

+ 7 - 0
ios/send-ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:send-ios.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
ios/send-ios.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

BIN
ios/send-ios.xcodeproj/project.xcworkspace/xcuserdata/donovan.xcuserdatad/UserInterfaceState.xcuserstate


Some files were not shown because too many files changed in this diff