Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional setting to encrypt data locally at the cost of performance #17

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pods/*
593 changes: 566 additions & 27 deletions Cyte.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
}
},
{
"identity" : "sqlite.swift",
"identity" : "rncryptor",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stephencelis/SQLite.swift.git",
"location" : "https://github.com/RNCryptor/RNCryptor",
"state" : {
"revision" : "7a2e3cd27de56f6d396e84f63beefd0267b55ccb",
"version" : "0.14.1"
"revision" : "5e3bbf44f08bf90049537cb8902d8f4fa911a79a",
"version" : "5.1.0"
}
},
{
Expand Down
80 changes: 80 additions & 0 deletions Cyte.xcodeproj/xcshareddata/xcschemes/Cyte for iPhone.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3F6D2F2429F0F91F00F3472D"
BuildableName = "Cyte for iPhone.app"
BlueprintName = "Cyte for iPhone"
ReferencedContainer = "container:Cyte.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<PathRunnable
runnableDebuggingMode = "0"
FilePath = "/Users/shaunnarayan/Library/Developer/Xcode/DerivedData/Cyte-gichcmznpebydxbuuacjxpmkfhfe/Build/Products/Release-iphoneos/Cyte for iPhone.app">
</PathRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3F6D2F2429F0F91F00F3472D"
BuildableName = "Cyte for iPhone.app"
BlueprintName = "Cyte for iPhone"
ReferencedContainer = "container:Cyte.xcodeproj">
</BuildableReference>
</MacroExpansion>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3F6D2F2429F0F91F00F3472D"
BuildableName = "Cyte for iPhone.app"
BlueprintName = "Cyte for iPhone"
ReferencedContainer = "container:Cyte.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
3 changes: 1 addition & 2 deletions Cyte.xcodeproj/xcshareddata/xcschemes/Cyte.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
allowLocationSimulation = "YES">
<PathRunnable
runnableDebuggingMode = "0"
BundleIdentifier = "io.cyte.ios"
FilePath = "/Users/shaunnarayan/Library/Developer/Xcode/DerivedData/Cyte-fjxvxtltqxyzepgiohehfcpringt/Build/Products/Release-iphoneos/Cyte.app">
FilePath = "/Users/shaunnarayan/Library/Developer/Xcode/DerivedData/Cyte-gichcmznpebydxbuuacjxpmkfhfe/Build/Products/Release/Cyte.app">
</PathRunnable>
<MacroExpansion>
<BuildableReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>Cyte for iPhone.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>Cyte.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
Expand All @@ -12,7 +17,7 @@
<key>CyteExtension.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
<integer>2</integer>
</dict>
<key>Graph (Playground) 1.xcscheme</key>
<dict>
Expand Down Expand Up @@ -106,6 +111,11 @@
<key>primary</key>
<true/>
</dict>
<key>3F6D2F2429F0F91F00F3472D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>3FB92FAB29EB07580048CDAF</key>
<dict>
<key>primary</key>
Expand Down
10 changes: 10 additions & 0 deletions Cyte.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Cyte.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "9A3C2354-2784-48E0-91A8-D05020636BEA"
type = "0"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?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>SchemeUserState</key>
<dict>
<key>SQLite (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>6</integer>
</dict>
<key>SQLite (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>SQLite (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
</dict>
</dict>
</dict>
</plist>
10 changes: 3 additions & 7 deletions Cyte/CyteApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@

import SwiftUI
import XCGLogger
import CoreData

#if os(macOS)
import AXSwift
#endif

@main
struct CyteApp: App {
let persistenceController = PersistenceController.shared
let bundleCache = BundleCache()
let episodeModel = EpisodeModel()
#if os(macOS)
Expand All @@ -32,6 +30,7 @@ struct CyteApp: App {
/// On every run, starts the recorder and sets up hotkey listeners
///
func setup() {
Memory.shared.migrate()
let defaults = UserDefaults(suiteName: "group.io.cyte.ios")!
appDelegate.mainApp = self
#if os(macOS)
Expand All @@ -50,11 +49,9 @@ struct CyteApp: App {
Task {
// offset from other startup work
try await Task.sleep(nanoseconds: 8_000_000_000)
let bundleFetch : NSFetchRequest<BundleExclusion> = BundleExclusion.fetchRequest()
do {
let fetched = try PersistenceController.shared.container.viewContext.fetch(bundleFetch)
for bundle in fetched {
let _ = bundleCache.getIcon(bundleID: bundle.bundle!)
for bundle in try CyteBundleExclusion.list() {
let _ = bundleCache.getIcon(bundleID: bundle.bundle)
}
} catch { }
}
Expand Down Expand Up @@ -85,7 +82,6 @@ struct CyteApp: App {
var body: some Scene {
WindowGroup(id: "cyte-app") {
ContentView()
.environment(\.managedObjectContext, persistenceController.container.viewContext)
.environmentObject(bundleCache)
.environmentObject(episodeModel)
.onAppear {
Expand Down
Loading