Skip to content

Commit

Permalink
Remove ios-deploy (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
lfroms authored Sep 19, 2024
1 parent 28cd683 commit f40fcff
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 258 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,5 @@ To build Tophat, you will need at least Xcode 15.0 and macOS 14.0.

To create a release build of Tophat, use the following steps:

1. Go to the `ios-deploy` project in Xcode and set the `Skip Install` build setting to `Yes` for the `ios-deploy` target. Do not commit this change.
1. Create an archive using Product → Archive.
1. Select the archive that was created, click Distribute App, then Copy App.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ Tophat requires macOS 14 or later.

- Xcode 15 or newer is required.
- All simulator versions are supported, but physical devices must be running iOS 17 or later.
- Support for physical devices running iOS 16 and earlier is available but will be deprecated in September 2024.

### Android Development

Expand Down
74 changes: 0 additions & 74 deletions Tophat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
8030162C292C1B490016F25E /* ApplicationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8030162B292C1B490016F25E /* ApplicationError.swift */; };
80318D1C2927EC4D002A5FD9 /* LaunchRequestBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80318D1B2927EC4D002A5FD9 /* LaunchRequestBuilder.swift */; };
80318D1E2927EC54002A5FD9 /* LaunchRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80318D1D2927EC54002A5FD9 /* LaunchRequest.swift */; };
80318D2C2928123F002A5FD9 /* ios-deploy in Copy ios-deploy */ = {isa = PBXBuildFile; fileRef = 80318D2629281216002A5FD9 /* ios-deploy */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
80346F042BEBD527002F54BC /* AsyncAlgorithms in Frameworks */ = {isa = PBXBuildFile; productRef = 80346F032BEBD527002F54BC /* AsyncAlgorithms */; };
803B874B290055C70062F070 /* AndroidDeviceKit in Frameworks */ = {isa = PBXBuildFile; productRef = 803B874A290055C70062F070 /* AndroidDeviceKit */; };
804ECB7C2975C15300DE78F4 /* DevicePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 804ECB7B2975C15300DE78F4 /* DevicePicker.swift */; };
Expand Down Expand Up @@ -166,27 +165,6 @@
remoteGlobalIDString = 7F35024E24A5060500EE76EA;
remoteInfo = Tophat;
};
80318D2529281216002A5FD9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 80318D2029281216002A5FD9 /* ios-deploy.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 7E70898E1B587BF3004D23AA;
remoteInfo = "ios-deploy";
};
80318D2729281216002A5FD9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 80318D2029281216002A5FD9 /* ios-deploy.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 7E8E3A831C45D4CE0017F6C1;
remoteInfo = "ios-deploy-tests";
};
80318D2929281221002A5FD9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 80318D2029281216002A5FD9 /* ios-deploy.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 7E70898D1B587BF3004D23AA;
remoteInfo = "ios-deploy";
};
807D7B17298357A7007942B4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 7F35024724A5060500EE76EA /* Project object */;
Expand All @@ -197,17 +175,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
80318D2B29281226002A5FD9 /* Copy ios-deploy */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 6;
files = (
80318D2C2928123F002A5FD9 /* ios-deploy in Copy ios-deploy */,
);
name = "Copy ios-deploy";
runOnlyForDeploymentPostprocessing = 0;
};
807D7B0529835756007942B4 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -260,7 +227,6 @@
8030162B292C1B490016F25E /* ApplicationError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationError.swift; sourceTree = "<group>"; };
80318D1B2927EC4D002A5FD9 /* LaunchRequestBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchRequestBuilder.swift; sourceTree = "<group>"; };
80318D1D2927EC54002A5FD9 /* LaunchRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchRequest.swift; sourceTree = "<group>"; };
80318D2029281216002A5FD9 /* ios-deploy.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "ios-deploy.xcodeproj"; path = "Vendor/ios-deploy/ios-deploy.xcodeproj"; sourceTree = "<group>"; };
804ECB7B2975C15300DE78F4 /* DevicePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DevicePicker.swift; sourceTree = "<group>"; };
804ECB7D2975C18300DE78F4 /* DeviceMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceMenu.swift; sourceTree = "<group>"; };
804ECB7F2975C68400DE78F4 /* VisibleWhenButtonHoveredViewModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisibleWhenButtonHoveredViewModifier.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -420,7 +386,6 @@
7F35026724A5060700EE76EA /* TophatTests */,
807D7B0829835756007942B4 /* TophatCtl */,
8086AE3628F9E8680069217E /* TophatModules */,
80318D2029281216002A5FD9 /* ios-deploy.xcodeproj */,
7F35025024A5060500EE76EA /* Products */,
8086AE3728F9F01F0069217E /* Frameworks */,
);
Expand Down Expand Up @@ -476,15 +441,6 @@
path = Models;
sourceTree = "<group>";
};
80318D2129281216002A5FD9 /* Products */ = {
isa = PBXGroup;
children = (
80318D2629281216002A5FD9 /* ios-deploy */,
80318D2829281216002A5FD9 /* ios-deploy-tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
804FF6572914237D00147652 /* Extensions */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -746,14 +702,12 @@
7F35024B24A5060500EE76EA /* Sources */,
7F35024C24A5060500EE76EA /* Frameworks */,
807D7B19298357AE007942B4 /* Copy tophatctl */,
80318D2B29281226002A5FD9 /* Copy ios-deploy */,
7F35024D24A5060500EE76EA /* Resources */,
);
buildRules = (
);
dependencies = (
807D7B18298357A7007942B4 /* PBXTargetDependency */,
80318D2A29281221002A5FD9 /* PBXTargetDependency */,
);
name = Tophat;
packageProductDependencies = (
Expand Down Expand Up @@ -859,12 +813,6 @@
);
productRefGroup = 7F35025024A5060500EE76EA /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 80318D2129281216002A5FD9 /* Products */;
ProjectRef = 80318D2029281216002A5FD9 /* ios-deploy.xcodeproj */;
},
);
projectRoot = "";
targets = (
7F35024E24A5060500EE76EA /* Tophat */,
Expand All @@ -874,23 +822,6 @@
};
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
80318D2629281216002A5FD9 /* ios-deploy */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.executable";
path = "ios-deploy";
remoteRef = 80318D2529281216002A5FD9 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
80318D2829281216002A5FD9 /* ios-deploy-tests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "ios-deploy-tests.xctest";
remoteRef = 80318D2729281216002A5FD9 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
7F35024D24A5060500EE76EA /* Resources */ = {
isa = PBXResourcesBuildPhase;
Expand Down Expand Up @@ -1091,11 +1022,6 @@
target = 7F35024E24A5060500EE76EA /* Tophat */;
targetProxy = 7F35026524A5060600EE76EA /* PBXContainerItemProxy */;
};
80318D2A29281221002A5FD9 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "ios-deploy";
targetProxy = 80318D2929281221002A5FD9 /* PBXContainerItemProxy */;
};
807D7B18298357A7007942B4 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 807D7B0629835756007942B4 /* tophatctl */;
Expand Down
18 changes: 1 addition & 17 deletions TophatModules/Sources/AppleDeviceKit/AppleDevices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,7 @@ public struct AppleDevices: DeviceProvider {

private static var physicalDevices: [ConnectedDevice] {
get async {
return await withTaskGroup(of: [ConnectedDevice].self) { group in
group.addTask {
(try? DeviceCtl.listAvailableDevices())?.filter(\.isCoreDeviceOnly) ?? []
}

group.addTask {
await iOSDeploy.listAvailableDevices().filter(\.isMobileDeviceOnly)
}

var devices: [ConnectedDevice] = []

for await deviceSubset in group {
devices.append(contentsOf: deviceSubset)
}

return devices
}
(try? DeviceCtl.listAvailableDevices()) ?? []
}
}
}
20 changes: 3 additions & 17 deletions TophatModules/Sources/AppleDeviceKit/ConnectedDevice+Device.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,21 @@ extension ConnectedDevice: Device {

var isLocked: Bool {
get async throws {
if isMobileDeviceOnly {
// There is no way of checking with the old stack.
return false
} else {
return try await DeviceCtl.isLocked(udid: id)
}
try await DeviceCtl.isLocked(udid: id)
}
}

func install(application: Application) throws {
do {
if isMobileDeviceOnly {
try iOSDeploy.install(udid: id, bundleUrl: application.url, noWifi: connection == .direct)
} else {
try DeviceCtl.install(udid: id, bundleUrl: application.url)

}
try DeviceCtl.install(udid: id, bundleUrl: application.url)
} catch {
throw DeviceError.failedToInstallApp(bundleUrl: application.url, deviceType: type)
}
}

func launch(application: Application, arguments: [String]? = nil) throws {
do {
if isMobileDeviceOnly {
try iOSDeploy.launch(udid: id, bundleId: application.bundleIdentifier, noWifi: connection == .direct)
} else {
try DeviceCtl.launch(udid: id, bundleId: application.bundleIdentifier, arguments: arguments ?? [])
}
try DeviceCtl.launch(udid: id, bundleId: application.bundleIdentifier, arguments: arguments ?? [])
} catch {
let bundleIdentifier = try application.bundleIdentifier
throw DeviceError.failedToLaunchApp(
Expand Down

This file was deleted.

15 changes: 0 additions & 15 deletions TophatModules/Sources/AppleDeviceKit/Models/ConnectedDevice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ struct ConnectedDevice {
let productVersion: String
let connectionState: ConnectionState

var isMobileDeviceOnly: Bool {
guard
let majorVersionString = productVersion.split(separator: ".").first,
let majorVersion = Int(majorVersionString)
else {
return false
}

return majorVersion < 17
}

var isCoreDeviceOnly: Bool {
!isMobileDeviceOnly
}

enum Interface {
case usb
case wifi
Expand Down
69 changes: 0 additions & 69 deletions TophatModules/Sources/AppleDeviceKit/Utilities/iOSDeploy.swift

This file was deleted.

1 change: 0 additions & 1 deletion Vendor/ios-deploy
Submodule ios-deploy deleted from 975fad

0 comments on commit f40fcff

Please sign in to comment.