Abstracted bundle prefix

This commit is contained in:
Maxwell Swadling
2023-03-12 15:01:45 +10:00
parent 12a8f1698b
commit 1bd724c8bf
15 changed files with 100 additions and 33 deletions

View File

@@ -25,7 +25,7 @@ struct Secretive: App {
WindowGroup {
ContentView<Updater, AgentStatusChecker>(showingCreation: $showingCreation, runningSetup: $showingSetup, hasRunSetup: $hasRunSetup)
.environmentObject(storeList)
.environmentObject(Updater(checkOnLaunch: hasRunSetup))
.environmentObject(Updater(checkOnLaunch: hasRunSetup, bundlePrefix: BundlePrefix))
.environmentObject(agentStatusChecker)
.onAppear {
if !hasRunSetup {

View File

@@ -28,7 +28,7 @@ class JustUpdatedChecker: ObservableObject, JustUpdatedCheckerProtocol {
extension JustUpdatedChecker {
enum Constants {
static let previousVersionUserDefaultsKey = "com.maxgoedjen.Secretive.lastBuild"
static let previousVersionUserDefaultsKey = BundlePrefix + ".lastBuild"
}
}

View File

@@ -0,0 +1,7 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import <Foundation/Foundation.h>
extern NSString *const BundlePrefix;

View File

@@ -12,7 +12,7 @@
<true/>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.maxgoedjen.Secretive</string>
<string>$(AppIdentifierPrefix)$(BUNDLE_PREFIX)</string>
</array>
</dict>
</plist>