Strip package dependencies (#862)

The Library package offers the PassepartoutImplementations target for
OpenVPN/OpenSSL and WireGuard/Go, but it doesn't need it itself. Only
the main app does, so move the dependency there.

On the other side, drop the potentially problematic AppUI meta target.
Move platform filters to the Xcode project.

Indirectly fixes a crash with Xcode 16 Previews on iOS (forced to use
legacy previews before):

https://forums.developer.apple.com/forums/thread/756681
This commit is contained in:
Davide 2024-11-13 21:05:53 +01:00 committed by GitHub
parent 2d698cabfe
commit 0a51d1a1f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 58 additions and 133 deletions

View File

@ -7,9 +7,11 @@
objects = {
/* Begin PBXBuildFile section */
0E182C6C2CD61CD800051DB2 /* AppUI in Frameworks */ = {isa = PBXBuildFile; productRef = 0E182C6B2CD61CD800051DB2 /* AppUI */; };
0E3E22962CE53510005135DF /* AppUIMain in Frameworks */ = {isa = PBXBuildFile; platformFilters = (ios, macos, ); productRef = 0E3E22952CE53510005135DF /* AppUIMain */; };
0E3E22982CE53510005135DF /* AppUITV in Frameworks */ = {isa = PBXBuildFile; platformFilters = (tvos, ); productRef = 0E3E22972CE53510005135DF /* AppUITV */; };
0E3FF4BA2CE3AFBC00BFF640 /* Profiles.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = 0E3FF4B72CE3AFBC00BFF640 /* Profiles.sqlite */; };
0E3FF4BB2CE3AFBC00BFF640 /* LegacyV2CoreDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E3FF4B92CE3AFBC00BFF640 /* LegacyV2CoreDataTests.swift */; };
0E60512C2CE5393C00F763D4 /* PassepartoutImplementations in Frameworks */ = {isa = PBXBuildFile; productRef = 0E60512B2CE5393C00F763D4 /* PassepartoutImplementations */; };
0E757F132CD0CFFC006E13E1 /* PassepartoutLoginItemApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E757F122CD0CFFC006E13E1 /* PassepartoutLoginItemApp.swift */; };
0E757F202CD0D22B006E13E1 /* PassepartoutLoginItem.app in Embed Login Item */ = {isa = PBXBuildFile; fileRef = 0E757F102CD0CFFC006E13E1 /* PassepartoutLoginItem.app */; platformFilters = (macos, ); settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
0E757F232CD0D2BD006E13E1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E757F212CD0D2B7006E13E1 /* AppDelegate.swift */; };
@ -31,6 +33,8 @@
0EDE56FA2CABE42E0082D21C /* PassepartoutIntents.appex in Embed ExtensionKit Extensions */ = {isa = PBXBuildFile; fileRef = 0EDE56F02CABE42E0082D21C /* PassepartoutIntents.appex */; platformFilters = (ios, macos, ); settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
0EDE57002CABE4B50082D21C /* IntentsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EDE56E72CABE40D0082D21C /* IntentsExtension.swift */; };
0EE8D7E12CD112C200F6600C /* App+tvOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE8D7E02CD112C200F6600C /* App+tvOS.swift */; };
0EF5FE4D2CE53B1C00EC2CD4 /* PassepartoutImplementations in Frameworks */ = {isa = PBXBuildFile; productRef = 0EF5FE4C2CE53B1C00EC2CD4 /* PassepartoutImplementations */; };
0EF5FE4F2CE53BCE00EC2CD4 /* LegacyV2 in Frameworks */ = {isa = PBXBuildFile; productRef = 0EF5FE4E2CE53BCE00EC2CD4 /* LegacyV2 */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -156,6 +160,7 @@
buildActionMask = 2147483647;
files = (
0EBE80DC2BF55C0E00E36A20 /* TunnelLibrary in Frameworks */,
0EF5FE4D2CE53B1C00EC2CD4 /* PassepartoutImplementations in Frameworks */,
0EC332CA2B8A1808000B9C2F /* NetworkExtension.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -164,7 +169,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0E182C6C2CD61CD800051DB2 /* AppUI in Frameworks */,
0E3E22982CE53510005135DF /* AppUITV in Frameworks */,
0EF5FE4F2CE53BCE00EC2CD4 /* LegacyV2 in Frameworks */,
0E60512C2CE5393C00F763D4 /* PassepartoutImplementations in Frameworks */,
0E3E22962CE53510005135DF /* AppUIMain in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -330,7 +338,10 @@
);
name = Passepartout;
packageProductDependencies = (
0E182C6B2CD61CD800051DB2 /* AppUI */,
0E3E22952CE53510005135DF /* AppUIMain */,
0E3E22972CE53510005135DF /* AppUITV */,
0E60512B2CE5393C00F763D4 /* PassepartoutImplementations */,
0EF5FE4E2CE53BCE00EC2CD4 /* LegacyV2 */,
);
productName = PassepartoutKit;
productReference = 0E06D18F2B87629100176E1D /* Passepartout.app */;
@ -387,6 +398,7 @@
name = PassepartoutTunnel;
packageProductDependencies = (
0EBE80DB2BF55C0E00E36A20 /* TunnelLibrary */,
0EF5FE4C2CE53B1C00EC2CD4 /* PassepartoutImplementations */,
);
productName = Tunnel;
productReference = 0EC332C82B8A1808000B9C2F /* PassepartoutTunnel.appex */;
@ -417,7 +429,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1540;
LastUpgradeCheck = 1540;
LastUpgradeCheck = 1610;
TargetAttributes = {
0E06D18E2B87629100176E1D = {
CreatedOnToolsVersion = 15.2;
@ -786,7 +798,6 @@
0E06D19F2B87629200176E1D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"ASSETCATALOG_COMPILER_APPICON_NAME[sdk=appletvos*]" = TV;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@ -826,7 +837,6 @@
0E06D1A02B87629200176E1D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"ASSETCATALOG_COMPILER_APPICON_NAME[sdk=appletvos*]" = TV;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@ -1104,9 +1114,17 @@
/* End XCConfigurationList section */
/* Begin XCSwiftPackageProductDependency section */
0E182C6B2CD61CD800051DB2 /* AppUI */ = {
0E3E22952CE53510005135DF /* AppUIMain */ = {
isa = XCSwiftPackageProductDependency;
productName = AppUI;
productName = AppUIMain;
};
0E3E22972CE53510005135DF /* AppUITV */ = {
isa = XCSwiftPackageProductDependency;
productName = AppUITV;
};
0E60512B2CE5393C00F763D4 /* PassepartoutImplementations */ = {
isa = XCSwiftPackageProductDependency;
productName = PassepartoutImplementations;
};
0E6C0A022BF4047100450362 /* AppLibrary */ = {
isa = XCSwiftPackageProductDependency;
@ -1120,6 +1138,14 @@
isa = XCSwiftPackageProductDependency;
productName = TunnelLibrary;
};
0EF5FE4C2CE53B1C00EC2CD4 /* PassepartoutImplementations */ = {
isa = XCSwiftPackageProductDependency;
productName = PassepartoutImplementations;
};
0EF5FE4E2CE53BCE00EC2CD4 /* LegacyV2 */ = {
isa = XCSwiftPackageProductDependency;
productName = LegacyV2;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 0E06D1872B87629100176E1D /* Project object */;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction

View File

@ -1,67 +0,0 @@
<?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

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -41,7 +41,8 @@
"kind" : "remoteSourceControl",
"location" : "git@github.com:passepartoutvpn/passepartoutkit-source",
"state" : {
"revision" : "3a4c78af67dfe181acc657a5539ee3d62d1c9361"
"revision" : "3a4c78af67dfe181acc657a5539ee3d62d1c9361",
"version" : "0.11.0"
}
},
{
@ -58,8 +59,8 @@
"kind" : "remoteSourceControl",
"location" : "git@github.com:passepartoutvpn/passepartoutkit-source-wireguard-go",
"state" : {
"revision" : "8d142c806fb7dc4a2cd754d38d99da0d6398b811",
"version" : "0.9.1"
"revision" : "256a4a8265b7d214bb35f4e29e18c27e2dc49137",
"version" : "0.9.2"
}
},
{
@ -76,8 +77,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/passepartoutvpn/wireguard-apple",
"state" : {
"revision" : "a896f784bc5ed94f29d97e376be5cfa08d4a5d44",
"version" : "1.1.1"
"revision" : "d8bcdf22f1e75d80caac874f302dee86194bb71d",
"version" : "1.1.2"
}
}
],

View File

@ -13,13 +13,6 @@ let package = Package(
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "AppUI",
targets: [
"AppUI",
"PassepartoutImplementations"
]
),
.library(
name: "AppUIMain",
targets: ["AppUIMain"]
@ -36,12 +29,13 @@ let package = Package(
name: "LegacyV2",
targets: ["LegacyV2"]
),
.library(
name: "PassepartoutImplementations",
targets: ["PassepartoutImplementations"]
),
.library(
name: "TunnelLibrary",
targets: [
"CommonLibrary",
"PassepartoutImplementations"
]
targets: ["CommonLibrary"]
),
.library(
name: "UILibrary",
@ -96,10 +90,7 @@ let package = Package(
),
.target(
name: "AppUIMain",
dependencies: [
"LegacyV2",
"UILibrary"
],
dependencies: ["UILibrary"],
resources: [
.process("Resources")
]
@ -133,8 +124,7 @@ let package = Package(
name: "LegacyV2",
dependencies: [
"CommonLibrary",
"PassepartoutImplementations",
.product(name: "PassepartoutKit", package: "passepartoutkit-source")
"PassepartoutImplementations"
],
resources: [
.process("Profiles.xcdatamodeld")
@ -143,6 +133,7 @@ let package = Package(
.target(
name: "PassepartoutImplementations",
dependencies: [
.product(name: "PassepartoutKit", package: "passepartoutkit-source"),
.product(name: "PassepartoutOpenVPNOpenSSL", package: "passepartoutkit-source-openvpn-openssl"),
.product(name: "PassepartoutWireGuardGo", package: "passepartoutkit-source-wireguard-go")
]

View File

@ -1,26 +0,0 @@
//
// Dummy.swift
// Passepartout
//
// Created by Davide De Rosa on 11/2/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