-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure disabling iCloud store works
- Loading branch information
Showing
6 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// BuildEnvironment.swift | ||
// OakOTP | ||
// | ||
// Created by Alex Catchpole on 15/09/2022. | ||
// | ||
|
||
import Foundation | ||
import Resolver | ||
|
||
enum BuildEnvironment: String { // 1 | ||
case debugDevelopment = "Debug Development" | ||
case debugProduction = "Debug Production" | ||
|
||
case releaseProduction = "Release Production" | ||
case releaseDevelopment = "Release Development" | ||
} | ||
|
||
class BuildConfiguration { // 2 | ||
var environment: BuildEnvironment | ||
|
||
var ICloudContainerName: String { | ||
switch environment { | ||
case .debugProduction, .debugDevelopment: | ||
return "iCloud.sh.catch.oakdebug.icloud" | ||
case .releaseDevelopment, .releaseProduction: | ||
return "iCloud.sh.catch.oak.icloud" | ||
} | ||
} | ||
|
||
init() { | ||
let currentConfiguration = Bundle.main.object(forInfoDictionaryKey: "Configuration") as! String | ||
environment = BuildEnvironment(rawValue: currentConfiguration)! | ||
} | ||
} | ||
|
||
extension Resolver { | ||
static func RegisterBuildConfigurationUtil() { | ||
register { BuildConfiguration() }.scope(.application) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters