simtap 0.0.0-stage → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +192 -2
  3. package/THIRD_PARTY_LICENSES +61 -0
  4. package/bin/simtap.js +4 -0
  5. package/dist/act/diff.js +67 -0
  6. package/dist/act/resolve.js +49 -0
  7. package/dist/act/steps.js +188 -0
  8. package/dist/cli.js +123 -0
  9. package/dist/engine/apps.js +153 -0
  10. package/dist/engine/axe.js +107 -0
  11. package/dist/engine/exec.js +36 -0
  12. package/dist/engine/jobs.js +95 -0
  13. package/dist/engine/logs.js +115 -0
  14. package/dist/engine/simctl.js +191 -0
  15. package/dist/engine/state.js +30 -0
  16. package/dist/engine/xcode.js +253 -0
  17. package/dist/engine/xcresult.js +95 -0
  18. package/dist/errors.js +11 -0
  19. package/dist/look/read.js +50 -0
  20. package/dist/look/snapshot.js +455 -0
  21. package/dist/mcp.js +108 -0
  22. package/dist/registry.js +65 -0
  23. package/dist/tools/app-control.js +127 -0
  24. package/dist/tools/app-logs.js +128 -0
  25. package/dist/tools/app-run.js +94 -0
  26. package/dist/tools/device-use.js +68 -0
  27. package/dist/tools/devices.js +26 -0
  28. package/dist/tools/jobs.js +55 -0
  29. package/dist/tools/launch-app.js +68 -0
  30. package/dist/tools/screen-record.js +79 -0
  31. package/dist/tools/tests-run.js +81 -0
  32. package/dist/tools/types.js +2 -0
  33. package/dist/tools/ui-act.js +435 -0
  34. package/dist/tools/ui-look.js +40 -0
  35. package/package.json +45 -4
  36. package/skill/SKILL.md +23 -0
  37. package/vendor/axe/.version +1 -0
  38. package/vendor/axe/AXe_AXe.bundle/skills/axe/SKILL.md +87 -0
  39. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/FBControlCore +0 -0
  40. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBAccessibilityTraits.h +23 -0
  41. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBArchitecture.h +20 -0
  42. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBArchiveOperations.h +136 -0
  43. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBBinaryDescriptor.h +73 -0
  44. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCore-Swift.h +3232 -0
  45. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCore-SwiftImport.h +28 -0
  46. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCore.h +47 -0
  47. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCoreFrameworkLoader.h +104 -0
  48. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCoreLogger+OSLog.h +30 -0
  49. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCoreLogger.h +107 -0
  50. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBCrashLog.h +20 -0
  51. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBDataBuffer.h +75 -0
  52. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBDataConsumer.h +173 -0
  53. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFileContainer.h +46 -0
  54. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFileReader.h +25 -0
  55. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFourCharCode.h +30 -0
  56. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFuture+Sync.h +104 -0
  57. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFuture.h +580 -0
  58. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFutureContextManager.h +61 -0
  59. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBInstalledApplication.h +30 -0
  60. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBInstrumentsCommands.h +29 -0
  61. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBInstrumentsOperation.h +83 -0
  62. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBObjCExceptionGuard.h +59 -0
  63. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessBuilder.h +272 -0
  64. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessFetcher.h +128 -0
  65. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessIO.h +126 -0
  66. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessStream.h +175 -0
  67. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessTerminationStrategy.h +25 -0
  68. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBScreenshotCommands.h +15 -0
  69. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBSettingsCommands.h +22 -0
  70. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBSocketServer.h +63 -0
  71. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBSubprocess.h +131 -0
  72. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBVideoStream.h +255 -0
  73. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBVideoStreamConfiguration.h +51 -0
  74. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBXCTraceOperation.h +13 -0
  75. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBiOSTarget.h +69 -0
  76. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBiOSTargetConfiguration.h +322 -0
  77. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBiOSTargetConstants.h +48 -0
  78. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBiOSTargetOperation.h +18 -0
  79. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo +0 -0
  80. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo +0 -0
  81. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.abi.json +51890 -0
  82. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.private.swiftinterface +1341 -0
  83. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.swiftdoc +0 -0
  84. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.swiftinterface +1341 -0
  85. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.swiftmodule +0 -0
  86. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.abi.json +51890 -0
  87. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.private.swiftinterface +1341 -0
  88. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.swiftdoc +0 -0
  89. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.swiftinterface +1341 -0
  90. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.swiftmodule +0 -0
  91. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/module.modulemap +10 -0
  92. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Resources/Info.plist +50 -0
  93. package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/_CodeSignature/CodeResources +492 -0
  94. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/FBDeviceControl +0 -0
  95. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAFCConnection.h +135 -0
  96. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMDServiceConnection.h +239 -0
  97. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMDefines.h +256 -0
  98. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMDevice.h +105 -0
  99. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMDeviceManager.h +59 -0
  100. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMRestorableDevice.h +72 -0
  101. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMRestorableDeviceManager.h +32 -0
  102. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDevice.h +89 -0
  103. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceCommands.h +147 -0
  104. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceControl-Swift.h +1500 -0
  105. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceControl.h +24 -0
  106. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceControlFrameworkLoader.h +25 -0
  107. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceDebugSymbolsCommands.h +29 -0
  108. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceManager.h +118 -0
  109. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBInstrumentsClient.h +49 -0
  110. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo +0 -0
  111. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo +0 -0
  112. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.abi.json +16073 -0
  113. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.private.swiftinterface +398 -0
  114. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.swiftdoc +0 -0
  115. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.swiftinterface +398 -0
  116. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.swiftmodule +0 -0
  117. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.abi.json +16073 -0
  118. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.private.swiftinterface +398 -0
  119. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.swiftdoc +0 -0
  120. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.swiftinterface +398 -0
  121. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.swiftmodule +0 -0
  122. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/module.modulemap +10 -0
  123. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Resources/Info.plist +50 -0
  124. package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/_CodeSignature/CodeResources +324 -0
  125. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/FBSimulatorControl +0 -0
  126. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBFramebuffer.h +24 -0
  127. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBPeriodicStatsTimer.h +43 -0
  128. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimDeviceWrapper.h +86 -0
  129. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulator.h +160 -0
  130. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorBootConfiguration.h +18 -0
  131. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorControl-Swift.h +2270 -0
  132. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorControl.h +21 -0
  133. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorControlFrameworkLoader.h +45 -0
  134. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorVideoStream.h +153 -0
  135. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo +0 -0
  136. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo +0 -0
  137. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.abi.json +46980 -0
  138. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.private.swiftinterface +1072 -0
  139. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.swiftdoc +0 -0
  140. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.swiftinterface +1072 -0
  141. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.swiftmodule +0 -0
  142. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.abi.json +46980 -0
  143. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.private.swiftinterface +1072 -0
  144. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.swiftdoc +0 -0
  145. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.swiftinterface +1072 -0
  146. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.swiftmodule +0 -0
  147. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/module.modulemap +10 -0
  148. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Resources/Info.plist +50 -0
  149. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Resources/README.md +124 -0
  150. package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/_CodeSignature/CodeResources +293 -0
  151. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBActivityRecord.h +33 -0
  152. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBAttachment.h +25 -0
  153. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBCodeCoverageConfiguration.h +15 -0
  154. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestBundleConnection.h +37 -0
  155. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestConfiguration.h +74 -0
  156. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestManagerAPIMediator.h +46 -0
  157. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestManagerResultSummary.h +19 -0
  158. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestReporterAdapter.h +27 -0
  159. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBXCTestConfiguration.h +30 -0
  160. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/XCTestBootstrap-Swift.h +1570 -0
  161. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/XCTestBootstrap.h +22 -0
  162. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/XCTestBootstrapError.h +25 -0
  163. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo +0 -0
  164. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo +0 -0
  165. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.abi.json +15972 -0
  166. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.private.swiftinterface +397 -0
  167. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.swiftdoc +0 -0
  168. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.swiftinterface +397 -0
  169. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.swiftmodule +0 -0
  170. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.abi.json +15972 -0
  171. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.private.swiftinterface +397 -0
  172. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.swiftdoc +0 -0
  173. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.swiftinterface +397 -0
  174. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.swiftmodule +0 -0
  175. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/module.modulemap +13 -0
  176. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Resources/Info.plist +50 -0
  177. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/XCTestBootstrap +0 -0
  178. package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/_CodeSignature/CodeResources +303 -0
  179. package/vendor/axe/axe +0 -0
@@ -0,0 +1,72 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import <FBControlCore/FBControlCore.h>
11
+ #import <FBDeviceControl/FBAMDefines.h>
12
+ #import <FBDeviceControl/FBDeviceCommands.h>
13
+
14
+ /**
15
+ An Object Wrapper around AMRestorableDevice
16
+ */
17
+ @interface FBAMRestorableDevice : NSObject <FBiOSTargetInfo, FBDeviceProtocol>
18
+
19
+ #pragma mark - FBiOSTargetInfo Protocol Members
20
+ // Declared explicitly for Swift visibility since FBiOSTargetInfo is Swift-defined.
21
+ @property (nonnull, nonatomic, readonly, copy) NSString *uniqueIdentifier;
22
+ @property (nonnull, nonatomic, readonly, copy) NSString *udid;
23
+ @property (nonnull, nonatomic, readonly, copy) NSString *name;
24
+ @property (nonnull, nonatomic, readonly, strong) FBDeviceType *deviceType;
25
+ @property (nonnull, nonatomic, readonly, copy) NSArray<FBArchitecture> *architectures;
26
+ @property (nonnull, nonatomic, readonly, strong) FBOSVersion *osVersion;
27
+ @property (nonnull, nonatomic, readonly, copy) NSDictionary<NSString *, id> *extendedInformation;
28
+ @property (nonatomic, readonly, assign) FBiOSTargetType targetType;
29
+ @property (nonatomic, readonly, assign) FBiOSTargetState state;
30
+
31
+ /**
32
+ The Designated Initializer.
33
+
34
+ @param calls the calls to use.
35
+ @param restorableDevice the AMRestorableDeviceRef
36
+ @param allValues the cached device values.
37
+ @param workQueue the queue on which work should be serialized.
38
+ @param asyncQueue the queue on which asynchronous work can be performed sequentially.
39
+ @param logger the logger to use.
40
+ @return a new instance.
41
+ */
42
+ - (nonnull instancetype)initWithCalls:(AMDCalls)calls restorableDevice:(AMRestorableDeviceRef _Nonnull)restorableDevice allValues:(nonnull NSDictionary<NSString *, id> *)allValues workQueue:(nonnull dispatch_queue_t)workQueue asyncQueue:(nonnull dispatch_queue_t)asyncQueue logger:(nonnull id<FBControlCoreLogger>)logger;
43
+
44
+ /**
45
+ The Restorable Device instance.
46
+ */
47
+ @property (nonatomic, readwrite, assign) AMRestorableDeviceRef _Nonnull restorableDevice;
48
+
49
+ /**
50
+ Cached Device Values.
51
+ */
52
+ @property (nonnull, nonatomic, readwrite, copy) NSDictionary<NSString *, id> *allValues;
53
+
54
+ /**
55
+ The queue on which work should be serialized.
56
+ */
57
+ @property (nonnull, nonatomic, readonly, strong) dispatch_queue_t workQueue;
58
+
59
+ /**
60
+ The queue on which asynchronous work can be performed sequentially.
61
+ */
62
+ @property (nonnull, nonatomic, readonly, strong) dispatch_queue_t asyncQueue;
63
+
64
+ /**
65
+ Convert AMRestorableDeviceState to FBiOSTargetState.
66
+
67
+ @param state the state integer.
68
+ @return the FBiOSTargetState corresponding to the AMRestorableDeviceState
69
+ */
70
+ + (FBiOSTargetState)targetStateForDeviceState:(AMRestorableDeviceState)state;
71
+
72
+ @end
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import <FBDeviceControl/FBAMDefines.h>
11
+ #import <FBDeviceControl/FBDeviceManager.h>
12
+
13
+ @class FBAMRestorableDevice;
14
+
15
+ /**
16
+ Class for obtaining FBAMRestorableDevice instances.
17
+ */
18
+ @interface FBAMRestorableDeviceManager : FBDeviceManager <FBAMRestorableDevice *>
19
+
20
+ /**
21
+ The Designated Initializer
22
+
23
+ @param calls the AMDCalls to use.
24
+ @param workQueue the queue on which work should be serialized.
25
+ @param asyncQueue the queue on which asynchronous work can be performed sequentially.
26
+ @param ecidFilter an ECID filter to apply, or `nil` to accept all devices.
27
+ @param logger the logger to use.
28
+ @return a new FBAMRestorableDeviceManager instance
29
+ */
30
+ - (nonnull instancetype)initWithCalls:(AMDCalls)calls workQueue:(nonnull dispatch_queue_t)workQueue asyncQueue:(nonnull dispatch_queue_t)asyncQueue ecidFilter:(nullable NSString *)ecidFilter logger:(nonnull id<FBControlCoreLogger>)logger;
31
+
32
+ @end
@@ -0,0 +1,89 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import <FBControlCore/FBControlCore.h>
11
+ #import <FBDeviceControl/FBDeviceCommands.h>
12
+ #import <FBDeviceControl/FBDeviceDebugSymbolsCommands.h>
13
+
14
+ @class FBAMDevice;
15
+ @class FBAMRestorableDevice;
16
+ @class FBDeviceSet;
17
+ @class FBDeviceVideoRecordingCommands;
18
+ @class FBDeviceXCTestCommands;
19
+ @class FBTargetCommandCache;
20
+ @protocol FBControlCoreLogger;
21
+
22
+ /**
23
+ A class that represents an iOS Device.
24
+ */
25
+ @interface FBDevice : NSObject <FBiOSTarget, FBDeviceCommands>
26
+
27
+ #pragma mark - FBiOSTarget / FBiOSTargetInfo Protocol Members
28
+ // These are implemented via @synthesize or method implementations in FBDevice.m.
29
+ // They must be declared explicitly for Swift visibility since the protocols are Swift-defined.
30
+
31
+ @property (nonnull, nonatomic, readonly, copy) NSString *uniqueIdentifier;
32
+ @property (nonnull, nonatomic, readonly, copy) NSString *udid;
33
+ @property (nonnull, nonatomic, readonly, copy) NSString *name;
34
+ @property (nonnull, nonatomic, readonly, strong) FBDeviceType *deviceType;
35
+ @property (nonnull, nonatomic, readonly, copy) NSArray<FBArchitecture> *architectures;
36
+ @property (nonnull, nonatomic, readonly, strong) FBOSVersion *osVersion;
37
+ @property (nonnull, nonatomic, readonly, copy) NSDictionary<NSString *, id> *extendedInformation;
38
+ @property (nonatomic, readonly, assign) FBiOSTargetType targetType;
39
+ @property (nonatomic, readonly, assign) FBiOSTargetState state;
40
+ @property (nullable, nonatomic, readonly, strong) id<FBControlCoreLogger> logger;
41
+ @property (nullable, nonatomic, readonly, copy) NSString *customDeviceSetPath;
42
+ @property (nonnull, nonatomic, readonly, strong) FBTemporaryDirectory *temporaryDirectory;
43
+ @property (nonnull, nonatomic, readonly, copy) NSString *auxillaryDirectory;
44
+ @property (nonnull, nonatomic, readonly, copy) NSString *runtimeRootDirectory;
45
+ @property (nonnull, nonatomic, readonly, copy) NSString *platformRootDirectory;
46
+ @property (nullable, nonatomic, readonly, strong) FBiOSTargetScreenInfo *screenInfo;
47
+ @property (nonnull, nonatomic, readonly, strong) dispatch_queue_t workQueue;
48
+ @property (nonnull, nonatomic, readonly, strong) dispatch_queue_t asyncQueue;
49
+ - (NSComparisonResult)compare:(nonnull id<FBiOSTarget>)target;
50
+ - (BOOL)requiresBundlesToBeSigned;
51
+ - (nonnull NSDictionary<NSString *, NSString *> *)replacementMapping;
52
+ - (nonnull NSDictionary<NSString *, NSString *> *)environmentAdditions;
53
+
54
+ // Forwarded command methods declared for ObjC/Swift visibility
55
+ - (nonnull FBFuture<NSNull *> *)activate;
56
+ - (nonnull FBFuture<NSNull *> *)enterRecovery;
57
+ - (nonnull FBFuture<NSNull *> *)exitRecovery;
58
+ - (nonnull FBFuture *)ensureDeveloperDiskImageIsMounted;
59
+ - (nonnull FBFuture<FBInstalledApplication *> *)installedApplicationWithBundleID:(nonnull NSString *)bundleID;
60
+
61
+ /**
62
+ The Device Set to which the Device Belongs.
63
+ */
64
+ @property (nullable, nonatomic, readonly, weak) FBDeviceSet *set;
65
+
66
+ /**
67
+ Constructs an Operating System Version from a string.
68
+
69
+ @param string the string to interpolate.
70
+ @return an NSOperatingSystemVersion for the string.
71
+ */
72
+ + (NSOperatingSystemVersion)operatingSystemVersionFromString:(nonnull NSString *)string;
73
+
74
+ #pragma mark - Should be marked private when converting to Swift
75
+
76
+ @property (nullable, nonatomic, readwrite, strong) FBAMDevice *amDevice;
77
+ @property (nullable, nonatomic, readwrite, strong) FBAMRestorableDevice *restorableDevice;
78
+ @property (nonnull, nonatomic, readonly, strong) FBTargetCommandCache *commandCache;
79
+
80
+ - (nonnull instancetype)initWithSet:(nonnull FBDeviceSet *)set amDevice:(nullable FBAMDevice *)amDevice restorableDevice:(nullable FBAMRestorableDevice *)restorableDevice logger:(nonnull id<FBControlCoreLogger>)logger;
81
+
82
+ @end
83
+
84
+ // Imported after @interface FBDevice so Swift-generated category extensions
85
+ // (e.g. `extension FBDevice: FBSomeProtocol`) can attach to the fully-defined
86
+ // class.
87
+ #if __has_include(<FBDeviceControl/FBDeviceControl-Swift.h>)
88
+ #import <FBDeviceControl/FBDeviceControl-Swift.h>
89
+ #endif
@@ -0,0 +1,147 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import <FBControlCore/FBControlCore.h>
11
+ #import <FBDeviceControl/FBAMDefines.h>
12
+
13
+ @class FBAFCConnection;
14
+ @class FBAMDServiceConnection;
15
+ @class FBDeveloperDiskImage;
16
+ @class FBDeviceLinkClient;
17
+
18
+ /**
19
+ An enum representing the activation state of the device.
20
+ */
21
+ typedef NSString *FBDeviceActivationState NS_STRING_ENUM;
22
+ extern FBDeviceActivationState _Nonnull const FBDeviceActivationStateUnknown;
23
+ extern FBDeviceActivationState _Nonnull const FBDeviceActivationStateUnactivated;
24
+ extern FBDeviceActivationState _Nonnull const FBDeviceActivationStateActivated;
25
+
26
+ /**
27
+ A string enum representing keys within device information.
28
+ */
29
+ typedef NSString *FBDeviceKey NS_STRING_ENUM;
30
+ extern FBDeviceKey _Nonnull const FBDeviceKeyChipID;
31
+ extern FBDeviceKey _Nonnull const FBDeviceKeyDeviceClass;
32
+ extern FBDeviceKey _Nonnull const FBDeviceKeyDeviceName;
33
+ extern FBDeviceKey _Nonnull const FBDeviceKeyLocationID;
34
+ extern FBDeviceKey _Nonnull const FBDeviceKeyProductType;
35
+ extern FBDeviceKey _Nonnull const FBDeviceKeySerialNumber;
36
+ extern FBDeviceKey _Nonnull const FBDeviceKeyUniqueChipID;
37
+ extern FBDeviceKey _Nonnull const FBDeviceKeyUniqueDeviceID;
38
+ extern FBDeviceKey _Nonnull const FBDeviceKeyCPUArchitecture;
39
+ extern FBDeviceKey _Nonnull const FBDeviceKeyBuildVersion;
40
+ extern FBDeviceKey _Nonnull const FBDeviceKeyProductVersion;
41
+ extern FBDeviceKey _Nonnull const FBDeviceKeyActivationState;
42
+ extern FBDeviceKey _Nonnull const FBDeviceKeyIsPaired;
43
+
44
+ /**
45
+ Coerce an Activation State string to the String Enum
46
+
47
+ @param activationState the string representation of the activation state.
48
+ @return a FBDeviceActivationState string enum.
49
+ */
50
+ extern FBDeviceActivationState _Nonnull FBDeviceActivationStateCoerceFromString(NSString * _Nonnull activationState);
51
+
52
+ /**
53
+ Defines properties that are required on classes related to the implementation of FBDevice.
54
+ */
55
+ @protocol FBDeviceProtocol <NSObject>
56
+
57
+ /**
58
+ The AMDevice Calls to use.
59
+ */
60
+ @property (nonatomic, readonly, assign) AMDCalls calls;
61
+
62
+ /**
63
+ The underlying AMDeviceRef.
64
+ This may be NULL.
65
+ */
66
+ @property (nullable, nonatomic, readonly, assign) AMDeviceRef amDeviceRef;
67
+
68
+ /**
69
+ The underlying AMRecoveryModeDeviceRef if in recovery.
70
+ This may be NULL.
71
+ */
72
+ @property (nullable, nonatomic, readonly, assign) AMRecoveryModeDeviceRef recoveryModeDeviceRef;
73
+
74
+ /**
75
+ The Device's Logger.
76
+ */
77
+ @property (nonnull, nonatomic, readonly, strong) id<FBControlCoreLogger> logger;
78
+
79
+ /**
80
+ The Device's 'Product Version'.
81
+ */
82
+ @property (nullable, nonatomic, readonly, copy) NSString *productVersion;
83
+
84
+ /**
85
+ The Device's 'Build Version'.
86
+ */
87
+ @property (nullable, nonatomic, readonly, copy) NSString *buildVersion;
88
+
89
+ /**
90
+ The Device's 'Activation State'.
91
+ */
92
+ @property (nonnull, nonatomic, readonly, assign) FBDeviceActivationState activationState;
93
+
94
+ /**
95
+ All of the Device Values available.
96
+ */
97
+ @property (nonnull, nonatomic, readonly, copy) NSDictionary<NSString *, id> *allValues;
98
+
99
+ @end
100
+
101
+ /**
102
+ Defines Device-Specific commands, off which others are based.
103
+ */
104
+ @protocol FBDeviceCommands <FBDeviceProtocol>
105
+
106
+ /**
107
+ Obtain the connection for a device.
108
+
109
+ @param purpose the purpose of the connection
110
+ @return a connection wrapped in an async context.
111
+ */
112
+ - (nonnull FBFutureContext<id<FBDeviceCommands>> *)connectToDeviceWithPurpose:(nonnull NSString *)purpose;
113
+
114
+ /**
115
+ Starts a Service on the AMDevice.
116
+
117
+ @param service the service name
118
+ @return a Future wrapping the FBAMDServiceConnection.
119
+ */
120
+ - (nonnull FBFutureContext<FBAMDServiceConnection *> *)startService:(nonnull NSString *)service;
121
+
122
+ /**
123
+ Starts a Service, wrapping it in a "Device Link" Plist client.
124
+
125
+ @param service the service name.
126
+ @return a Future context wrapping the FBDeviceLinkClient.
127
+ */
128
+ - (nonnull FBFutureContext<FBDeviceLinkClient *> *)startDeviceLinkService:(nonnull NSString *)service;
129
+
130
+ /**
131
+ Starts a Service, wrapping it in an "AFC" Client.
132
+
133
+ @param service the service name.
134
+ @return a Future wrapping the AFC connection.
135
+ */
136
+ - (nonnull FBFutureContext<FBAFCConnection *> *)startAFCService:(nonnull NSString *)service;
137
+
138
+ /**
139
+ Starts house arrest for a given bundle id.
140
+
141
+ @param bundleID the bundle id to use.
142
+ @param afcCalls the AFC calls to inject
143
+ @return a Future context wrapping the AFC Connection.
144
+ */
145
+ - (nonnull FBFutureContext<FBAFCConnection *> *)houseArrestAFCConnectionForBundleID:(nonnull NSString *)bundleID afcCalls:(AFCCalls)afcCalls;
146
+
147
+ @end