mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-22 16:42:09 +00:00
Skip backup repository on simulator (#1048)
ProfileManager is behaving crazy because on simulator local and backup repository point to the same container.
This commit is contained in:
parent
edb7c29b26
commit
24ddb270aa
@ -182,7 +182,7 @@ private extension CoreDataRepository {
|
|||||||
|
|
||||||
let newController = NSFetchedResultsController(
|
let newController = NSFetchedResultsController(
|
||||||
fetchRequest: request,
|
fetchRequest: request,
|
||||||
managedObjectContext: self.context,
|
managedObjectContext: context,
|
||||||
sectionNameKeyPath: nil,
|
sectionNameKeyPath: nil,
|
||||||
cacheName: nil
|
cacheName: nil
|
||||||
)
|
)
|
||||||
|
@ -90,6 +90,7 @@ extension AppContext {
|
|||||||
model: cdRemoteModel,
|
model: cdRemoteModel,
|
||||||
observingResults: true
|
observingResults: true
|
||||||
)
|
)
|
||||||
|
let backupProfileRepository: ProfileRepository? = nil
|
||||||
#else
|
#else
|
||||||
let tunnelStrategy = NETunnelStrategy(
|
let tunnelStrategy = NETunnelStrategy(
|
||||||
bundleIdentifier: BundleConfiguration.mainString(for: .tunnelId),
|
bundleIdentifier: BundleConfiguration.mainString(for: .tunnelId),
|
||||||
@ -99,15 +100,16 @@ extension AppContext {
|
|||||||
let mainProfileRepository = NEProfileRepository(repository: tunnelStrategy) {
|
let mainProfileRepository = NEProfileRepository(repository: tunnelStrategy) {
|
||||||
dependencies.profileTitle($0)
|
dependencies.profileTitle($0)
|
||||||
}
|
}
|
||||||
|
let backupProfileRepository = dependencies.backupProfileRepository(
|
||||||
|
model: cdRemoteModel,
|
||||||
|
observingResults: false
|
||||||
|
)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
let profileManager = ProfileManager(
|
let profileManager = ProfileManager(
|
||||||
processor: processor,
|
processor: processor,
|
||||||
repository: mainProfileRepository,
|
repository: mainProfileRepository,
|
||||||
backupRepository: dependencies.backupProfileRepository(
|
backupRepository: backupProfileRepository,
|
||||||
model: cdRemoteModel,
|
|
||||||
observingResults: false
|
|
||||||
),
|
|
||||||
mirrorsRemoteRepository: dependencies.mirrorsRemoteRepository,
|
mirrorsRemoteRepository: dependencies.mirrorsRemoteRepository,
|
||||||
readyAfterRemote: true
|
readyAfterRemote: true
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user