Skip to content

Commit

Permalink
cleaned up files
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Jul 15, 2020
1 parent d680ff6 commit 207e6b3
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 107 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
[submodule "packages/SpeculidKit"]
path = packages/SpeculidKit
url = https://github.com/brightdigit/SpeculidKit.git
branch = release/v3.0.0-alpha.1
branch = release/3.0.0-alpha.2
8 changes: 0 additions & 8 deletions Speculid.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
B34B6BBF24BDEF2B00F4EE6B /* CairoSVG.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B37B472124B93CB900AE2021 /* CairoSVG.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B34B6BC224BE354D00F4EE6B /* BookmarkURLCollectionObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34B6BC124BE354D00F4EE6B /* BookmarkURLCollectionObject.swift */; };
B3796B7C2432C50100E5F5F9 /* speculid in CopyFiles */ = {isa = PBXBuildFile; fileRef = B3DB4824243166FC00B1DA4F /* speculid */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
B3B6A4CF24B15292009C6E32 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B364624224B14DBB0089382E /* ContentView.swift */; };
B3B6A4D024B15292009C6E32 /* doc_appDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = B364624024B14DBB0089382E /* doc_appDocument.swift */; };
B3B6A4D124B15292009C6E32 /* doc_appApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B364623E24B14DBB0089382E /* doc_appApp.swift */; };
B3DB48142431642600B1DA4F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B3DB48132431642600B1DA4F /* Assets.xcassets */; };
B3DB48172431642600B1DA4F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B3DB48162431642600B1DA4F /* Preview Assets.xcassets */; };
Expand Down Expand Up @@ -71,8 +69,6 @@
B347128A24B668DE001CCCFD /* ClassicView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassicView.swift; sourceTree = "<group>"; };
B34B6BC124BE354D00F4EE6B /* BookmarkURLCollectionObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkURLCollectionObject.swift; sourceTree = "<group>"; };
B364623E24B14DBB0089382E /* doc_appApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = doc_appApp.swift; sourceTree = "<group>"; };
B364624024B14DBB0089382E /* doc_appDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = doc_appDocument.swift; sourceTree = "<group>"; };
B364624224B14DBB0089382E /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ContentView.swift; path = "../doc-app/ContentView.swift"; sourceTree = "<group>"; };
B3796B792432B7FF00E5F5F9 /* Command.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Command.entitlements; sourceTree = "<group>"; };
B37A52372435014400FEA6E9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B37B472124B93CB900AE2021 /* CairoSVG.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CairoSVG.xcframework; path = packages/SpeculidKit/packages/CairoSVG/build/CairoSVG.xcframework; sourceTree = "<group>"; };
Expand Down Expand Up @@ -158,8 +154,6 @@
isa = PBXGroup;
children = (
B364623E24B14DBB0089382E /* doc_appApp.swift */,
B364624024B14DBB0089382E /* doc_appDocument.swift */,
B364624224B14DBB0089382E /* ContentView.swift */,
B3DB480E2431642100B1DA4F /* ContentView.swift */,
B3DB48132431642600B1DA4F /* Assets.xcassets */,
B3DB48182431642600B1DA4F /* Main.storyboard */,
Expand Down Expand Up @@ -282,8 +276,6 @@
B347128B24B668DE001CCCFD /* ClassicView.swift in Sources */,
B347128924B64968001CCCFD /* ClassicDocument.swift in Sources */,
B3B6A4D124B15292009C6E32 /* doc_appApp.swift in Sources */,
B3B6A4CF24B15292009C6E32 /* ContentView.swift in Sources */,
B3B6A4D024B15292009C6E32 /* doc_appDocument.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
13 changes: 13 additions & 0 deletions Speculid/BookmarkURLCollectionObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
//

import Foundation

extension UserDefaults {

@objc
var bookmarks : [String : Data]? {
get {
self.dictionary(forKey: "bookmarks") as? [String : Data]
}
set {
self.set(newValue, forKey: "bookmarks")
}
}
}
public class BookmarkURLCollectionObject : ObservableObject {

//@AppStorage("bookmarks", store: UserDefaults(suiteName: "MLT7M394S7.group.com.brightdigit.Speculid"))
Expand Down
19 changes: 1 addition & 18 deletions Speculid/ClassicView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@
import SwiftUI
import SpeculidKit

extension UserDefaults {

@objc
var bookmarks : [String : Data]? {
get {
self.dictionary(forKey: "bookmarks") as? [String : Data]
}
set {
self.set(newValue, forKey: "bookmarks")
}
}
}



Expand All @@ -30,7 +18,6 @@ struct ClassicView: View {
@Binding var document: ClassicDocument
@EnvironmentObject var bookmarkCollection : BookmarkURLCollectionObject
@Environment(\.importFiles) var importFiles
@Environment(\.exportFiles) var exportFiles

var canBuild : Bool {
return url != nil &&
Expand Down Expand Up @@ -67,10 +54,6 @@ struct ClassicView: View {
guard case let .success(url) = result else {
return
}
//let url = jsonURL.deletingLastPathComponent()

debugPrint(url.path)
debugPrint(self.url?.deletingLastPathComponent().appendingPathComponent(self.document.document.assetDirectoryRelativePath).path)
guard url.path == self.url?.deletingLastPathComponent().appendingPathComponent(self.document.document.assetDirectoryRelativePath).path else {
return
}
Expand Down Expand Up @@ -136,6 +119,6 @@ struct ClassicView: View {

struct ClassicView_Previews: PreviewProvider {
static var previews: some View {
ClassicView(url: nil, document: .constant(ClassicDocument()))
ClassicView(url: nil, document: .constant(ClassicDocument())).environmentObject(BookmarkURLCollectionObject())
}
}
8 changes: 4 additions & 4 deletions Speculid/doc_appApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ struct doc_appApp: App {
@StateObject private var bookmarkCollection = BookmarkURLCollectionObject()

@SceneBuilder var body: some Scene {

DocumentGroup(newDocument: doc_appDocument()) { file in
ContentView(document: file.$document)
}
//
// DocumentGroup(newDocument: doc_appDocument()) { file in
// ContentView(document: file.$document)
// }
DocumentGroup(viewing: ClassicDocument.self) { (file) in

return ClassicView(url: file.fileURL, document: file.$document).environmentObject(bookmarkCollection)
Expand Down
48 changes: 0 additions & 48 deletions Speculid/doc_appDocument.swift

This file was deleted.

27 changes: 0 additions & 27 deletions doc-app/ContentView.swift

This file was deleted.

2 changes: 1 addition & 1 deletion packages/SpeculidKit

0 comments on commit 207e6b3

Please sign in to comment.