Skip to content

Commit 6c64575

Browse files
authored
Merge pull request #78 from IBM/dev
Version 1.4.1 Build 218
2 parents d55c0af + 3487bd8 commit 6c64575

15 files changed

Lines changed: 455 additions & 312 deletions

.sonarcloud.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Project Version to be used as Code Definition
2-
sonar.projectVersion=1.4.0.216
2+
sonar.projectVersion=1.4.1.217
33
# Folders excluded from the scan
44
sonar.exclusions=**/migratorTests/**,**/migratorUITests/**

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ disabled_rules:
77
- trailing_whitespace
88
- colon
99
- function_body_length
10+
- type_body_length

migrator.xcodeproj/project.pbxproj

Lines changed: 14 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
1B4C5BB62B035EBA00D4BD0B /* ServerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C5BB52B035EBA00D4BD0B /* ServerView.swift */; };
2020
1B4C5BB82B035EBD00D4BD0B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C5BB72B035EBD00D4BD0B /* Assets.xcassets */; };
2121
1B4C5BBB2B035EBD00D4BD0B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C5BBA2B035EBD00D4BD0B /* Preview Assets.xcassets */; };
22-
1B4C5BC62B035EBD00D4BD0B /* MigratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C5BC52B035EBD00D4BD0B /* MigratorTests.swift */; };
23-
1B4C5BD02B035EBD00D4BD0B /* MigratorUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C5BCF2B035EBD00D4BD0B /* MigratorUITests.swift */; };
24-
1B4C5BD22B035EBD00D4BD0B /* MigratorUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C5BD12B035EBD00D4BD0B /* MigratorUITestsLaunchTests.swift */; };
22+
1B4C5BC62B035EBD00D4BD0B /* ProfileConfigTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C5BC52B035EBD00D4BD0B /* ProfileConfigTests.swift */; };
2523
1B4C5BE12B0375C700D4BD0B /* Scene-Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C5BE02B0375C700D4BD0B /* Scene-Extension.swift */; };
2624
1B4C5BE52B03B80300D4BD0B /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C5BE42B03B80300D4BD0B /* Utils.swift */; };
2725
1B4C5BE72B03B82B00D4BD0B /* NetworkServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C5BE62B03B82B00D4BD0B /* NetworkServer.swift */; };
@@ -39,6 +37,7 @@
3937
53237C132CA9E297004062CC /* DuplicateFilesHandlingPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53237C122CA9E295004062CC /* DuplicateFilesHandlingPolicy.swift */; };
4038
532F90B62C64FFE5002E270F /* WindowAccessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 532F90B52C64FFE5002E270F /* WindowAccessor.swift */; };
4139
532F90B82C650014002E270F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 532F90B72C650014002E270F /* AppDelegate.swift */; };
40+
533EF2C62F6ADF3B00DA2DCD /* DebugHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 533EF2C52F6ADF3700DA2DCD /* DebugHelpers.swift */; };
4241
534A99712EBAB0A500F3E24A /* CustomizableIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 534A99702EBAB0A500F3E24A /* CustomizableIconView.swift */; };
4342
534A99732EC25E9400F3E24A /* CardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 534A99722EC25E8E00F3E24A /* CardButton.swift */; };
4443
5350A7DB2F20FCF600D04A33 /* DiscoveredApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5350A7DA2F20FCF600D04A33 /* DiscoveredApplication.swift */; };
@@ -113,13 +112,6 @@
113112
remoteGlobalIDString = 1B4C5BAF2B035EBA00D4BD0B;
114113
remoteInfo = migrator;
115114
};
116-
1B4C5BCC2B035EBD00D4BD0B /* PBXContainerItemProxy */ = {
117-
isa = PBXContainerItemProxy;
118-
containerPortal = 1B4C5BA82B035EBA00D4BD0B /* Project object */;
119-
proxyType = 1;
120-
remoteGlobalIDString = 1B4C5BAF2B035EBA00D4BD0B;
121-
remoteInfo = migrator;
122-
};
123115
/* End PBXContainerItemProxy section */
124116

125117
/* Begin PBXFileReference section */
@@ -138,10 +130,7 @@
138130
1B4C5BBA2B035EBD00D4BD0B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
139131
1B4C5BBC2B035EBD00D4BD0B /* migrator.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = migrator.entitlements; sourceTree = "<group>"; };
140132
1B4C5BC12B035EBD00D4BD0B /* migratorTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = migratorTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
141-
1B4C5BC52B035EBD00D4BD0B /* MigratorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigratorTests.swift; sourceTree = "<group>"; };
142-
1B4C5BCB2B035EBD00D4BD0B /* migratorUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = migratorUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
143-
1B4C5BCF2B035EBD00D4BD0B /* MigratorUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigratorUITests.swift; sourceTree = "<group>"; };
144-
1B4C5BD12B035EBD00D4BD0B /* MigratorUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MigratorUITestsLaunchTests.swift; sourceTree = "<group>"; };
133+
1B4C5BC52B035EBD00D4BD0B /* ProfileConfigTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileConfigTests.swift; sourceTree = "<group>"; };
145134
1B4C5BE02B0375C700D4BD0B /* Scene-Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Scene-Extension.swift"; sourceTree = "<group>"; };
146135
1B4C5BE32B03B6FE00D4BD0B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
147136
1B4C5BE42B03B80300D4BD0B /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
@@ -160,6 +149,7 @@
160149
53237C122CA9E295004062CC /* DuplicateFilesHandlingPolicy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DuplicateFilesHandlingPolicy.swift; sourceTree = "<group>"; };
161150
532F90B52C64FFE5002E270F /* WindowAccessor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowAccessor.swift; sourceTree = "<group>"; };
162151
532F90B72C650014002E270F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
152+
533EF2C52F6ADF3700DA2DCD /* DebugHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugHelpers.swift; sourceTree = "<group>"; };
163153
534A99702EBAB0A500F3E24A /* CustomizableIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomizableIconView.swift; sourceTree = "<group>"; };
164154
534A99722EC25E8E00F3E24A /* CardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardButton.swift; sourceTree = "<group>"; };
165155
5350A7DA2F20FCF600D04A33 /* DiscoveredApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscoveredApplication.swift; sourceTree = "<group>"; };
@@ -249,13 +239,6 @@
249239
);
250240
runOnlyForDeploymentPostprocessing = 0;
251241
};
252-
1B4C5BC82B035EBD00D4BD0B /* Frameworks */ = {
253-
isa = PBXFrameworksBuildPhase;
254-
buildActionMask = 2147483647;
255-
files = (
256-
);
257-
runOnlyForDeploymentPostprocessing = 0;
258-
};
259242
/* End PBXFrameworksBuildPhase section */
260243

261244
/* Begin PBXGroup section */
@@ -306,7 +289,6 @@
306289
children = (
307290
1B4C5BB22B035EBA00D4BD0B /* migrator */,
308291
1B4C5BC42B035EBD00D4BD0B /* migratorTests */,
309-
1B4C5BCE2B035EBD00D4BD0B /* migratorUITests */,
310292
1B4C5BB12B035EBA00D4BD0B /* Products */,
311293
);
312294
sourceTree = "<group>";
@@ -324,7 +306,6 @@
324306
5350A7F12F3B456F00D04A33 /* SECURITY.md */,
325307
1B4C5BB02B035EBA00D4BD0B /* Data Shift.app */,
326308
1B4C5BC12B035EBD00D4BD0B /* migratorTests.xctest */,
327-
1B4C5BCB2B035EBD00D4BD0B /* migratorUITests.xctest */,
328309
);
329310
name = Products;
330311
sourceTree = "<group>";
@@ -359,20 +340,11 @@
359340
1B4C5BC42B035EBD00D4BD0B /* migratorTests */ = {
360341
isa = PBXGroup;
361342
children = (
362-
1B4C5BC52B035EBD00D4BD0B /* MigratorTests.swift */,
343+
1B4C5BC52B035EBD00D4BD0B /* ProfileConfigTests.swift */,
363344
);
364345
path = migratorTests;
365346
sourceTree = "<group>";
366347
};
367-
1B4C5BCE2B035EBD00D4BD0B /* migratorUITests */ = {
368-
isa = PBXGroup;
369-
children = (
370-
1B4C5BCF2B035EBD00D4BD0B /* MigratorUITests.swift */,
371-
1B4C5BD12B035EBD00D4BD0B /* MigratorUITestsLaunchTests.swift */,
372-
);
373-
path = migratorUITests;
374-
sourceTree = "<group>";
375-
};
376348
1B4C5BDE2B03759E00D4BD0B /* Views */ = {
377349
isa = PBXGroup;
378350
children = (
@@ -492,6 +464,7 @@
492464
isa = PBXGroup;
493465
children = (
494466
1B4C5BE42B03B80300D4BD0B /* Utils.swift */,
467+
533EF2C52F6ADF3700DA2DCD /* DebugHelpers.swift */,
495468
5352A1E22EE1D89300754A4C /* FontManager.swift */,
496469
);
497470
path = Helpers;
@@ -591,24 +564,6 @@
591564
productReference = 1B4C5BC12B035EBD00D4BD0B /* migratorTests.xctest */;
592565
productType = "com.apple.product-type.bundle.unit-test";
593566
};
594-
1B4C5BCA2B035EBD00D4BD0B /* migratorUITests */ = {
595-
isa = PBXNativeTarget;
596-
buildConfigurationList = 1B4C5BDB2B035EBD00D4BD0B /* Build configuration list for PBXNativeTarget "migratorUITests" */;
597-
buildPhases = (
598-
1B4C5BC72B035EBD00D4BD0B /* Sources */,
599-
1B4C5BC82B035EBD00D4BD0B /* Frameworks */,
600-
1B4C5BC92B035EBD00D4BD0B /* Resources */,
601-
);
602-
buildRules = (
603-
);
604-
dependencies = (
605-
1B4C5BCD2B035EBD00D4BD0B /* PBXTargetDependency */,
606-
);
607-
name = migratorUITests;
608-
productName = migratorUITests;
609-
productReference = 1B4C5BCB2B035EBD00D4BD0B /* migratorUITests.xctest */;
610-
productType = "com.apple.product-type.bundle.ui-testing";
611-
};
612567
/* End PBXNativeTarget section */
613568

614569
/* Begin PBXProject section */
@@ -627,10 +582,6 @@
627582
CreatedOnToolsVersion = 15.0.1;
628583
TestTargetID = 1B4C5BAF2B035EBA00D4BD0B;
629584
};
630-
1B4C5BCA2B035EBD00D4BD0B = {
631-
CreatedOnToolsVersion = 15.0.1;
632-
TestTargetID = 1B4C5BAF2B035EBA00D4BD0B;
633-
};
634585
};
635586
};
636587
buildConfigurationList = 1B4C5BAB2B035EBA00D4BD0B /* Build configuration list for PBXProject "migrator" */;
@@ -648,7 +599,6 @@
648599
targets = (
649600
1B4C5BAF2B035EBA00D4BD0B /* Data Shift */,
650601
1B4C5BC02B035EBD00D4BD0B /* migratorTests */,
651-
1B4C5BCA2B035EBD00D4BD0B /* migratorUITests */,
652602
);
653603
};
654604
/* End PBXProject section */
@@ -672,13 +622,6 @@
672622
);
673623
runOnlyForDeploymentPostprocessing = 0;
674624
};
675-
1B4C5BC92B035EBD00D4BD0B /* Resources */ = {
676-
isa = PBXResourcesBuildPhase;
677-
buildActionMask = 2147483647;
678-
files = (
679-
);
680-
runOnlyForDeploymentPostprocessing = 0;
681-
};
682625
/* End PBXResourcesBuildPhase section */
683626

684627
/* Begin PBXShellScriptBuildPhase section */
@@ -780,6 +723,7 @@
780723
53F2DE402B6A70E000588D2D /* URL-Extension.swift in Sources */,
781724
5352A1E42EE1D89300754A4C /* FontManager.swift in Sources */,
782725
5350A7E92F32122B00D04A33 /* ArchitectureType.swift in Sources */,
726+
533EF2C62F6ADF3B00DA2DCD /* DebugHelpers.swift in Sources */,
783727
5377C22F2B57C94F00B5C9C1 /* FileMessage.swift in Sources */,
784728
1B0507522B06133800384CD5 /* MigrationView.swift in Sources */,
785729
53CC8E392E46042900B44432 /* MigrationReportController.swift in Sources */,
@@ -845,16 +789,7 @@
845789
isa = PBXSourcesBuildPhase;
846790
buildActionMask = 2147483647;
847791
files = (
848-
1B4C5BC62B035EBD00D4BD0B /* MigratorTests.swift in Sources */,
849-
);
850-
runOnlyForDeploymentPostprocessing = 0;
851-
};
852-
1B4C5BC72B035EBD00D4BD0B /* Sources */ = {
853-
isa = PBXSourcesBuildPhase;
854-
buildActionMask = 2147483647;
855-
files = (
856-
1B4C5BD22B035EBD00D4BD0B /* MigratorUITestsLaunchTests.swift in Sources */,
857-
1B4C5BD02B035EBD00D4BD0B /* MigratorUITests.swift in Sources */,
792+
1B4C5BC62B035EBD00D4BD0B /* ProfileConfigTests.swift in Sources */,
858793
);
859794
runOnlyForDeploymentPostprocessing = 0;
860795
};
@@ -866,11 +801,6 @@
866801
target = 1B4C5BAF2B035EBA00D4BD0B /* Data Shift */;
867802
targetProxy = 1B4C5BC22B035EBD00D4BD0B /* PBXContainerItemProxy */;
868803
};
869-
1B4C5BCD2B035EBD00D4BD0B /* PBXTargetDependency */ = {
870-
isa = PBXTargetDependency;
871-
target = 1B4C5BAF2B035EBA00D4BD0B /* Data Shift */;
872-
targetProxy = 1B4C5BCC2B035EBD00D4BD0B /* PBXContainerItemProxy */;
873-
};
874804
/* End PBXTargetDependency section */
875805

876806
/* Begin XCBuildConfiguration section */
@@ -1005,7 +935,7 @@
1005935
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
1006936
CODE_SIGN_STYLE = Manual;
1007937
COMBINE_HIDPI_IMAGES = YES;
1008-
CURRENT_PROJECT_VERSION = 216;
938+
CURRENT_PROJECT_VERSION = 218;
1009939
DEAD_CODE_STRIPPING = YES;
1010940
DEVELOPMENT_ASSET_PATHS = "\"migrator/Preview Content\"";
1011941
DEVELOPMENT_TEAM = "";
@@ -1024,7 +954,7 @@
1024954
"@executable_path/../Frameworks",
1025955
);
1026956
MACOSX_DEPLOYMENT_TARGET = 12.0;
1027-
MARKETING_VERSION = 1.4.0;
957+
MARKETING_VERSION = 1.4.1;
1028958
PRODUCT_BUNDLE_IDENTIFIER = com.company.datashift;
1029959
PRODUCT_NAME = "$(TARGET_NAME)";
1030960
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1043,7 +973,7 @@
1043973
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
1044974
CODE_SIGN_STYLE = Manual;
1045975
COMBINE_HIDPI_IMAGES = YES;
1046-
CURRENT_PROJECT_VERSION = 216;
976+
CURRENT_PROJECT_VERSION = 218;
1047977
DEAD_CODE_STRIPPING = YES;
1048978
DEVELOPMENT_ASSET_PATHS = "\"migrator/Preview Content\"";
1049979
DEVELOPMENT_TEAM = "";
@@ -1062,7 +992,7 @@
1062992
"@executable_path/../Frameworks",
1063993
);
1064994
MACOSX_DEPLOYMENT_TARGET = 12.0;
1065-
MARKETING_VERSION = 1.4.0;
995+
MARKETING_VERSION = 1.4.1;
1066996
PRODUCT_BUNDLE_IDENTIFIER = com.company.datashift;
1067997
PRODUCT_NAME = "$(TARGET_NAME)";
1068998
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1088,7 +1018,7 @@
10881018
PROVISIONING_PROFILE_SPECIFIER = "";
10891019
SWIFT_EMIT_LOC_STRINGS = NO;
10901020
SWIFT_VERSION = 5.0;
1091-
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mac@IBM Shift.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Mac@IBM Shift";
1021+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Data Shift.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Data Shift";
10921022
};
10931023
name = Debug;
10941024
};
@@ -1108,43 +1038,7 @@
11081038
PROVISIONING_PROFILE_SPECIFIER = "";
11091039
SWIFT_EMIT_LOC_STRINGS = NO;
11101040
SWIFT_VERSION = 5.0;
1111-
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Mac@IBM Shift.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Mac@IBM Shift";
1112-
};
1113-
name = Release;
1114-
};
1115-
1B4C5BDC2B035EBD00D4BD0B /* Debug */ = {
1116-
isa = XCBuildConfiguration;
1117-
buildSettings = {
1118-
CODE_SIGN_STYLE = Manual;
1119-
CURRENT_PROJECT_VERSION = 1;
1120-
DEAD_CODE_STRIPPING = YES;
1121-
DEVELOPMENT_TEAM = "";
1122-
GENERATE_INFOPLIST_FILE = YES;
1123-
MARKETING_VERSION = 1.0;
1124-
PRODUCT_BUNDLE_IDENTIFIER = com.company.migratorUITests;
1125-
PRODUCT_NAME = "$(TARGET_NAME)";
1126-
PROVISIONING_PROFILE_SPECIFIER = "";
1127-
SWIFT_EMIT_LOC_STRINGS = NO;
1128-
SWIFT_VERSION = 5.0;
1129-
TEST_TARGET_NAME = migrator;
1130-
};
1131-
name = Debug;
1132-
};
1133-
1B4C5BDD2B035EBD00D4BD0B /* Release */ = {
1134-
isa = XCBuildConfiguration;
1135-
buildSettings = {
1136-
CODE_SIGN_STYLE = Manual;
1137-
CURRENT_PROJECT_VERSION = 1;
1138-
DEAD_CODE_STRIPPING = YES;
1139-
DEVELOPMENT_TEAM = "";
1140-
GENERATE_INFOPLIST_FILE = YES;
1141-
MARKETING_VERSION = 1.0;
1142-
PRODUCT_BUNDLE_IDENTIFIER = com.company.migratorUITests;
1143-
PRODUCT_NAME = "$(TARGET_NAME)";
1144-
PROVISIONING_PROFILE_SPECIFIER = "";
1145-
SWIFT_EMIT_LOC_STRINGS = NO;
1146-
SWIFT_VERSION = 5.0;
1147-
TEST_TARGET_NAME = migrator;
1041+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Data Shift.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Data Shift";
11481042
};
11491043
name = Release;
11501044
};
@@ -1178,15 +1072,6 @@
11781072
defaultConfigurationIsVisible = 0;
11791073
defaultConfigurationName = Release;
11801074
};
1181-
1B4C5BDB2B035EBD00D4BD0B /* Build configuration list for PBXNativeTarget "migratorUITests" */ = {
1182-
isa = XCConfigurationList;
1183-
buildConfigurations = (
1184-
1B4C5BDC2B035EBD00D4BD0B /* Debug */,
1185-
1B4C5BDD2B035EBD00D4BD0B /* Release */,
1186-
);
1187-
defaultConfigurationIsVisible = 0;
1188-
defaultConfigurationName = Release;
1189-
};
11901075
/* End XCConfigurationList section */
11911076
};
11921077
rootObject = 1B4C5BA82B035EBA00D4BD0B /* Project object */;

migrator/AppContext.swift

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,17 +303,33 @@ extension AppContext {
303303
return policy
304304
}
305305
private static var managedExcludedURLs: [URL?] {
306+
#if DEBUG
307+
return DebugHelpers.AppContext.debugExcludedPathsList.compactMap { urlString in
308+
Utils.Customization.parseProfileURL(urlString)
309+
} + Utils.UserDefaultsHelpers.managedValue(forKey: excludedPathsListKey, defaultValue: []).compactMap { urlString in
310+
return Utils.Customization.parseProfileURL(urlString)
311+
}
312+
#else
306313
return Utils.UserDefaultsHelpers.managedValue(forKey: excludedPathsListKey, defaultValue: []).compactMap { urlString in
307314
return Utils.Customization.parseProfileURL(urlString)
308315
}
309-
}
316+
#endif
317+
}
310318
static var urlExclusionList: [URL?] {
311319
return managedExcludedURLs + defaultUrlExclusionList
312320
}
313321
private static var managedAllowedURLs: [URL?] {
322+
#if DEBUG
323+
return DebugHelpers.AppContext.debugAllowedPathsList.compactMap { urlString in
324+
Utils.Customization.parseProfileURL(urlString)
325+
} + Utils.UserDefaultsHelpers.managedValue(forKey: allowedPathsListKey, defaultValue: []).compactMap { urlString in
326+
return Utils.Customization.parseProfileURL(urlString)
327+
}
328+
#else
314329
return Utils.UserDefaultsHelpers.managedValue(forKey: allowedPathsListKey, defaultValue: []).compactMap { urlString in
315330
return Utils.Customization.parseProfileURL(urlString)
316331
}
332+
#endif
317333
}
318334
static var explicitAllowList: [URL?] {
319335
return managedAllowedURLs + defaultExplicitAllowList

migrator/Controllers/NetworkControllers/NetworkConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ final class NetworkConnection {
6464
}
6565
}
6666
/// Stores the available space on the connected device and publishes changes to subscribers.
67-
var connectedDeviceAvailableSpace: Int = 0 {
67+
var connectedDeviceAvailableSpace: Int = -1 {
6868
didSet {
6969
self.onAvailableSpaceChange.send(connectedDeviceAvailableSpace)
7070
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// DebugHelpers.swift
3+
// IBM Data Shift
4+
//
5+
// Created by Simone Martorelli on 18/03/2026.
6+
// © Copyright IBM Corp. 2023, 2026
7+
// SPDX-License-Identifier: Apache2.0
8+
//
9+
10+
struct DebugHelpers {
11+
struct AppContext {
12+
/// Test list of paths excluded during local debug runs.
13+
static let debugExcludedPathsList: [String] = {
14+
return ["$HOMEFOLDER/DebugMigration/Excluded",
15+
"$APPFOLDER/DebugExcluded.app",
16+
"$HOMEFOLDER/Library/Application Support/.*/Preferences"]
17+
}()
18+
19+
/// Test list of explicitly allowed paths used during local debug runs.
20+
static let debugAllowedPathsList: [String] = {
21+
return ["$HOMEFOLDER/DebugMigration/Allowed",
22+
"$APPFOLDER/DebugAllowed.app",
23+
"$HOMEFOLDER/Library/Application Support/.*/Preferences/Keep"]
24+
}()
25+
}
26+
}

0 commit comments

Comments
 (0)