mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-17 10:43:30 +01:00
[debug]: enabled back appropriate preprocessor debug blocks as before wherever applicable
This commit is contained in:
@@ -715,9 +715,10 @@ private extension AuthenticationOperation
|
||||
// If we're not using the same certificate used to install AltStore, warn user that they need to refresh.
|
||||
guard !provisioningProfile.certificates.contains(signer.certificate) else { return completionHandler(false) }
|
||||
|
||||
//#if DEBUG
|
||||
// #if DEBUG && targetEnvironment(simulator)
|
||||
// completionHandler(false)
|
||||
//#else
|
||||
// #else
|
||||
|
||||
DispatchQueue.main.async {
|
||||
let context = AuthenticatedOperationContext(context: self.context)
|
||||
context.operations.removeAllObjects() // Prevent deadlock due to endless waiting on previous operations to finish.
|
||||
@@ -733,7 +734,7 @@ private extension AuthenticationOperation
|
||||
completionHandler(false)
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,19 +134,21 @@ extension FetchProvisioningProfilesOperation
|
||||
// or if installedApp.team is nil but resignedBundleIdentifier contains the team's identifier.
|
||||
let teamsMatch = installedApp.team?.identifier == team.identifier || (installedApp.team == nil && installedApp.resignedBundleIdentifier.contains(team.identifier))
|
||||
|
||||
// #if DEBUG
|
||||
//
|
||||
// if app.isAltStoreApp
|
||||
// {
|
||||
// // Use legacy bundle ID format for AltStore.
|
||||
// preferredBundleID = teamsMatch ? installedApp.resignedBundleIdentifier : nil
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// preferredBundleID = teamsMatch ? installedApp.resignedBundleIdentifier : nil
|
||||
// }
|
||||
//
|
||||
// #else
|
||||
// TODO: @mahee96: Try to keep the debug build and release build operations similar, refactor later with proper reasoning
|
||||
// for now, restricted it to debug on simulator only
|
||||
#if DEBUG && targetEnvironment(simulator)
|
||||
|
||||
if app.isAltStoreApp
|
||||
{
|
||||
// Use legacy bundle ID format for AltStore.
|
||||
preferredBundleID = teamsMatch ? installedApp.resignedBundleIdentifier : nil
|
||||
}
|
||||
else
|
||||
{
|
||||
preferredBundleID = teamsMatch ? installedApp.resignedBundleIdentifier : nil
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
if teamsMatch
|
||||
{
|
||||
@@ -160,7 +162,7 @@ extension FetchProvisioningProfilesOperation
|
||||
preferredBundleID = nil
|
||||
}
|
||||
|
||||
// #endif
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -58,6 +58,7 @@ final class RemoveAppBackupOperation: ResultOperation<Void>
|
||||
}
|
||||
catch let error as CocoaError where error.code == CocoaError.Code.fileNoSuchFile
|
||||
{
|
||||
// TODO: @mahee96: Find out why should in debug builds the app-groups is not expected to match
|
||||
// #if DEBUG
|
||||
//
|
||||
// // When debugging, it's expected that app groups don't match, so ignore.
|
||||
|
||||
@@ -244,13 +244,14 @@ private extension ResignAppOperation
|
||||
{
|
||||
for case let fileURL as URL in enumerator
|
||||
{
|
||||
// #if DEBUG
|
||||
// guard !fileURL.lastPathComponent.lowercased().contains(".xctest") else {
|
||||
// // Remove embedded XCTest (+ dSYM) bundle from copied app bundle.
|
||||
// try FileManager.default.removeItem(at: fileURL)
|
||||
// continue
|
||||
// }
|
||||
// #endif
|
||||
// for both sim and device, in debug mode builds, remove the tests bundles (if any)
|
||||
#if DEBUG
|
||||
guard !fileURL.lastPathComponent.lowercased().contains(".xctest") else {
|
||||
// Remove embedded XCTest (+ dSYM) bundle from copied app bundle.
|
||||
try FileManager.default.removeItem(at: fileURL)
|
||||
continue
|
||||
}
|
||||
#endif
|
||||
|
||||
guard let appExtension = Bundle(url: fileURL) else { throw ALTError(.missingAppBundle) }
|
||||
try prepare(appExtension)
|
||||
|
||||
Reference in New Issue
Block a user