Reorganize library into AppUI (#621)

Closes #611
This commit is contained in:
Davide 2024-09-26 23:13:55 +02:00 committed by GitHub
parent 4124ff5cae
commit fbc6ece59d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
149 changed files with 314 additions and 225 deletions

View File

@ -12,14 +12,15 @@
0E7E3D6B2B9345FD002BBDB4 /* PassepartoutApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E7E3D5F2B9345FD002BBDB4 /* PassepartoutApp.swift */; }; 0E7E3D6B2B9345FD002BBDB4 /* PassepartoutApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E7E3D5F2B9345FD002BBDB4 /* PassepartoutApp.swift */; };
0E94EE582B93554B00588243 /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E7E3D672B9345FD002BBDB4 /* PacketTunnelProvider.swift */; }; 0E94EE582B93554B00588243 /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E7E3D672B9345FD002BBDB4 /* PacketTunnelProvider.swift */; };
0EB08B982CA46F4900A02591 /* AppPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0EB08B962CA46F4900A02591 /* AppPlist.strings */; }; 0EB08B982CA46F4900A02591 /* AppPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0EB08B962CA46F4900A02591 /* AppPlist.strings */; };
0EBE80DA2BF55C0E00E36A20 /* AppLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = 0EBE80D92BF55C0E00E36A20 /* AppLibrary */; };
0EBE80DC2BF55C0E00E36A20 /* TunnelLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = 0EBE80DB2BF55C0E00E36A20 /* TunnelLibrary */; }; 0EBE80DC2BF55C0E00E36A20 /* TunnelLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = 0EBE80DB2BF55C0E00E36A20 /* TunnelLibrary */; };
0EC066D12C7DC47600D88A94 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EC066D02C7DC47600D88A94 /* LaunchScreen.storyboard */; platformFilter = ios; }; 0EC066D12C7DC47600D88A94 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0EC066D02C7DC47600D88A94 /* LaunchScreen.storyboard */; platformFilter = ios; };
0EC332CA2B8A1808000B9C2F /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EC332C92B8A1808000B9C2F /* NetworkExtension.framework */; }; 0EC332CA2B8A1808000B9C2F /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EC332C92B8A1808000B9C2F /* NetworkExtension.framework */; };
0EC332D22B8A1808000B9C2F /* PassepartoutTunnel.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 0EC332C82B8A1808000B9C2F /* PassepartoutTunnel.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 0EC332D22B8A1808000B9C2F /* PassepartoutTunnel.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 0EC332C82B8A1808000B9C2F /* PassepartoutTunnel.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
0EC797422B9378E000C093B7 /* Shared+App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC797402B9378E000C093B7 /* Shared+App.swift */; }; 0EC797422B9378E000C093B7 /* Shared+AppUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC797402B9378E000C093B7 /* Shared+AppUI.swift */; };
0EC797432B9378E000C093B7 /* Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC797412B9378E000C093B7 /* Shared.swift */; }; 0EC797432B9378E000C093B7 /* Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC797412B9378E000C093B7 /* Shared.swift */; };
0EC797442B93790600C093B7 /* Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC797412B9378E000C093B7 /* Shared.swift */; }; 0EC797442B93790600C093B7 /* Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC797412B9378E000C093B7 /* Shared.swift */; };
0EC9C0232CA5BD0B00C52954 /* AppUI in Frameworks */ = {isa = PBXBuildFile; productRef = 0EC9C0222CA5BD0B00C52954 /* AppUI */; };
0EC9C0282CA5C04500C52954 /* Shared+AppLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EC9C0272CA5C04500C52954 /* Shared+AppLibrary.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
@ -61,8 +62,9 @@
0EC066D02C7DC47600D88A94 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; }; 0EC066D02C7DC47600D88A94 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
0EC332C82B8A1808000B9C2F /* PassepartoutTunnel.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = PassepartoutTunnel.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 0EC332C82B8A1808000B9C2F /* PassepartoutTunnel.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = PassepartoutTunnel.appex; sourceTree = BUILT_PRODUCTS_DIR; };
0EC332C92B8A1808000B9C2F /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; }; 0EC332C92B8A1808000B9C2F /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; };
0EC797402B9378E000C093B7 /* Shared+App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Shared+App.swift"; sourceTree = "<group>"; }; 0EC797402B9378E000C093B7 /* Shared+AppUI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Shared+AppUI.swift"; sourceTree = "<group>"; };
0EC797412B9378E000C093B7 /* Shared.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Shared.swift; sourceTree = "<group>"; }; 0EC797412B9378E000C093B7 /* Shared.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Shared.swift; sourceTree = "<group>"; };
0EC9C0272CA5C04500C52954 /* Shared+AppLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Shared+AppLibrary.swift"; sourceTree = "<group>"; };
0ED1EFDA2C33059600CBD9BD /* App.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = App.plist; sourceTree = "<group>"; }; 0ED1EFDA2C33059600CBD9BD /* App.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = App.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@ -80,7 +82,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
0EBE80DA2BF55C0E00E36A20 /* AppLibrary in Frameworks */, 0EC9C0232CA5BD0B00C52954 /* AppUI in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -143,7 +145,8 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0EC797412B9378E000C093B7 /* Shared.swift */, 0EC797412B9378E000C093B7 /* Shared.swift */,
0EC797402B9378E000C093B7 /* Shared+App.swift */, 0EC9C0272CA5C04500C52954 /* Shared+AppLibrary.swift */,
0EC797402B9378E000C093B7 /* Shared+AppUI.swift */,
); );
path = Shared; path = Shared;
sourceTree = "<group>"; sourceTree = "<group>";
@ -179,7 +182,7 @@
); );
name = Passepartout; name = Passepartout;
packageProductDependencies = ( packageProductDependencies = (
0EBE80D92BF55C0E00E36A20 /* AppLibrary */, 0EC9C0222CA5BD0B00C52954 /* AppUI */,
); );
productName = PassepartoutKit; productName = PassepartoutKit;
productReference = 0E06D18F2B87629100176E1D /* Passepartout.app */; productReference = 0E06D18F2B87629100176E1D /* Passepartout.app */;
@ -213,7 +216,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
BuildIndependentTargetsInParallel = 1; BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1520; LastSwiftUpdateCheck = 1540;
LastUpgradeCheck = 1540; LastUpgradeCheck = 1540;
TargetAttributes = { TargetAttributes = {
0E06D18E2B87629100176E1D = { 0E06D18E2B87629100176E1D = {
@ -290,8 +293,9 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
0E7C3CCD2C9AF44600B72E69 /* AppDelegate.swift in Sources */, 0E7C3CCD2C9AF44600B72E69 /* AppDelegate.swift in Sources */,
0EC9C0282CA5C04500C52954 /* Shared+AppLibrary.swift in Sources */,
0E7E3D6B2B9345FD002BBDB4 /* PassepartoutApp.swift in Sources */, 0E7E3D6B2B9345FD002BBDB4 /* PassepartoutApp.swift in Sources */,
0EC797422B9378E000C093B7 /* Shared+App.swift in Sources */, 0EC797422B9378E000C093B7 /* Shared+AppUI.swift in Sources */,
0EC797432B9378E000C093B7 /* Shared.swift in Sources */, 0EC797432B9378E000C093B7 /* Shared.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -499,7 +503,7 @@
INFOPLIST_FILE = Passepartout/App/App.plist; INFOPLIST_FILE = Passepartout/App/App.plist;
INFOPLIST_KEY_CFBundleDisplayName = "$(TARGET_NAME)"; INFOPLIST_KEY_CFBundleDisplayName = "$(TARGET_NAME)";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 Davide De Rosa. All rights reserved."; INFOPLIST_KEY_NSHumanReadableCopyright = "$(CFG_COPYRIGHT)";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = dummy; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = dummy;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
@ -541,7 +545,7 @@
INFOPLIST_FILE = Passepartout/App/App.plist; INFOPLIST_FILE = Passepartout/App/App.plist;
INFOPLIST_KEY_CFBundleDisplayName = "$(TARGET_NAME)"; INFOPLIST_KEY_CFBundleDisplayName = "$(TARGET_NAME)";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 Davide De Rosa. All rights reserved."; INFOPLIST_KEY_NSHumanReadableCopyright = "$(CFG_COPYRIGHT)";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = dummy; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = dummy;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
@ -576,6 +580,9 @@
CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements; CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements;
CURRENT_PROJECT_VERSION = 3633; CURRENT_PROJECT_VERSION = 3633;
INFOPLIST_FILE = Passepartout/Tunnel/Tunnel.plist; INFOPLIST_FILE = Passepartout/Tunnel/Tunnel.plist;
INFOPLIST_KEY_CFBundleDisplayName = "$(TARGET_NAME)";
INFOPLIST_KEY_NSHumanReadableCopyright = "$(CFG_COPYRIGHT)";
INFOPLIST_KEY_UIRequiredDeviceCapabilities = arm64;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
@ -603,6 +610,9 @@
CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements; CODE_SIGN_ENTITLEMENTS = Passepartout/Tunnel/Tunnel.entitlements;
CURRENT_PROJECT_VERSION = 3633; CURRENT_PROJECT_VERSION = 3633;
INFOPLIST_FILE = Passepartout/Tunnel/Tunnel.plist; INFOPLIST_FILE = Passepartout/Tunnel/Tunnel.plist;
INFOPLIST_KEY_CFBundleDisplayName = "$(TARGET_NAME)";
INFOPLIST_KEY_NSHumanReadableCopyright = "$(CFG_COPYRIGHT)";
INFOPLIST_KEY_UIRequiredDeviceCapabilities = arm64;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../Frameworks"; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../../../../Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../../../../Frameworks";
MARKETING_VERSION = 3.0.0; MARKETING_VERSION = 3.0.0;
@ -662,14 +672,14 @@
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
productName = TunnelLibrary; productName = TunnelLibrary;
}; };
0EBE80D92BF55C0E00E36A20 /* AppLibrary */ = {
isa = XCSwiftPackageProductDependency;
productName = AppLibrary;
};
0EBE80DB2BF55C0E00E36A20 /* TunnelLibrary */ = { 0EBE80DB2BF55C0E00E36A20 /* TunnelLibrary */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
productName = TunnelLibrary; productName = TunnelLibrary;
}; };
0EC9C0222CA5BD0B00C52954 /* AppUI */ = {
isa = XCSwiftPackageProductDependency;
productName = AppUI;
};
/* End XCSwiftPackageProductDependency section */ /* End XCSwiftPackageProductDependency section */
}; };
rootObject = 0E06D1872B87629100176E1D /* Project object */; rootObject = 0E06D1872B87629100176E1D /* Project object */;

View File

@ -1,77 +0,0 @@
{
"pins" : [
{
"identity" : "dtfoundation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Cocoanetics/DTFoundation.git",
"state" : {
"revision" : "76062513434421cb6c8a1ae1d4f8368a7ebc2da3",
"version" : "1.7.18"
}
},
{
"identity" : "kvitto",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Cocoanetics/Kvitto",
"state" : {
"revision" : "88888674d772ddcf19671159ed0022cb0bc37be2",
"version" : "1.0.6"
}
},
{
"identity" : "openssl-apple",
"kind" : "remoteSourceControl",
"location" : "https://github.com/passepartoutvpn/openssl-apple",
"state" : {
"revision" : "0edc07c7a0e4ec2ca0f448dd68314241ccc925b3",
"version" : "3.2.107"
}
},
{
"identity" : "passepartoutkit",
"kind" : "remoteSourceControl",
"location" : "git@github.com:passepartoutvpn/passepartoutkit",
"state" : {
"revision" : "2c32459d6a669e8feed0e6ea2d1250ef72364aa3",
"version" : "0.7.0"
}
},
{
"identity" : "passepartoutkit-openvpn-openssl",
"kind" : "remoteSourceControl",
"location" : "git@github.com:passepartoutvpn/passepartoutkit-openvpn-openssl",
"state" : {
"revision" : "a3092a6ee0a63f666aa47ef3f0f50c324a64598d",
"version" : "0.6.0"
}
},
{
"identity" : "passepartoutkit-wireguard-go",
"kind" : "remoteSourceControl",
"location" : "git@github.com:passepartoutvpn/passepartoutkit-wireguard-go",
"state" : {
"revision" : "2cbd6023300d2dcc3f6f68de4812cf390421ec35",
"version" : "0.6.2"
}
},
{
"identity" : "wg-go-apple",
"kind" : "remoteSourceControl",
"location" : "https://github.com/passepartoutvpn/wg-go-apple",
"state" : {
"revision" : "860e82efaf261da37483a5f51555be83e5a79ad3",
"version" : "0.0.20240714"
}
},
{
"identity" : "wireguard-apple",
"kind" : "remoteSourceControl",
"location" : "https://github.com/passepartoutvpn/wireguard-apple",
"state" : {
"revision" : "a896f784bc5ed94f29d97e376be5cfa08d4a5d44",
"version" : "1.1.1"
}
}
],
"version" : 2
}

View File

@ -37,16 +37,16 @@
</array> </array>
</dict> </dict>
<dict> <dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeExtensions</key> <key>CFBundleTypeExtensions</key>
<array> <array>
<string>ovpn</string> <string>ovpn</string>
<string>conf</string> <string>conf</string>
<string>zip</string> <string>zip</string>
</array> </array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
</dict> </dict>
</array> </array>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>

View File

@ -23,7 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary import AppUI
import CommonLibrary import CommonLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI
@ -57,7 +57,7 @@ struct PassepartoutApp: App {
to: Constants.shared.urlForAppLog, to: Constants.shared.urlForAppLog,
parameters: Constants.shared.log parameters: Constants.shared.log
) )
AppLibrary.configure(with: context) AppUI.configure(with: context)
} }
.themeLockScreen() .themeLockScreen()
.environmentObject(theme) .environmentObject(theme)

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@ -4,7 +4,8 @@
version = "1.7"> version = "1.7">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"> buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries> <BuildActionEntries>
<BuildActionEntry <BuildActionEntry
buildForTesting = "YES" buildForTesting = "YES"

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AppUI"
BuildableName = "AppUI"
BlueprintName = "AppUI"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AppUI"
BuildableName = "AppUI"
BlueprintName = "AppUI"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -15,23 +15,23 @@ let package = Package(
// Products define the executables and libraries a package produces, making them visible to other packages. // Products define the executables and libraries a package produces, making them visible to other packages.
.library( .library(
name: "AppLibrary", name: "AppLibrary",
targets: ["AppLibrary"]
),
.library(
name: "AppUI",
targets: [ targets: [
"AppLibrary", "AppDataProfiles",
"AppDataProfiles" "AppUI"
] ]
), ),
.library( .library(
name: "TunnelLibrary", name: "TunnelLibrary",
targets: ["TunnelLibrary"] targets: ["CommonLibrary"]
),
.library(
name: "UtilsLibrary",
targets: ["UtilsLibrary"]
) )
], ],
dependencies: [ dependencies: [
.package(url: "git@github.com:passepartoutvpn/passepartoutkit", from: "0.7.0"), // .package(url: "git@github.com:passepartoutvpn/passepartoutkit", from: "0.7.0"),
// .package(url: "git@github.com:passepartoutvpn/passepartoutkit", revision: "d4f25ecfbcd00dbb6f08de18eda6e0cefbcc379d"), .package(url: "git@github.com:passepartoutvpn/passepartoutkit", revision: "2d7e0210d8754664ce45528d50c1a1e6a36ad27c"),
// .package(path: "../../../passepartoutkit"), // .package(path: "../../../passepartoutkit"),
.package(url: "git@github.com:passepartoutvpn/passepartoutkit-openvpn-openssl", from: "0.6.0"), .package(url: "git@github.com:passepartoutvpn/passepartoutkit-openvpn-openssl", from: "0.6.0"),
// .package(path: "../../../passepartoutkit-openvpn-openssl"), // .package(path: "../../../passepartoutkit-openvpn-openssl"),
@ -64,8 +64,13 @@ let package = Package(
dependencies: [ dependencies: [
"AppData", "AppData",
"CommonLibrary", "CommonLibrary",
"Kvitto" "Kvitto",
], "UtilsLibrary"
]
),
.target(
name: "AppUI",
dependencies: ["AppLibrary"],
resources: [ resources: [
.process("Resources") .process("Resources")
] ]
@ -75,23 +80,22 @@ let package = Package(
dependencies: [ dependencies: [
.product(name: "PassepartoutKit", package: "passepartoutkit"), .product(name: "PassepartoutKit", package: "passepartoutkit"),
.product(name: "PassepartoutOpenVPNOpenSSL", package: "passepartoutkit-openvpn-openssl"), .product(name: "PassepartoutOpenVPNOpenSSL", package: "passepartoutkit-openvpn-openssl"),
.product(name: "PassepartoutWireGuardGo", package: "passepartoutkit-wireguard-go"), .product(name: "PassepartoutWireGuardGo", package: "passepartoutkit-wireguard-go")
"UtilsLibrary",
], ],
resources: [ resources: [
.process("Resources") .process("Resources")
] ]
), ),
.target(
name: "TunnelLibrary",
dependencies: ["CommonLibrary"]
),
.target( .target(
name: "UtilsLibrary" name: "UtilsLibrary"
), ),
.testTarget( .testTarget(
name: "AppLibraryTests", name: "AppLibraryTests",
dependencies: ["AppLibrary"] dependencies: ["AppLibrary"]
),
.testTarget(
name: "AppUITests",
dependencies: ["AppUI"]
) )
] ]
) )

View File

@ -48,7 +48,7 @@ public final class ProfileManager: ObservableObject {
private var subscriptions: Set<AnyCancellable> private var subscriptions: Set<AnyCancellable>
// for testing/previews // for testing/previews
init(profiles: [Profile]) { public init(profiles: [Profile]) {
didSave = PassthroughSubject() didSave = PassthroughSubject()
self.profiles = profiles.sorted { self.profiles = profiles.sorted {
$0.name.lowercased() < $1.name.lowercased() $0.name.lowercased() < $1.name.lowercased()

View File

@ -0,0 +1,55 @@
//
// Shared.swift
// Passepartout
//
// Created by Davide De Rosa on 8/11/24.
// Copyright (c) 2024 Davide De Rosa. All rights reserved.
//
// https://github.com/passepartoutvpn
//
// This file is part of Passepartout.
//
// Passepartout is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Passepartout is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
//
import Foundation
import PassepartoutKit
import PassepartoutWireGuardGo
import UtilsLibrary
extension LoggerDestination {
public static let app = Self(category: "app")
}
extension WireGuard.Configuration.Builder {
public static var `default`: Self {
.init(keyGenerator: StandardWireGuardKeyGenerator())
}
}
extension CoreDataPersistentStoreLogger where Self == DefaultCoreDataPersistentStoreLogger {
public static var `default`: CoreDataPersistentStoreLogger {
DefaultCoreDataPersistentStoreLogger()
}
}
public struct DefaultCoreDataPersistentStoreLogger: CoreDataPersistentStoreLogger {
public func debug(_ msg: String) {
pp_log(.app, .info, msg)
}
public func warning(_ msg: String) {
pp_log(.app, .error, msg)
}
}

View File

@ -1,5 +1,5 @@
// //
// AppLibrary.swift // AppUI.swift
// Passepartout // Passepartout
// //
// Created by Davide De Rosa on 7/31/24. // Created by Davide De Rosa on 7/31/24.
@ -26,7 +26,7 @@
import Foundation import Foundation
import PassepartoutKit import PassepartoutKit
public struct AppLibrary { public struct AppUI {
private init() { private init() {
} }
@ -39,7 +39,7 @@ public struct AppLibrary {
} }
} }
private extension AppLibrary { private extension AppUI {
static func assertMissingModuleImplementations() { static func assertMissingModuleImplementations() {
ModuleType.allCases.forEach { moduleType in ModuleType.allCases.forEach { moduleType in
let module = moduleType.newModule() let module = moduleType.newModule()

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import Combine import Combine
import CommonLibrary import CommonLibrary
import Foundation import Foundation

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import Combine import Combine
import CommonLibrary import CommonLibrary
import Foundation import Foundation

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import Foundation import Foundation
import PassepartoutKit import PassepartoutKit
import UtilsLibrary import UtilsLibrary

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import Foundation import Foundation
import PassepartoutKit import PassepartoutKit

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import Foundation import Foundation
import PassepartoutKit import PassepartoutKit

View File

@ -24,6 +24,7 @@
// //
import AppData import AppData
import AppLibrary
import Combine import Combine
import Foundation import Foundation
import PassepartoutKit import PassepartoutKit

View File

@ -23,11 +23,12 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import CommonLibrary import CommonLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI
public struct AdvancedRouterView: View { struct AdvancedRouterView: View {
@Environment(\.dismiss) @Environment(\.dismiss)
var dismiss var dismiss
@ -37,7 +38,7 @@ public struct AdvancedRouterView: View {
@State @State
var navigationRoute: NavigationRoute? var navigationRoute: NavigationRoute?
public init(tunnel: Tunnel) { init(tunnel: Tunnel) {
self.tunnel = tunnel self.tunnel = tunnel
} }
} }

View File

@ -29,7 +29,7 @@ import CommonLibrary
import SwiftUI import SwiftUI
extension AdvancedRouterView { extension AdvancedRouterView {
public var body: some View { var body: some View {
NavigationStack { NavigationStack {
AdvancedView( AdvancedView(
identifiers: Constants.shared.identifiers, identifiers: Constants.shared.identifiers,

View File

@ -29,7 +29,7 @@ import CommonLibrary
import SwiftUI import SwiftUI
extension AdvancedRouterView { extension AdvancedRouterView {
public var body: some View { var body: some View {
NavigationSplitView { NavigationSplitView {
AdvancedView( AdvancedView(
identifiers: Constants.shared.identifiers, identifiers: Constants.shared.identifiers,

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import CommonLibrary import CommonLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI
import UtilsLibrary import UtilsLibrary

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI

View File

@ -23,8 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import Combine import AppLibrary
import CommonLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI
import UtilsLibrary import UtilsLibrary

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI
import UtilsLibrary import UtilsLibrary

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI
import UtilsLibrary import UtilsLibrary

View File

@ -25,7 +25,6 @@
#if os(iOS) #if os(iOS)
import CommonLibrary
import SwiftUI import SwiftUI
import UIKit import UIKit
import UtilsLibrary import UtilsLibrary

View File

@ -25,7 +25,6 @@
#if os(macOS) #if os(macOS)
import CommonLibrary
import SwiftUI import SwiftUI
extension ReportIssueButton: View { extension ReportIssueButton: View {

View File

@ -23,6 +23,7 @@
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>. // along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
// //
import AppLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI
import UtilsLibrary import UtilsLibrary

View File

@ -25,6 +25,7 @@
#if os(iOS) #if os(iOS)
import AppLibrary
import PassepartoutKit import PassepartoutKit
import SwiftUI import SwiftUI
import UtilsLibrary import UtilsLibrary

Some files were not shown because too many files have changed in this diff Show More