Skip to content

Commit

Permalink
Revert recent commits (#15)
Browse files Browse the repository at this point in the history
* Revert "Added Open Screen with support for persistent storage of models (#13)"

This reverts commit 09cebfc.

* Revert "Added support for changing model (#12)"

This reverts commit e5a028b.
  • Loading branch information
Elliot Boschwitz authored Dec 3, 2020
1 parent 09cebfc commit a24e335
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 532 deletions.
86 changes: 14 additions & 72 deletions Lobe_iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,10 @@
76ED73F5248988AE003B4F6B /* UpdateTextViewExternal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76ED73F4248988AE003B4F6B /* UpdateTextViewExternal.swift */; };
9B7B03EB2475DBF300D34020 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B03EA2475DBF300D34020 /* AppDelegate.swift */; };
9B7B03ED2475DBF300D34020 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B03EC2475DBF300D34020 /* SceneDelegate.swift */; };
9B7B03EF2475DBF300D34020 /* PlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B03EE2475DBF300D34020 /* PlayView.swift */; };
9B7B03EF2475DBF300D34020 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B03EE2475DBF300D34020 /* ContentView.swift */; };
9B7B03F12475DBF600D34020 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9B7B03F02475DBF600D34020 /* Assets.xcassets */; };
9B7B03F42475DBF600D34020 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9B7B03F32475DBF600D34020 /* Preview Assets.xcassets */; };
9B7B03F72475DBF600D34020 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9B7B03F52475DBF600D34020 /* LaunchScreen.storyboard */; };
B53C73762533C150007A0231 /* Project.swift in Sources */ = {isa = PBXBuildFile; fileRef = B53C73752533C150007A0231 /* Project.swift */; };
B55A1EC72572C8FD003EE8AD /* StorageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B55A1EC62572C8FD003EE8AD /* StorageProvider.swift */; };
B58A180C254FC4BE00AD32C1 /* ProjectPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = B58A180B254FC4BE00AD32C1 /* ProjectPicker.swift */; };
B5A4C5FF256B7E0E0092DDD8 /* OpenScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A4C5FE256B7E0E0092DDD8 /* OpenScreen.swift */; };
B5A4C603256B96BF0092DDD8 /* ProjectRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A4C602256B96BF0092DDD8 /* ProjectRow.swift */; };
B5A9B5272557373E00FD595B /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A9B5262557373E00FD595B /* CloudKit.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -33,26 +27,18 @@
9B7B03E72475DBF300D34020 /* Lobe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Lobe.app; sourceTree = BUILT_PRODUCTS_DIR; };
9B7B03EA2475DBF300D34020 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
9B7B03EC2475DBF300D34020 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
9B7B03EE2475DBF300D34020 /* PlayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayView.swift; sourceTree = "<group>"; };
9B7B03EE2475DBF300D34020 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
9B7B03F02475DBF600D34020 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9B7B03F32475DBF600D34020 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
9B7B03F62475DBF600D34020 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
9B7B03F82475DBF600D34020 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B53C73752533C150007A0231 /* Project.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Project.swift; sourceTree = "<group>"; };
B55A1EC62572C8FD003EE8AD /* StorageProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageProvider.swift; sourceTree = "<group>"; };
B58A180B254FC4BE00AD32C1 /* ProjectPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProjectPicker.swift; sourceTree = "<group>"; };
B5A4C5FE256B7E0E0092DDD8 /* OpenScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenScreen.swift; sourceTree = "<group>"; };
B5A4C602256B96BF0092DDD8 /* ProjectRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProjectRow.swift; sourceTree = "<group>"; };
B5A9B5232557372800FD595B /* Lobe.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Lobe.entitlements; sourceTree = "<group>"; };
B5A9B5262557373E00FD595B /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
9B7B03E42475DBF300D34020 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B5A9B5272557373E00FD595B /* CloudKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -64,7 +50,6 @@
children = (
9B7B03E92475DBF300D34020 /* Lobe_iOS */,
9B7B03E82475DBF300D34020 /* Products */,
B5A9B5252557373E00FD595B /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -79,15 +64,14 @@
9B7B03E92475DBF300D34020 /* Lobe_iOS */ = {
isa = PBXGroup;
children = (
B5A4C601256B961D0092DDD8 /* OpenScreen */,
B58D97E6256F9B890050E2CD /* PlayView */,
B53C73752533C150007A0231 /* Project.swift */,
B55A1EC62572C8FD003EE8AD /* StorageProvider.swift */,
B5A9B5232557372800FD595B /* Lobe.entitlements */,
9B7B03EA2475DBF300D34020 /* AppDelegate.swift */,
9B7B03F52475DBF600D34020 /* LaunchScreen.storyboard */,
9B7B03EC2475DBF300D34020 /* SceneDelegate.swift */,
9B7B03EE2475DBF300D34020 /* ContentView.swift */,
76ED73F4248988AE003B4F6B /* UpdateTextViewExternal.swift */,
76ED73F2248987E3003B4F6B /* MyViewController.swift */,
76CDE1A3247F2E6D0096E882 /* ImagePicker.swift */,
9B7B03F02475DBF600D34020 /* Assets.xcassets */,
9B7B03F52475DBF600D34020 /* LaunchScreen.storyboard */,
76A9AF53247F138B002086F7 /* LobeModel.mlmodel */,
9B7B03F82475DBF600D34020 /* Info.plist */,
9B7B03F22475DBF600D34020 /* Preview Content */,
Expand All @@ -103,35 +87,6 @@
path = "Preview Content";
sourceTree = "<group>";
};
B58D97E6256F9B890050E2CD /* PlayView */ = {
isa = PBXGroup;
children = (
9B7B03EE2475DBF300D34020 /* PlayView.swift */,
76ED73F4248988AE003B4F6B /* UpdateTextViewExternal.swift */,
76ED73F2248987E3003B4F6B /* MyViewController.swift */,
76CDE1A3247F2E6D0096E882 /* ImagePicker.swift */,
);
path = PlayView;
sourceTree = "<group>";
};
B5A4C601256B961D0092DDD8 /* OpenScreen */ = {
isa = PBXGroup;
children = (
B5A4C5FE256B7E0E0092DDD8 /* OpenScreen.swift */,
B5A4C602256B96BF0092DDD8 /* ProjectRow.swift */,
B58A180B254FC4BE00AD32C1 /* ProjectPicker.swift */,
);
path = OpenScreen;
sourceTree = "<group>";
};
B5A9B5252557373E00FD595B /* Frameworks */ = {
isa = PBXGroup;
children = (
B5A9B5262557373E00FD595B /* CloudKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -159,8 +114,8 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1140;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = Microsoft;
LastUpgradeCheck = 1140;
ORGANIZATIONNAME = "Adam Menges";
TargetAttributes = {
9B7B03E62475DBF300D34020 = {
CreatedOnToolsVersion = 11.4.1;
Expand Down Expand Up @@ -207,14 +162,9 @@
9B7B03EB2475DBF300D34020 /* AppDelegate.swift in Sources */,
76CDE1A4247F2E6D0096E882 /* ImagePicker.swift in Sources */,
9B7B03ED2475DBF300D34020 /* SceneDelegate.swift in Sources */,
B55A1EC72572C8FD003EE8AD /* StorageProvider.swift in Sources */,
76ED73F5248988AE003B4F6B /* UpdateTextViewExternal.swift in Sources */,
B5A4C603256B96BF0092DDD8 /* ProjectRow.swift in Sources */,
76ED73F3248987E3003B4F6B /* MyViewController.swift in Sources */,
B58A180C254FC4BE00AD32C1 /* ProjectPicker.swift in Sources */,
B5A4C5FF256B7E0E0092DDD8 /* OpenScreen.swift in Sources */,
9B7B03EF2475DBF300D34020 /* PlayView.swift in Sources */,
B53C73762533C150007A0231 /* Project.swift in Sources */,
9B7B03EF2475DBF300D34020 /* ContentView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -258,7 +208,6 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -319,7 +268,6 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -352,20 +300,17 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Lobe_iOS/Lobe.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"Lobe_iOS/Preview Content\"";
DEVELOPMENT_TEAM = UBF8T346G9;
DEVELOPMENT_TEAM = NGV85M44ZU;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Lobe_iOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.lobe;
PRODUCT_BUNDLE_IDENTIFIER = "adammenges.Lobe-iOS";
PRODUCT_NAME = Lobe;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -375,20 +320,17 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Lobe_iOS/Lobe.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"Lobe_iOS/Preview Content\"";
DEVELOPMENT_TEAM = UBF8T346G9;
DEVELOPMENT_TEAM = NGV85M44ZU;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Lobe_iOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.lobe;
PRODUCT_BUNDLE_IDENTIFIER = "adammenges.Lobe-iOS";
PRODUCT_NAME = Lobe;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down
8 changes: 0 additions & 8 deletions Lobe_iOS/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
//
// AppDelegate.swift
// Lobe_iOS
//
// Created by Adam Menges on 5/20/20.
// Copyright © 2020 Microsoft. All rights reserved.
//

import UIKit

@UIApplicationMain
Expand Down
36 changes: 8 additions & 28 deletions Lobe_iOS/PlayView/PlayView.swift → Lobe_iOS/ContentView.swift
Original file line number Diff line number Diff line change
@@ -1,40 +1,20 @@
//
// PlayView.swift
// Lobe_iOS
//
// Created by Adam Menges on 5/20/20.
// Copyright © 2020 Microsoft. All rights reserved.
//

import SwiftUI
import AVKit
import Vision

var useCamera: Bool = true

struct PlayView: View {
struct ContentView: View {

@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
var controller: MyViewController = MyViewController()
@State var showImagePicker: Bool = false
@State private var image: UIImage?
@State var scaling: CGSize = .init(width: 1, height: 1)
@State private var offset = CGSize.zero
var project: Project?

/// Button for return back to open screen
var openScreenButton : some View {
Button(action: {
self.presentationMode.wrappedValue.dismiss()
}) {
Image(systemName: "square.fill.on.square.fill")
.scaleEffect(1.5)
.padding()
}
}

var body: some View {

GeometryReader { geometry in

VStack {
if (self.image != nil) {
/* Placeholder for displaying an image from the photo library. */
Expand Down Expand Up @@ -63,7 +43,7 @@ struct PlayView: View {
.opacity(1 / self.scaling.height < 1 ? 0.5: 1)
} else {
/* Background camera. */
MyRepresentable(controller: self.controller, project: project)
MyRepresentable(controller: self.controller)
/* Gesture for swiping up the photo library. */
.gesture(
DragGesture()
Expand Down Expand Up @@ -98,7 +78,7 @@ struct PlayView: View {

VStack {
Spacer()
UpdateTextViewExternal(viewModel: self.controller, projectName: project?.name)
UpdateTextViewExternal(viewModel: self.controller)
HStack {

/* Button for openning the photo library. */
Expand Down Expand Up @@ -140,11 +120,11 @@ struct PlayView: View {
.edgesIgnoringSafeArea(.all)
.offset(x: 0, y: self.showImagePicker ? 0: UIApplication.shared.keyWindow?.frame.height ?? 0)
}.statusBar(hidden: true)
.navigationBarBackButtonHidden(true)
.navigationBarItems(leading: openScreenButton)
}

}


/* Gadget to build colors from Hashtag Color Code Hex. */
extension UIColor {
convenience init(red: Int, green: Int, blue: Int) {
Expand All @@ -167,6 +147,6 @@ extension UIColor {

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
PlayView(project: Project(name: "Test"))
ContentView()
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
//
// ImagePicker.swift
// Lobe_iOS
//
// Created by Kathy Zhou on 5/27/20.
// Copyright © 2020 Microsoft. All rights reserved.
//


import Foundation
import SwiftUI

Expand Down
21 changes: 8 additions & 13 deletions Lobe_iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIAppFonts</key>
<array>
<string>labgrotesque-bold.ttf</string>
</array>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>To save screenshot</string>
<key>NSCameraUsageDescription</key>
<string>This app needs to access the camera</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand All @@ -20,19 +28,6 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>This app needs to access the camera</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>To save screenshot</string>
<key>UIAppFonts</key>
<array>
<string>labgrotesque-bold.ttf</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
16 changes: 0 additions & 16 deletions Lobe_iOS/Lobe.entitlements

This file was deleted.

Loading

0 comments on commit a24e335

Please sign in to comment.