mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 19:53:25 +01:00
libimobiledev libs almost build
This commit is contained in:
@@ -3,10 +3,10 @@
|
|||||||
{
|
{
|
||||||
"identity" : "altsign",
|
"identity" : "altsign",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/SideStore/AltSign.git",
|
"location" : "https://github.com/SideStore/AltSign",
|
||||||
"state" : {
|
"state" : {
|
||||||
"branch" : "master",
|
"branch" : "master",
|
||||||
"revision" : "7e0e7edcf8fbc44ac1e35da3e9030a297aa18b84"
|
"revision" : "b94d53372c62c2ecb1949b98bae1604d68162474"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
{
|
{
|
||||||
"identity" : "down",
|
"identity" : "down",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/johnxnguyen/Down.git",
|
"location" : "https://github.com/johnxnguyen/Down",
|
||||||
"state" : {
|
"state" : {
|
||||||
"branch" : "master",
|
"branch" : "master",
|
||||||
"revision" : "e754ab1c80920dd51a8e08290c912ac1c2ac8b58"
|
"revision" : "e754ab1c80920dd51a8e08290c912ac1c2ac8b58"
|
||||||
@@ -36,15 +36,6 @@
|
|||||||
"version" : "4.2.2"
|
"version" : "4.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"identity" : "launchatlogin",
|
|
||||||
"kind" : "remoteSourceControl",
|
|
||||||
"location" : "https://github.com/sindresorhus/LaunchAtLogin",
|
|
||||||
"state" : {
|
|
||||||
"revision" : "e8171b3e38a2816f579f58f3dac1522aa39efe41",
|
|
||||||
"version" : "4.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"identity" : "nuke",
|
"identity" : "nuke",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
@@ -93,10 +84,10 @@
|
|||||||
{
|
{
|
||||||
"identity" : "sidekit",
|
"identity" : "sidekit",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/SideStore/SideKit.git",
|
"location" : "https://github.com/SideStore/SideKit",
|
||||||
"state" : {
|
"state" : {
|
||||||
"branch" : "main",
|
"revision" : "7ea34a09b52c104077dea8e0b90f8dc55d43b36b",
|
||||||
"revision" : "7ea34a09b52c104077dea8e0b90f8dc55d43b36b"
|
"version" : "0.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
493
Package.swift
493
Package.swift
@@ -71,16 +71,19 @@ let STATIC_LIBRARY = envBool("STATIC_LIBRARY")
|
|||||||
// ]
|
// ]
|
||||||
|
|
||||||
let dependencies: [Package.Dependency] = [
|
let dependencies: [Package.Dependency] = [
|
||||||
.package(url: "https://github.com/JoeMatt/Roxas", from: "1.2.2"),
|
.package(url: "https://github.com/JoeMatt/Roxas", from: "1.2.2"),
|
||||||
.package(url: "https://github.com/johnxnguyen/Down", branch: "master"),
|
.package(url: "https://github.com/johnxnguyen/Down", branch: "master"),
|
||||||
.package(url: "https://github.com/kean/Nuke", from: "7.0.0"),
|
.package(url: "https://github.com/kean/Nuke", from: "7.0.0"),
|
||||||
.package(url: "https://github.com/kishikawakatsumi/KeychainAccess", from: "4.2.0"),
|
.package(url: "https://github.com/kishikawakatsumi/KeychainAccess", from: "4.2.0"),
|
||||||
// .package(url: "https://github.com/krzyzanowskim/OpenSSL", from: "1.1.180"),
|
.package(url: "https://github.com/microsoft/appcenter-sdk-apple", from: "4.2.0"),
|
||||||
.package(url: "https://github.com/microsoft/appcenter-sdk-apple", from: "4.2.0"),
|
.package(url: "https://github.com/SideStore/AltSign", branch: "master"),
|
||||||
.package(url: "https://github.com/SideStore/AltSign", branch: "master"),
|
// .package(path: "../AltSign"),
|
||||||
.package(url: "https://github.com/SideStore/SideKit", branch: "main"),
|
|
||||||
.package(url: "https://github.com/sindresorhus/LaunchAtLogin", from: "4.1.0"),
|
.package(url: "https://github.com/SideStore/SideKit", from: "0.1.0"),
|
||||||
.package(url: "https://github.com/SwiftPackageIndex/SemanticVersion", from: "0.3.5"),
|
// .package(path: "../SideKit"),
|
||||||
|
|
||||||
|
// .package(url: "https://github.com/sindresorhus/LaunchAtLogin", from: "4.1.0"),
|
||||||
|
.package(url: "https://github.com/SwiftPackageIndex/SemanticVersion", from: "0.3.5"),
|
||||||
] // + dependencies_cargo
|
] // + dependencies_cargo
|
||||||
|
|
||||||
let package = Package(
|
let package = Package(
|
||||||
@@ -90,73 +93,84 @@ let package = Package(
|
|||||||
.iOS(.v13),
|
.iOS(.v13),
|
||||||
.tvOS(.v13),
|
.tvOS(.v13),
|
||||||
.macCatalyst(.v13),
|
.macCatalyst(.v13),
|
||||||
|
.macOS(.v11),
|
||||||
],
|
],
|
||||||
|
|
||||||
products: [
|
products: [
|
||||||
.executable(
|
.executable(
|
||||||
name: "SideStore",
|
name: "SideStore",
|
||||||
targets: ["SideStore"]),
|
targets: ["SideStore"]
|
||||||
|
),
|
||||||
.executable(
|
|
||||||
name: "SideWidget",
|
|
||||||
targets: ["SideWidget"]),
|
|
||||||
|
|
||||||
.executable(
|
.executable(
|
||||||
name: "SideDaemon",
|
name: "SideWidget",
|
||||||
targets: ["SideDaemon"]),
|
targets: ["SideWidget"]
|
||||||
|
),
|
||||||
|
|
||||||
|
// .executable(
|
||||||
|
// name: "SideDaemon",
|
||||||
|
// targets: ["SideDaemon"]),
|
||||||
|
|
||||||
.library(name: "EmotionalDamage", targets: ["EmotionalDamage"]),
|
.library(name: "EmotionalDamage", targets: ["EmotionalDamage"]),
|
||||||
.library(name: "MiniMuxerSwift", targets: ["MiniMuxerSwift"]),
|
.library(name: "MiniMuxerSwift", targets: ["MiniMuxerSwift"]),
|
||||||
.library(name: "SideStoreCore", targets: ["SideStoreCore"]),
|
.library(name: "SideStoreCore", targets: ["SideStoreCore"]),
|
||||||
|
|
||||||
|
.library(name: "libplist", type: .dynamic, targets: ["libplist"]),
|
||||||
|
.library(name: "libusbmuxd", type: .dynamic, targets: ["libusbmuxd"]),
|
||||||
|
.library(name: "libimobiledevice", type: .dynamic, targets: ["libimobiledevice"]),
|
||||||
|
.library(name: "libimobiledevice-glue", type: .dynamic, targets: ["libimobiledevice-glue"]),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
dependencies: dependencies,
|
dependencies: dependencies,
|
||||||
targets: [
|
targets: [
|
||||||
|
// MARK: - SideStore
|
||||||
|
|
||||||
// MARK: - SideStore
|
.executableTarget(
|
||||||
.executableTarget(
|
name: "SideStore",
|
||||||
name: "SideStore",
|
dependencies: [
|
||||||
dependencies: [
|
"SidePatcher",
|
||||||
"SidePatcher",
|
"EmotionalDamage",
|
||||||
"EmotionalDamage",
|
"MiniMuxerSwift",
|
||||||
"MiniMuxerSwift",
|
"SideStoreCore",
|
||||||
"SideStoreCore",
|
"Shared",
|
||||||
"Shared",
|
"Nuke",
|
||||||
.product(name: "Down", package: "Down"),
|
"Down",
|
||||||
.product(name: "AltSign", package: "AltSign"),
|
"AltSign",
|
||||||
.product(name: "Nuke", package: "Nuke"),
|
"SideKit",
|
||||||
.product(name: "Roxas", package: "Roxas"),
|
.product(name: "Roxas", package: "Roxas"),
|
||||||
.product(name: "RoxasUI", package: "Roxas"),
|
.product(name: "RoxasUI", package: "Roxas"),
|
||||||
.product(name: "AppCenterAnalytics", package: "appcenter-sdk-apple"),
|
.product(name: "AppCenterAnalytics", package: "appcenter-sdk-apple"),
|
||||||
.product(name: "AppCenterCrashes", package: "appcenter-sdk-apple")
|
.product(name: "AppCenterCrashes", package: "appcenter-sdk-apple"),
|
||||||
],
|
],
|
||||||
linkerSettings: [
|
linkerSettings: [
|
||||||
.linkedFramework("UIKit"),
|
.linkedFramework("UIKit"),
|
||||||
.linkedFramework("Avfoundation"),
|
.linkedFramework("Avfoundation"),
|
||||||
.linkedFramework("Combine"),
|
.linkedFramework("Combine"),
|
||||||
.linkedFramework("AppleArchive"),
|
.linkedFramework("AppleArchive"),
|
||||||
.linkedFramework("Network"),
|
.linkedFramework("Network"),
|
||||||
.linkedFramework("CoreData"),
|
.linkedFramework("CoreData"),
|
||||||
.linkedFramework("UniformTypeIdentifiers"),
|
.linkedFramework("UniformTypeIdentifiers"),
|
||||||
.linkedFramework("QuickLook", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("QuickLook", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("AuthenticationServices", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("AuthenticationServices", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("SafariServices", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("SafariServices", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("Intents", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("Intents", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("IntentsUI", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("IntentsUI", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("MessageUI", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("MessageUI", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("ARKit", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("ARKit", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("CoreHaptics", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("CoreHaptics", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("AudioToolbox", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("AudioToolbox", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("WidgetKit", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("WidgetKit", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("UserNotifications", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("UserNotifications", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
.linkedFramework("MobileCoreServices", .when(platforms: [.iOS, .macCatalyst])),
|
.linkedFramework("MobileCoreServices", .when(platforms: [.iOS, .macCatalyst])),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
// MARK: - SideWidget
|
// MARK: - SideWidget
|
||||||
.executableTarget(
|
|
||||||
name: "SideWidget"
|
.executableTarget(
|
||||||
),
|
name: "SideWidget"
|
||||||
|
),
|
||||||
|
|
||||||
// MARK: - EmotionalDamage
|
// MARK: - EmotionalDamage
|
||||||
|
|
||||||
@@ -175,28 +189,31 @@ let package = Package(
|
|||||||
dependencies: ["EmotionalDamage"]
|
dependencies: ["EmotionalDamage"]
|
||||||
),
|
),
|
||||||
|
|
||||||
// MARK: - SidePatcher
|
// MARK: - SidePatcher
|
||||||
|
|
||||||
.target(
|
.target(
|
||||||
name: "SidePatcher",
|
name: "SidePatcher",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.product(name: "Roxas", package: "Roxas"),
|
.product(name: "Roxas", package: "Roxas"),
|
||||||
.product(name: "RoxasUI", package: "Roxas"),
|
.product(name: "RoxasUI", package: "Roxas"),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
.testTarget(
|
.testTarget(
|
||||||
name: "SidePatcherTests",
|
name: "SidePatcherTests",
|
||||||
dependencies: ["SidePatcher"]
|
dependencies: ["SidePatcher"]
|
||||||
),
|
),
|
||||||
|
|
||||||
// MARK: - MiniMuxer
|
// MARK: - MiniMuxer
|
||||||
|
|
||||||
.target(
|
.target(
|
||||||
name: "MiniMuxerSwift",
|
name: "MiniMuxerSwift",
|
||||||
dependencies: ["minimuxer"],
|
dependencies: [
|
||||||
|
"minimuxer",
|
||||||
|
"libimobiledevice",
|
||||||
|
],
|
||||||
cSettings: [
|
cSettings: [
|
||||||
// .headerSearchPath("Dependencies/minimuxer/include"),
|
// .headerSearchPath("Dependencies/minimuxer/include"),
|
||||||
],
|
],
|
||||||
cxxSettings: [
|
cxxSettings: [
|
||||||
],
|
],
|
||||||
@@ -220,12 +237,19 @@ let package = Package(
|
|||||||
|
|
||||||
.target(
|
.target(
|
||||||
name: "Shared",
|
name: "Shared",
|
||||||
dependencies: ["SideKit"]
|
dependencies: [
|
||||||
|
"SideKit",
|
||||||
|
"AltSign",
|
||||||
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
.testTarget(
|
.testTarget(
|
||||||
name: "SharedTests",
|
name: "SharedTests",
|
||||||
dependencies: ["Shared"]
|
dependencies: [
|
||||||
|
"Shared",
|
||||||
|
"SideKit",
|
||||||
|
"AltSign",
|
||||||
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
// MARK: - SideBackup
|
// MARK: - SideBackup
|
||||||
@@ -237,112 +261,251 @@ let package = Package(
|
|||||||
|
|
||||||
// MARK: - SideDaemon
|
// MARK: - SideDaemon
|
||||||
|
|
||||||
.executableTarget(
|
// .executableTarget(
|
||||||
name: "SideDaemon",
|
// name: "SideDaemon",
|
||||||
dependencies: [
|
// dependencies: [
|
||||||
"Shared",
|
// "Shared",
|
||||||
.product(name: "AltSign", package: "AltSign"),
|
// .product(name: "SideKit", package: "SideKit"),
|
||||||
.product(name: "LaunchAtLogin", package: "LaunchAtLogin"),
|
// .product(name: "AltSign", package: "AltSign"),
|
||||||
]
|
// .product(name: "CoreCrypto", package: "AltSign"),
|
||||||
),
|
// .product(name: "CCoreCrypto", package: "AltSign"),
|
||||||
|
// .product(name: "LaunchAtLogin", package: "LaunchAtLogin"),
|
||||||
.testTarget(
|
// ]
|
||||||
name: "SideDaemonTests",
|
// ),
|
||||||
dependencies: ["SideDaemon"]
|
//
|
||||||
),
|
// .testTarget(
|
||||||
|
// name: "SideDaemonTests",
|
||||||
|
// dependencies: ["SideDaemon"]
|
||||||
|
// ),
|
||||||
|
|
||||||
// MARK: - SideStoreCore
|
// MARK: - SideStoreCore
|
||||||
|
|
||||||
.target(
|
.target(
|
||||||
name: "SideStoreCore",
|
name: "SideStoreCore",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"Shared",
|
"Shared",
|
||||||
.product(name: "Roxas", package: "Roxas"),
|
"KeychainAccess",
|
||||||
.product(name: "AltSign", package: "AltSign"),
|
"AltSign",
|
||||||
.product(name: "KeychainAccess", package: "KeychainAccess"),
|
"SemanticVersion",
|
||||||
.product(name: "SemanticVersion", package: "SemanticVersion"),
|
.product(name: "Roxas", package: "Roxas"),
|
||||||
],
|
]
|
||||||
swiftSettings: [
|
// swiftSettings: [
|
||||||
.unsafeFlags([
|
// .unsafeFlags([
|
||||||
// "--xcconfig-overrides", "AltStoreCore.xconfig"
|
//// "--xcconfig-overrides", "AltStoreCore.xconfig"
|
||||||
])
|
// ])
|
||||||
]
|
// ]
|
||||||
),
|
),
|
||||||
|
|
||||||
.testTarget(
|
.testTarget(
|
||||||
name: "SideStoreCoreTests",
|
name: "SideStoreCoreTests",
|
||||||
dependencies: ["SideStoreCore"]
|
dependencies: [
|
||||||
|
"SideStoreCore",
|
||||||
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
// MARK: - libfragmentzip
|
// MARK: - libfragmentzip
|
||||||
.target(
|
|
||||||
name: "libfragmentzip",
|
.target(
|
||||||
dependencies: [],
|
name: "libfragmentzip",
|
||||||
sources: [
|
dependencies: [],
|
||||||
"libfragmentzip-source/libfragmentzip/libfragmentzip.c"
|
sources: [
|
||||||
|
"libfragmentzip-source/libfragmentzip/libfragmentzip.c",
|
||||||
|
],
|
||||||
|
cSettings: [
|
||||||
|
.headerSearchPath("libfragmentzip-source/libfragmentzip/include"),
|
||||||
|
]
|
||||||
|
),
|
||||||
|
|
||||||
|
.testTarget(
|
||||||
|
name: "libfragmentzipTests",
|
||||||
|
dependencies: ["libfragmentzip"]
|
||||||
|
),
|
||||||
|
|
||||||
|
// MARK: - libmobiledevice
|
||||||
|
|
||||||
|
.target(
|
||||||
|
name: "libimobiledevice",
|
||||||
|
dependencies: [
|
||||||
|
"libimobiledevice-glue",
|
||||||
|
"libplist",
|
||||||
|
"libusbmuxd",
|
||||||
|
],
|
||||||
|
path: "Sources/libimobiledevice/libimobiledevice/",
|
||||||
|
exclude: [
|
||||||
|
"include/asprintf.h",
|
||||||
|
"include/Makefile.am",
|
||||||
|
"include/endianness.h",
|
||||||
|
],
|
||||||
|
publicHeadersPath: "include/libimobiledevice/"
|
||||||
|
),
|
||||||
|
|
||||||
|
// MARK: libmobiledevice-glue
|
||||||
|
.target(
|
||||||
|
name: "libimobiledevice-glue",
|
||||||
|
dependencies: [
|
||||||
|
"libplist"
|
||||||
|
],
|
||||||
|
path: "Sources/libimobiledevice/libimobiledevice-glue/",
|
||||||
|
exclude: [
|
||||||
|
"src/libimobiledevice-glue-1.0.pc.in",
|
||||||
|
"src/common.h"
|
||||||
],
|
],
|
||||||
|
publicHeadersPath: "include",
|
||||||
cSettings: [
|
cSettings: [
|
||||||
.headerSearchPath("libfragmentzip-source/libfragmentzip/include")
|
.headerSearchPath("include/"),
|
||||||
|
.headerSearchPath("../dependencies/libimobiledevice-glue/include"),
|
||||||
|
.headerSearchPath("../dependencies/libplist/include"),
|
||||||
|
.define("HAVE_OPENSSL"),
|
||||||
|
.define("HAVE_STPNCPY"),
|
||||||
|
.define("HAVE_STPCPY"),
|
||||||
|
.define("HAVE_VASPRINTF"),
|
||||||
|
.define("HAVE_ASPRINTF"),
|
||||||
|
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
||||||
|
.define("HAVE_GETIFADDRS"),
|
||||||
|
.define("HAVE_STRNDUP"),
|
||||||
|
.unsafeFlags([
|
||||||
|
"-w"
|
||||||
|
])
|
||||||
|
],
|
||||||
|
cxxSettings: [
|
||||||
|
.headerSearchPath("include/"),
|
||||||
|
.headerSearchPath("../dependencies/libimobiledevice-glue/include"),
|
||||||
|
.headerSearchPath("../dependencies/libplist/include"),
|
||||||
|
.define("HAVE_OPENSSL"),
|
||||||
|
.define("HAVE_STPNCPY"),
|
||||||
|
.define("HAVE_STPCPY"),
|
||||||
|
.define("HAVE_VASPRINTF"),
|
||||||
|
.define("HAVE_ASPRINTF"),
|
||||||
|
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
||||||
|
.define("HAVE_GETIFADDRS"),
|
||||||
|
.define("HAVE_STRNDUP"),
|
||||||
|
.unsafeFlags([
|
||||||
|
"-w",
|
||||||
|
"-Wno-module-import-in-extern-c"
|
||||||
|
])
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
.testTarget(
|
// MARK: libplist
|
||||||
name: "libfragmentzipTests",
|
|
||||||
dependencies: ["libfragmentzip"]
|
|
||||||
),
|
|
||||||
|
|
||||||
// MARK: - libmobiledevice
|
.target(
|
||||||
.target(
|
name: "libplist",
|
||||||
name: "libimobiledevice",
|
dependencies: [
|
||||||
dependencies: [
|
],
|
||||||
"libimobiledevice-glue",
|
path: "Sources/libimobiledevice/libplist/",
|
||||||
|
sources: [
|
||||||
|
"src/base64.c",
|
||||||
|
"src/bplist.c",
|
||||||
|
"src/bytearray.c",
|
||||||
|
"src/hashtable.c",
|
||||||
|
"src/plist.c",
|
||||||
|
"src/ptrarray.c",
|
||||||
|
"src/time64.c",
|
||||||
|
"src/xplist.c",
|
||||||
|
"src/Array.cpp",
|
||||||
|
"src/Boolean.cpp",
|
||||||
|
"src/Data.cpp",
|
||||||
|
"src/Date.cpp",
|
||||||
|
"src/Dictionary.cpp",
|
||||||
|
"src/Integer.cpp",
|
||||||
|
"src/Key.cpp",
|
||||||
|
"src/Node.cpp",
|
||||||
|
"src/Real.cpp",
|
||||||
|
"src/String.cpp",
|
||||||
|
"src/Structure.cpp",
|
||||||
|
"src/Uid.cpp",
|
||||||
|
"libcnary/node.c",
|
||||||
|
"libcnary/node_list.c",
|
||||||
|
],
|
||||||
|
publicHeadersPath: "include",
|
||||||
|
cSettings: [
|
||||||
|
.headerSearchPath("include/"),
|
||||||
|
.headerSearchPath("../dependencies/libplist/include"),
|
||||||
|
// .headerSearchPath("../dependencies/libplist/libcnary/include"),
|
||||||
|
.define("HAVE_OPENSSL"),
|
||||||
|
.define("HAVE_STPNCPY"),
|
||||||
|
.define("HAVE_STPCPY"),
|
||||||
|
.define("HAVE_VASPRINTF"),
|
||||||
|
.define("HAVE_ASPRINTF"),
|
||||||
|
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
||||||
|
.define("HAVE_GETIFADDRS"),
|
||||||
|
.define("HAVE_STRNDUP"),
|
||||||
|
.unsafeFlags([
|
||||||
|
"-w"
|
||||||
|
])
|
||||||
|
],
|
||||||
|
cxxSettings: [
|
||||||
|
.headerSearchPath("include/"),
|
||||||
|
.headerSearchPath("../dependencies/libplist/include"),
|
||||||
|
.headerSearchPath("../dependencies/libplist/libcnary/include"),
|
||||||
|
.define("HAVE_OPENSSL"),
|
||||||
|
.define("HAVE_STPNCPY"),
|
||||||
|
.define("HAVE_STPCPY"),
|
||||||
|
.define("HAVE_VASPRINTF"),
|
||||||
|
.define("HAVE_ASPRINTF"),
|
||||||
|
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
||||||
|
.define("HAVE_GETIFADDRS"),
|
||||||
|
.define("HAVE_STRNDUP"),
|
||||||
|
.unsafeFlags([
|
||||||
|
"-w",
|
||||||
|
"-Wno-module-import-in-extern-c"
|
||||||
|
])
|
||||||
|
]
|
||||||
|
),
|
||||||
|
|
||||||
|
// MARK: libusbmuxd
|
||||||
|
|
||||||
|
.target(
|
||||||
|
name: "libusbmuxd",
|
||||||
|
dependencies: [
|
||||||
"libplist",
|
"libplist",
|
||||||
"libusbmuxd"
|
"libimobiledevice-glue"
|
||||||
],
|
],
|
||||||
path: "Sources/libimobiledevice/libimobiledevice/",
|
path: "Sources/libimobiledevice/libusbmuxd/",
|
||||||
exclude: [
|
sources: [
|
||||||
"include/asprintf.h",
|
"src/libusbmuxd.c",
|
||||||
"include/Makefile.am",
|
],
|
||||||
"include/endianness.h"
|
publicHeadersPath: "include",
|
||||||
],
|
cSettings: [
|
||||||
publicHeadersPath: "include/libimobiledevice/"
|
.headerSearchPath("../dependencies/libplist/include"),
|
||||||
),
|
.headerSearchPath("../dependencies/libplist/libcnary/include"),
|
||||||
.target(
|
.headerSearchPath("../dependencies/libusbmuxd/include"),
|
||||||
name: "libimobiledevice-glue",
|
.headerSearchPath("../dependencies/libimobiledevice-glue/include/libimobiledevice-glue/"),
|
||||||
dependencies: [
|
.define("HAVE_OPENSSL"),
|
||||||
],
|
.define("HAVE_STPNCPY"),
|
||||||
path: "Sources/libimobiledevice/libimobiledevice-glue/",
|
.define("HAVE_STPCPY"),
|
||||||
exclude: [
|
.define("HAVE_VASPRINTF"),
|
||||||
"include/Makefile.am",
|
.define("HAVE_ASPRINTF"),
|
||||||
"include/endianness.h"
|
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
||||||
],
|
.define("HAVE_GETIFADDRS"),
|
||||||
publicHeadersPath: "include/libimobiledevice-glue/"
|
.define("HAVE_STRNDUP"),
|
||||||
),
|
.unsafeFlags([
|
||||||
.target(
|
"-w"
|
||||||
name: "libplist",
|
])
|
||||||
dependencies: [
|
],
|
||||||
],
|
cxxSettings: [
|
||||||
path: "Sources/libimobiledevice/libplist/",
|
.headerSearchPath("../dependencies/libplist/include"),
|
||||||
exclude: [
|
.headerSearchPath("../dependencies/libplist/libcnary/include"),
|
||||||
"include/Makefile.am",
|
.headerSearchPath("../dependencies/libusbmuxd/include"),
|
||||||
],
|
.headerSearchPath("../dependencies/libimobiledevice-glue/include/libimobiledevice-glue/"),
|
||||||
publicHeadersPath: "include/plist"
|
.define("HAVE_OPENSSL"),
|
||||||
),
|
.define("HAVE_STPNCPY"),
|
||||||
.target(
|
.define("HAVE_STPCPY"),
|
||||||
name: "libusbmuxd",
|
.define("HAVE_VASPRINTF"),
|
||||||
dependencies: [
|
.define("HAVE_ASPRINTF"),
|
||||||
],
|
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
||||||
path: "Sources/libimobiledevice/libusbmuxd/",
|
.define("HAVE_GETIFADDRS"),
|
||||||
exclude: [
|
.define("HAVE_STRNDUP"),
|
||||||
"include/Makefile.am",
|
.unsafeFlags([
|
||||||
"include/usbmuxd-proto.h"
|
"-w",
|
||||||
],
|
"-Wno-module-import-in-extern-c"
|
||||||
publicHeadersPath: "include"
|
])
|
||||||
),
|
]
|
||||||
|
),
|
||||||
],
|
],
|
||||||
swiftLanguageVersions: [.v5],
|
swiftLanguageVersions: [.v5],
|
||||||
cLanguageStandard: .c2x,
|
cLanguageStandard: .gnu11,
|
||||||
cxxLanguageStandard: .cxx20
|
cxxLanguageStandard: .gnucxx14
|
||||||
)
|
)
|
||||||
|
|
||||||
// MARK: - Helpers
|
// MARK: - Helpers
|
||||||
|
|||||||
@@ -1114,7 +1114,7 @@
|
|||||||
B3CD312529AF8B6D00374AF8 /* libusbmuxd */,
|
B3CD312529AF8B6D00374AF8 /* libusbmuxd */,
|
||||||
);
|
);
|
||||||
name = libimobiledevice;
|
name = libimobiledevice;
|
||||||
path = Sources/libmobiledevice;
|
path = Sources/libimobiledevice;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
BF56D2AD23DF9E170006506D /* App IDs */ = {
|
BF56D2AD23DF9E170006506D /* App IDs */ = {
|
||||||
@@ -2498,16 +2498,12 @@
|
|||||||
);
|
);
|
||||||
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"\"$(SRCROOT)/Dependencies/libplist/include\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libplist/include\"",
|
||||||
"\"$(SRCROOT)/Dependencies/libimobiledevice\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libimobiledevice\"",
|
||||||
"\"$(SRCROOT)/Dependencies/libimobiledevice/include\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libimobiledevice/include\"",
|
||||||
"\"$(SRCROOT)/Dependencies/AltSign/Dependencies/OpenSSL/macosx/include\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libusbmuxd/include\"",
|
||||||
"\"$(SRCROOT)/Dependencies/libusbmuxd/include\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libplist/libcnary/include\"",
|
||||||
"\"$(SRCROOT)/Dependencies/AltSign/Dependencies/libzip/lib\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libimobiledevice-glue/include\"/**",
|
||||||
"\"$(SRCROOT)/Dependencies/libplist/libcnary/include\"",
|
|
||||||
"\"${SDKROOT}/usr/include/libxml2\"",
|
|
||||||
"\"$(SRCROOT)/Dependencies/AltSign/Dependencies/libzip/xcode\"",
|
|
||||||
"\"$(SRCROOT)/Dependencies/libimobiledevice-glue/include\"/**",
|
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
PRODUCT_NAME = imobiledevice;
|
PRODUCT_NAME = imobiledevice;
|
||||||
@@ -2538,16 +2534,12 @@
|
|||||||
);
|
);
|
||||||
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
GCC_WARN_INHIBIT_ALL_WARNINGS = YES;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"\"$(SRCROOT)/Dependencies/libplist/include\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libplist/include\"",
|
||||||
"\"$(SRCROOT)/Dependencies/libimobiledevice\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libimobiledevice\"",
|
||||||
"\"$(SRCROOT)/Dependencies/libimobiledevice/include\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libimobiledevice/include\"",
|
||||||
"\"$(SRCROOT)/Dependencies/AltSign/Dependencies/OpenSSL/macosx/include\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libusbmuxd/include\"",
|
||||||
"\"$(SRCROOT)/Dependencies/libusbmuxd/include\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libplist/libcnary/include\"",
|
||||||
"\"$(SRCROOT)/Dependencies/AltSign/Dependencies/libzip/lib\"",
|
"\"$(SRCROOT)/Sources/libimobiledevice/dependencies/libimobiledevice-glue/include\"/**",
|
||||||
"\"$(SRCROOT)/Dependencies/libplist/libcnary/include\"",
|
|
||||||
"\"${SDKROOT}/usr/include/libxml2\"",
|
|
||||||
"\"$(SRCROOT)/Dependencies/AltSign/Dependencies/libzip/xcode\"",
|
|
||||||
"\"$(SRCROOT)/Dependencies/libimobiledevice-glue/include\"/**",
|
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
PRODUCT_NAME = imobiledevice;
|
PRODUCT_NAME = imobiledevice;
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
<Workspace
|
<Workspace
|
||||||
version = "1.0">
|
version = "1.0">
|
||||||
<FileRef
|
<FileRef
|
||||||
location = "self:/Users/jmattiello/Workspace/Provenance/SideStoreRepos/SideStore/SideStore.xcodeproj">
|
location = "self:">
|
||||||
</FileRef>
|
</FileRef>
|
||||||
</Workspace>
|
</Workspace>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// Created by Riley Testut on 5/23/19.
|
// Created by Riley Testut on 5/23/19.
|
||||||
// Copyright © 2019 Riley Testut. All rights reserved.
|
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||||
//
|
//
|
||||||
#if false
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import Network
|
import Network
|
||||||
import SideKit
|
import SideKit
|
||||||
@@ -156,4 +156,3 @@ private extension ConnectionManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|||||||
468
Sources/Shared/Connections/ServerProtocol.swift
Normal file
468
Sources/Shared/Connections/ServerProtocol.swift
Normal file
@@ -0,0 +1,468 @@
|
|||||||
|
//
|
||||||
|
// ServerProtocol.swift
|
||||||
|
// AltServer
|
||||||
|
//
|
||||||
|
// Created by Riley Testut on 5/24/19.
|
||||||
|
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import AltSign
|
||||||
|
import SideKit
|
||||||
|
|
||||||
|
public let ALTServerServiceType = "_altserver._tcp"
|
||||||
|
|
||||||
|
protocol ServerMessageProtocol: Codable
|
||||||
|
{
|
||||||
|
var version: Int { get }
|
||||||
|
var identifier: String { get }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ServerRequest: Decodable
|
||||||
|
{
|
||||||
|
case anisetteData(AnisetteDataRequest)
|
||||||
|
case prepareApp(PrepareAppRequest)
|
||||||
|
case beginInstallation(BeginInstallationRequest)
|
||||||
|
case installProvisioningProfiles(InstallProvisioningProfilesRequest)
|
||||||
|
case removeProvisioningProfiles(RemoveProvisioningProfilesRequest)
|
||||||
|
case removeApp(RemoveAppRequest)
|
||||||
|
case enableUnsignedCodeExecution(EnableUnsignedCodeExecutionRequest)
|
||||||
|
case unknown(identifier: String, version: Int)
|
||||||
|
|
||||||
|
var identifier: String {
|
||||||
|
switch self
|
||||||
|
{
|
||||||
|
case .anisetteData(let request): return request.identifier
|
||||||
|
case .prepareApp(let request): return request.identifier
|
||||||
|
case .beginInstallation(let request): return request.identifier
|
||||||
|
case .installProvisioningProfiles(let request): return request.identifier
|
||||||
|
case .removeProvisioningProfiles(let request): return request.identifier
|
||||||
|
case .removeApp(let request): return request.identifier
|
||||||
|
case .enableUnsignedCodeExecution(let request): return request.identifier
|
||||||
|
case .unknown(let identifier, _): return identifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var version: Int {
|
||||||
|
switch self
|
||||||
|
{
|
||||||
|
case .anisetteData(let request): return request.version
|
||||||
|
case .prepareApp(let request): return request.version
|
||||||
|
case .beginInstallation(let request): return request.version
|
||||||
|
case .installProvisioningProfiles(let request): return request.version
|
||||||
|
case .removeProvisioningProfiles(let request): return request.version
|
||||||
|
case .removeApp(let request): return request.version
|
||||||
|
case .enableUnsignedCodeExecution(let request): return request.version
|
||||||
|
case .unknown(_, let version): return version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum CodingKeys: String, CodingKey
|
||||||
|
{
|
||||||
|
case identifier
|
||||||
|
case version
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws
|
||||||
|
{
|
||||||
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
|
||||||
|
let version = try container.decode(Int.self, forKey: .version)
|
||||||
|
|
||||||
|
let identifier = try container.decode(String.self, forKey: .identifier)
|
||||||
|
switch identifier
|
||||||
|
{
|
||||||
|
case "AnisetteDataRequest":
|
||||||
|
let request = try AnisetteDataRequest(from: decoder)
|
||||||
|
self = .anisetteData(request)
|
||||||
|
|
||||||
|
case "PrepareAppRequest":
|
||||||
|
let request = try PrepareAppRequest(from: decoder)
|
||||||
|
self = .prepareApp(request)
|
||||||
|
|
||||||
|
case "BeginInstallationRequest":
|
||||||
|
let request = try BeginInstallationRequest(from: decoder)
|
||||||
|
self = .beginInstallation(request)
|
||||||
|
|
||||||
|
case "InstallProvisioningProfilesRequest":
|
||||||
|
let request = try InstallProvisioningProfilesRequest(from: decoder)
|
||||||
|
self = .installProvisioningProfiles(request)
|
||||||
|
|
||||||
|
case "RemoveProvisioningProfilesRequest":
|
||||||
|
let request = try RemoveProvisioningProfilesRequest(from: decoder)
|
||||||
|
self = .removeProvisioningProfiles(request)
|
||||||
|
|
||||||
|
case "RemoveAppRequest":
|
||||||
|
let request = try RemoveAppRequest(from: decoder)
|
||||||
|
self = .removeApp(request)
|
||||||
|
|
||||||
|
case "EnableUnsignedCodeExecutionRequest":
|
||||||
|
let request = try EnableUnsignedCodeExecutionRequest(from: decoder)
|
||||||
|
self = .enableUnsignedCodeExecution(request)
|
||||||
|
|
||||||
|
default:
|
||||||
|
self = .unknown(identifier: identifier, version: version)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ServerResponse: Decodable
|
||||||
|
{
|
||||||
|
case anisetteData(AnisetteDataResponse)
|
||||||
|
case installationProgress(InstallationProgressResponse)
|
||||||
|
case installProvisioningProfiles(InstallProvisioningProfilesResponse)
|
||||||
|
case removeProvisioningProfiles(RemoveProvisioningProfilesResponse)
|
||||||
|
case removeApp(RemoveAppResponse)
|
||||||
|
case enableUnsignedCodeExecution(EnableUnsignedCodeExecutionResponse)
|
||||||
|
case error(ErrorResponse)
|
||||||
|
case unknown(identifier: String, version: Int)
|
||||||
|
|
||||||
|
var identifier: String {
|
||||||
|
switch self
|
||||||
|
{
|
||||||
|
case .anisetteData(let response): return response.identifier
|
||||||
|
case .installationProgress(let response): return response.identifier
|
||||||
|
case .installProvisioningProfiles(let response): return response.identifier
|
||||||
|
case .removeProvisioningProfiles(let response): return response.identifier
|
||||||
|
case .removeApp(let response): return response.identifier
|
||||||
|
case .enableUnsignedCodeExecution(let response): return response.identifier
|
||||||
|
case .error(let response): return response.identifier
|
||||||
|
case .unknown(let identifier, _): return identifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var version: Int {
|
||||||
|
switch self
|
||||||
|
{
|
||||||
|
case .anisetteData(let response): return response.version
|
||||||
|
case .installationProgress(let response): return response.version
|
||||||
|
case .installProvisioningProfiles(let response): return response.version
|
||||||
|
case .removeProvisioningProfiles(let response): return response.version
|
||||||
|
case .removeApp(let response): return response.version
|
||||||
|
case .enableUnsignedCodeExecution(let response): return response.version
|
||||||
|
case .error(let response): return response.version
|
||||||
|
case .unknown(_, let version): return version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum CodingKeys: String, CodingKey
|
||||||
|
{
|
||||||
|
case identifier
|
||||||
|
case version
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws
|
||||||
|
{
|
||||||
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
|
||||||
|
let version = try container.decode(Int.self, forKey: .version)
|
||||||
|
|
||||||
|
let identifier = try container.decode(String.self, forKey: .identifier)
|
||||||
|
switch identifier
|
||||||
|
{
|
||||||
|
case "AnisetteDataResponse":
|
||||||
|
let response = try AnisetteDataResponse(from: decoder)
|
||||||
|
self = .anisetteData(response)
|
||||||
|
|
||||||
|
case "InstallationProgressResponse":
|
||||||
|
let response = try InstallationProgressResponse(from: decoder)
|
||||||
|
self = .installationProgress(response)
|
||||||
|
|
||||||
|
case "InstallProvisioningProfilesResponse":
|
||||||
|
let response = try InstallProvisioningProfilesResponse(from: decoder)
|
||||||
|
self = .installProvisioningProfiles(response)
|
||||||
|
|
||||||
|
case "RemoveProvisioningProfilesResponse":
|
||||||
|
let response = try RemoveProvisioningProfilesResponse(from: decoder)
|
||||||
|
self = .removeProvisioningProfiles(response)
|
||||||
|
|
||||||
|
case "RemoveAppResponse":
|
||||||
|
let response = try RemoveAppResponse(from: decoder)
|
||||||
|
self = .removeApp(response)
|
||||||
|
|
||||||
|
case "EnableUnsignedCodeExecutionResponse":
|
||||||
|
let response = try EnableUnsignedCodeExecutionResponse(from: decoder)
|
||||||
|
self = .enableUnsignedCodeExecution(response)
|
||||||
|
|
||||||
|
case "ErrorResponse":
|
||||||
|
let response = try ErrorResponse(from: decoder)
|
||||||
|
self = .error(response)
|
||||||
|
|
||||||
|
default:
|
||||||
|
self = .unknown(identifier: identifier, version: version)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// _Don't_ provide generic SuccessResponse, as that would prevent us
|
||||||
|
// from easily changing response format for a request in the future.
|
||||||
|
public struct ErrorResponse: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 2
|
||||||
|
public var identifier = "ErrorResponse"
|
||||||
|
|
||||||
|
public var error: ALTServerError {
|
||||||
|
return (self.serverError?.underlyingError as? ALTServerError)!
|
||||||
|
}
|
||||||
|
private var serverError: ALTServerError?
|
||||||
|
|
||||||
|
// Legacy (v1)
|
||||||
|
private var errorCode: ALTServerError.RawValue
|
||||||
|
|
||||||
|
public init(error: ALTServerError)
|
||||||
|
{
|
||||||
|
self.serverError = ALTServerError(error)
|
||||||
|
self.errorCode = error.errorCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct AnisetteDataRequest: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "AnisetteDataRequest"
|
||||||
|
|
||||||
|
public init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct AnisetteDataResponse: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "AnisetteDataResponse"
|
||||||
|
|
||||||
|
public var anisetteData: ALTAnisetteData
|
||||||
|
|
||||||
|
private enum CodingKeys: String, CodingKey
|
||||||
|
{
|
||||||
|
case identifier
|
||||||
|
case version
|
||||||
|
case anisetteData
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(anisetteData: ALTAnisetteData)
|
||||||
|
{
|
||||||
|
self.anisetteData = anisetteData
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws
|
||||||
|
{
|
||||||
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
self.version = try container.decode(Int.self, forKey: .version)
|
||||||
|
self.identifier = try container.decode(String.self, forKey: .identifier)
|
||||||
|
|
||||||
|
let json = try container.decode([String: String].self, forKey: .anisetteData)
|
||||||
|
|
||||||
|
// if let anisetteData = ALTAnisetteData() //(json: json)
|
||||||
|
// {
|
||||||
|
// self.anisetteData = anisetteData
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
throw DecodingError.dataCorruptedError(forKey: CodingKeys.anisetteData, in: container, debugDescription: "Couuld not parse anisette data from JSON")
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(to encoder: Encoder) throws
|
||||||
|
{
|
||||||
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
|
try container.encode(self.version, forKey: .version)
|
||||||
|
try container.encode(self.identifier, forKey: .identifier)
|
||||||
|
|
||||||
|
// let json = self.anisetteData.json()
|
||||||
|
// try container.encode(json, forKey: .anisetteData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct PrepareAppRequest: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "PrepareAppRequest"
|
||||||
|
|
||||||
|
public var udid: String
|
||||||
|
public var contentSize: Int
|
||||||
|
|
||||||
|
public var fileURL: URL?
|
||||||
|
|
||||||
|
public init(udid: String, contentSize: Int, fileURL: URL? = nil)
|
||||||
|
{
|
||||||
|
self.udid = udid
|
||||||
|
self.contentSize = contentSize
|
||||||
|
self.fileURL = fileURL
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct BeginInstallationRequest: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 3
|
||||||
|
public var identifier = "BeginInstallationRequest"
|
||||||
|
|
||||||
|
// If activeProfiles is non-nil, then AltServer should remove all profiles except active ones.
|
||||||
|
public var activeProfiles: Set<String>?
|
||||||
|
|
||||||
|
public var bundleIdentifier: String?
|
||||||
|
|
||||||
|
public init(activeProfiles: Set<String>?, bundleIdentifier: String?)
|
||||||
|
{
|
||||||
|
self.activeProfiles = activeProfiles
|
||||||
|
self.bundleIdentifier = bundleIdentifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct InstallationProgressResponse: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "InstallationProgressResponse"
|
||||||
|
|
||||||
|
public var progress: Double
|
||||||
|
|
||||||
|
public init(progress: Double)
|
||||||
|
{
|
||||||
|
self.progress = progress
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct InstallProvisioningProfilesRequest: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "InstallProvisioningProfilesRequest"
|
||||||
|
|
||||||
|
public var udid: String
|
||||||
|
public var provisioningProfiles: Set<ALTProvisioningProfile>
|
||||||
|
|
||||||
|
// If activeProfiles is non-nil, then AltServer should remove all profiles except active ones.
|
||||||
|
public var activeProfiles: Set<String>?
|
||||||
|
|
||||||
|
private enum CodingKeys: String, CodingKey
|
||||||
|
{
|
||||||
|
case identifier
|
||||||
|
case version
|
||||||
|
case udid
|
||||||
|
case provisioningProfiles
|
||||||
|
case activeProfiles
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(udid: String, provisioningProfiles: Set<ALTProvisioningProfile>, activeProfiles: Set<String>?)
|
||||||
|
{
|
||||||
|
self.udid = udid
|
||||||
|
self.provisioningProfiles = provisioningProfiles
|
||||||
|
self.activeProfiles = activeProfiles
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws
|
||||||
|
{
|
||||||
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
self.version = try container.decode(Int.self, forKey: .version)
|
||||||
|
self.identifier = try container.decode(String.self, forKey: .identifier)
|
||||||
|
self.udid = try container.decode(String.self, forKey: .udid)
|
||||||
|
|
||||||
|
let rawProvisioningProfiles = try container.decode([Data].self, forKey: .provisioningProfiles)
|
||||||
|
let provisioningProfiles = try rawProvisioningProfiles.map { (data) -> ALTProvisioningProfile in
|
||||||
|
guard let profile = ALTProvisioningProfile(data: data) else {
|
||||||
|
throw DecodingError.dataCorruptedError(forKey: CodingKeys.provisioningProfiles, in: container, debugDescription: "Could not parse provisioning profile from data.")
|
||||||
|
}
|
||||||
|
return profile
|
||||||
|
}
|
||||||
|
|
||||||
|
self.provisioningProfiles = Set(provisioningProfiles)
|
||||||
|
self.activeProfiles = try container.decodeIfPresent(Set<String>.self, forKey: .activeProfiles)
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(to encoder: Encoder) throws
|
||||||
|
{
|
||||||
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
|
try container.encode(self.version, forKey: .version)
|
||||||
|
try container.encode(self.identifier, forKey: .identifier)
|
||||||
|
try container.encode(self.udid, forKey: .udid)
|
||||||
|
|
||||||
|
try container.encode(self.provisioningProfiles.map { $0.data }, forKey: .provisioningProfiles)
|
||||||
|
try container.encodeIfPresent(self.activeProfiles, forKey: .activeProfiles)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct InstallProvisioningProfilesResponse: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "InstallProvisioningProfilesResponse"
|
||||||
|
|
||||||
|
public init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct RemoveProvisioningProfilesRequest: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "RemoveProvisioningProfilesRequest"
|
||||||
|
|
||||||
|
public var udid: String
|
||||||
|
public var bundleIdentifiers: Set<String>
|
||||||
|
|
||||||
|
public init(udid: String, bundleIdentifiers: Set<String>)
|
||||||
|
{
|
||||||
|
self.udid = udid
|
||||||
|
self.bundleIdentifiers = bundleIdentifiers
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct RemoveProvisioningProfilesResponse: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "RemoveProvisioningProfilesResponse"
|
||||||
|
|
||||||
|
public init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct RemoveAppRequest: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "RemoveAppRequest"
|
||||||
|
|
||||||
|
public var udid: String
|
||||||
|
public var bundleIdentifier: String
|
||||||
|
|
||||||
|
public init(udid: String, bundleIdentifier: String)
|
||||||
|
{
|
||||||
|
self.udid = udid
|
||||||
|
self.bundleIdentifier = bundleIdentifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct RemoveAppResponse: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "RemoveAppResponse"
|
||||||
|
|
||||||
|
public init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct EnableUnsignedCodeExecutionRequest: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "EnableUnsignedCodeExecutionRequest"
|
||||||
|
|
||||||
|
public var udid: String
|
||||||
|
public var processID: Int?
|
||||||
|
public var processName: String?
|
||||||
|
|
||||||
|
public init(udid: String, processID: Int? = nil, processName: String? = nil)
|
||||||
|
{
|
||||||
|
self.udid = udid
|
||||||
|
self.processID = processID
|
||||||
|
self.processName = processName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct EnableUnsignedCodeExecutionResponse: ServerMessageProtocol
|
||||||
|
{
|
||||||
|
public var version = 1
|
||||||
|
public var identifier = "EnableUnsignedCodeExecutionResponse"
|
||||||
|
|
||||||
|
public init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import Shared
|
||||||
|
import SideKit
|
||||||
|
|
||||||
typealias DaemonConnectionManager = ConnectionManager<DaemonRequestHandler>
|
typealias DaemonConnectionManager = ConnectionManager<DaemonRequestHandler>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
// Copyright © 2020 Riley Testut. All rights reserved.
|
// Copyright © 2020 Riley Testut. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import SideStoreCore
|
|
||||||
import Intents
|
import Intents
|
||||||
|
|
||||||
@available(iOS 14, *)
|
@available(iOS 14, *)
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@@ -53,13 +53,13 @@
|
|||||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="TFB-qo-cbh">
|
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="TFB-qo-cbh">
|
||||||
<rect key="frame" x="195" y="0.0" width="83" height="55"/>
|
<rect key="frame" x="195" y="0.0" width="83" height="55"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="Zpb-k3-y7l">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="Zpb-k3-y7l">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="83" height="50"/>
|
<rect key="frame" x="0.0" y="0.0" width="83" height="50"/>
|
||||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VOu-b8-uEL">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VOu-b8-uEL">
|
||||||
<rect key="frame" x="0.0" y="52" width="83" height="3"/>
|
<rect key="frame" x="0.0" y="52" width="83" height="3"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||||
<color key="textColor" white="1" alpha="0.65000000000000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="textColor" white="1" alpha="0.65000000000000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
@@ -126,7 +126,7 @@ If you would subscribe to the patreon that would support us and make sure we can
|
|||||||
<resources>
|
<resources>
|
||||||
<image name="SideStore" width="180" height="180"/>
|
<image name="SideStore" width="180" height="180"/>
|
||||||
<namedColor name="SettingsHighlighted">
|
<namedColor name="SettingsHighlighted">
|
||||||
<color red="0.23529411764705882" green="0.0" blue="0.40392156862745099" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color red="0.38823529411764707" green="0.011764705882352941" blue="0.58823529411764708" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
</namedColor>
|
</namedColor>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
@@ -7,11 +7,15 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import Shared
|
||||||
|
|
||||||
public extension FileManager {
|
public extension FileManager {
|
||||||
var altstoreSharedDirectory: URL? {
|
var altstoreSharedDirectory: URL? {
|
||||||
guard let appGroup = Bundle.main.appGroups.first else { return nil }
|
#if SWIFT_PACKAGE
|
||||||
|
guard let appGroup = Bundle.main.appGroups.first else { return nil }
|
||||||
|
#else
|
||||||
|
guard let appGroup = Bundle.main.appGroups.first else { return nil }
|
||||||
|
#endif
|
||||||
let sharedDirectoryURL = containerURL(forSecurityApplicationGroupIdentifier: appGroup)
|
let sharedDirectoryURL = containerURL(forSecurityApplicationGroupIdentifier: appGroup)
|
||||||
return sharedDirectoryURL
|
return sharedDirectoryURL
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ import Roxas
|
|||||||
public extension StoreApp {
|
public extension StoreApp {
|
||||||
#if SWIFT_PACKAGE
|
#if SWIFT_PACKAGE
|
||||||
#if ALPHA
|
#if ALPHA
|
||||||
static let altstoreAppID = Bundle.main.Info.appbundleIdentifier
|
static let altstoreAppID = Bundle.Info.appbundleIdentifier
|
||||||
#elseif BETA
|
#elseif BETA
|
||||||
static let altstoreAppID = Bundle.main.Info.appbundleIdentifier
|
static let altstoreAppID = Bundle.Info.appbundleIdentifier
|
||||||
#else
|
#else
|
||||||
static let altstoreAppID = Bundle.main.Info.appbundleIdentifier
|
static let altstoreAppID = Bundle.Info.appbundleIdentifier
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if ALPHA
|
#if ALPHA
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../dependencies/libimobiledevice-glue/include
|
|
||||||
1
Sources/libimobiledevice/libimobiledevice-glue/include/common.h
Symbolic link
1
Sources/libimobiledevice/libimobiledevice-glue/include/common.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../dependencies/libimobiledevice-glue/src/common.h
|
||||||
@@ -1 +0,0 @@
|
|||||||
../dependencies/libplist/include
|
|
||||||
1
Sources/libimobiledevice/libplist/include/base64.h
Symbolic link
1
Sources/libimobiledevice/libplist/include/base64.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../src/base64.h
|
||||||
1
Sources/libimobiledevice/libplist/include/bytearray.h
Symbolic link
1
Sources/libimobiledevice/libplist/include/bytearray.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../src/bytearray.h
|
||||||
1
Sources/libimobiledevice/libplist/include/hashtable.h
Symbolic link
1
Sources/libimobiledevice/libplist/include/hashtable.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../src/hashtable.h
|
||||||
1
Sources/libimobiledevice/libplist/include/plist.h
Symbolic link
1
Sources/libimobiledevice/libplist/include/plist.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../src/plist.h
|
||||||
1
Sources/libimobiledevice/libplist/include/ptrarray.h
Symbolic link
1
Sources/libimobiledevice/libplist/include/ptrarray.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../src/ptrarray.h
|
||||||
1
Sources/libimobiledevice/libplist/include/strbuf.h
Symbolic link
1
Sources/libimobiledevice/libplist/include/strbuf.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../src/strbuf.h
|
||||||
1
Sources/libimobiledevice/libplist/include/time64.h
Symbolic link
1
Sources/libimobiledevice/libplist/include/time64.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../src/time64.h
|
||||||
1
Sources/libimobiledevice/libplist/include/time64_limits.h
Symbolic link
1
Sources/libimobiledevice/libplist/include/time64_limits.h
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../src/time64_limits.h
|
||||||
1
Sources/libimobiledevice/libplist/libcnary/node.c
Symbolic link
1
Sources/libimobiledevice/libplist/libcnary/node.c
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../dependencies/libplist/libcnary/node.c
|
||||||
1
Sources/libimobiledevice/libplist/libcnary/node_list.c
Symbolic link
1
Sources/libimobiledevice/libplist/libcnary/node_list.c
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../dependencies/libplist/libcnary/node_list.c
|
||||||
@@ -1 +0,0 @@
|
|||||||
../dependencies/libusbmuxd/include
|
|
||||||
Reference in New Issue
Block a user