From 584adc5014d8eaa200a52c726d8b26c31d8d748f Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Mon, 25 Aug 2025 15:53:01 -0600 Subject: [PATCH] Create xcproj for idevice++ --- .gitignore | 1 + cpp/idevice++.xcodeproj/project.pbxproj | 497 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/xcschemes/idevice++.xcscheme | 67 +++ cpp/xcode_build_rust.sh | 130 +++++ 5 files changed, 702 insertions(+) create mode 100644 cpp/idevice++.xcodeproj/project.pbxproj create mode 100644 cpp/idevice++.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 cpp/idevice++.xcodeproj/xcshareddata/xcschemes/idevice++.xcscheme create mode 100755 cpp/xcode_build_rust.sh diff --git a/.gitignore b/.gitignore index 9a67810..e03e4e3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ bundle.zip /swift/include/*.h /swift/.build /swift/.swiftpm +xcuserdata diff --git a/cpp/idevice++.xcodeproj/project.pbxproj b/cpp/idevice++.xcodeproj/project.pbxproj new file mode 100644 index 0000000..fda15b7 --- /dev/null +++ b/cpp/idevice++.xcodeproj/project.pbxproj @@ -0,0 +1,497 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 198077932E5CA6EF00CB501E /* adapter_stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1980776C2E5CA69800CB501E /* adapter_stream.cpp */; }; + 198077942E5CA6EF00CB501E /* app_service.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1980776D2E5CA69800CB501E /* app_service.cpp */; }; + 198077952E5CA6EF00CB501E /* core_device.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1980776E2E5CA69800CB501E /* core_device.cpp */; }; + 198077962E5CA6EF00CB501E /* debug_proxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1980776F2E5CA69800CB501E /* debug_proxy.cpp */; }; + 198077972E5CA6EF00CB501E /* diagnosticsservice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077702E5CA69800CB501E /* diagnosticsservice.cpp */; }; + 198077982E5CA6EF00CB501E /* ffi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077712E5CA69800CB501E /* ffi.cpp */; }; + 198077992E5CA6EF00CB501E /* idevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077722E5CA69800CB501E /* idevice.cpp */; }; + 1980779A2E5CA6EF00CB501E /* location_simulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077732E5CA69800CB501E /* location_simulation.cpp */; }; + 1980779B2E5CA6EF00CB501E /* lockdown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077742E5CA69800CB501E /* lockdown.cpp */; }; + 1980779C2E5CA6EF00CB501E /* pairing_file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077752E5CA69800CB501E /* pairing_file.cpp */; }; + 1980779D2E5CA6EF00CB501E /* provider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077762E5CA69800CB501E /* provider.cpp */; }; + 1980779E2E5CA6EF00CB501E /* remote_server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077772E5CA69800CB501E /* remote_server.cpp */; }; + 1980779F2E5CA6EF00CB501E /* rsd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077782E5CA69800CB501E /* rsd.cpp */; }; + 198077A02E5CA6EF00CB501E /* tcp_callback_feeder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 198077792E5CA69800CB501E /* tcp_callback_feeder.cpp */; }; + 198077A12E5CA6EF00CB501E /* usbmuxd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1980777A2E5CA69800CB501E /* usbmuxd.cpp */; }; + 198077B72E5CA6FC00CB501E /* core_device_proxy.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077A62E5CA6FC00CB501E /* core_device_proxy.hpp */; }; + 198077B82E5CA6FC00CB501E /* pairing_file.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077AD2E5CA6FC00CB501E /* pairing_file.hpp */; }; + 198077B92E5CA6FC00CB501E /* bindings.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077A52E5CA6FC00CB501E /* bindings.hpp */; }; + 198077BA2E5CA6FC00CB501E /* diagnosticsservice.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077A82E5CA6FC00CB501E /* diagnosticsservice.hpp */; }; + 198077BB2E5CA6FC00CB501E /* idevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 198077B52E5CA6FC00CB501E /* idevice.h */; }; + 198077BC2E5CA6FC00CB501E /* debug_proxy.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077A72E5CA6FC00CB501E /* debug_proxy.hpp */; }; + 198077BD2E5CA6FC00CB501E /* ffi.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077A92E5CA6FC00CB501E /* ffi.hpp */; }; + 198077BE2E5CA6FC00CB501E /* rsd.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077B12E5CA6FC00CB501E /* rsd.hpp */; }; + 198077BF2E5CA6FC00CB501E /* tcp_object_stack.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077B22E5CA6FC00CB501E /* tcp_object_stack.hpp */; }; + 198077C02E5CA6FC00CB501E /* remote_server.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077B02E5CA6FC00CB501E /* remote_server.hpp */; }; + 198077C12E5CA6FC00CB501E /* readwrite.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077AF2E5CA6FC00CB501E /* readwrite.hpp */; }; + 198077C22E5CA6FC00CB501E /* location_simulation.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077AB2E5CA6FC00CB501E /* location_simulation.hpp */; }; + 198077C32E5CA6FC00CB501E /* adapter_stream.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077A32E5CA6FC00CB501E /* adapter_stream.hpp */; }; + 198077C42E5CA6FC00CB501E /* lockdown.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077AC2E5CA6FC00CB501E /* lockdown.hpp */; }; + 198077C52E5CA6FC00CB501E /* usbmuxd.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077B32E5CA6FC00CB501E /* usbmuxd.hpp */; }; + 198077C62E5CA6FC00CB501E /* app_service.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077A42E5CA6FC00CB501E /* app_service.hpp */; }; + 198077C72E5CA6FC00CB501E /* idevice.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077AA2E5CA6FC00CB501E /* idevice.hpp */; }; + 198077C82E5CA6FC00CB501E /* provider.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 198077AE2E5CA6FC00CB501E /* provider.hpp */; }; + 198077DF2E5CCA2900CB501E /* libidevice_ffi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 198077DB2E5CC33000CB501E /* libidevice_ffi.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1980776C2E5CA69800CB501E /* adapter_stream.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = adapter_stream.cpp; sourceTree = ""; }; + 1980776D2E5CA69800CB501E /* app_service.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = app_service.cpp; sourceTree = ""; }; + 1980776E2E5CA69800CB501E /* core_device.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = core_device.cpp; sourceTree = ""; }; + 1980776F2E5CA69800CB501E /* debug_proxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = debug_proxy.cpp; sourceTree = ""; }; + 198077702E5CA69800CB501E /* diagnosticsservice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = diagnosticsservice.cpp; sourceTree = ""; }; + 198077712E5CA69800CB501E /* ffi.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ffi.cpp; sourceTree = ""; }; + 198077722E5CA69800CB501E /* idevice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = idevice.cpp; sourceTree = ""; }; + 198077732E5CA69800CB501E /* location_simulation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = location_simulation.cpp; sourceTree = ""; }; + 198077742E5CA69800CB501E /* lockdown.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = lockdown.cpp; sourceTree = ""; }; + 198077752E5CA69800CB501E /* pairing_file.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = pairing_file.cpp; sourceTree = ""; }; + 198077762E5CA69800CB501E /* provider.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = provider.cpp; sourceTree = ""; }; + 198077772E5CA69800CB501E /* remote_server.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = remote_server.cpp; sourceTree = ""; }; + 198077782E5CA69800CB501E /* rsd.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = rsd.cpp; sourceTree = ""; }; + 198077792E5CA69800CB501E /* tcp_callback_feeder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = tcp_callback_feeder.cpp; sourceTree = ""; }; + 1980777A2E5CA69800CB501E /* usbmuxd.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = usbmuxd.cpp; sourceTree = ""; }; + 1980778F2E5CA6C700CB501E /* libidevice++.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libidevice++.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 198077A32E5CA6FC00CB501E /* adapter_stream.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = adapter_stream.hpp; sourceTree = ""; }; + 198077A42E5CA6FC00CB501E /* app_service.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = app_service.hpp; sourceTree = ""; }; + 198077A52E5CA6FC00CB501E /* bindings.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = bindings.hpp; sourceTree = ""; }; + 198077A62E5CA6FC00CB501E /* core_device_proxy.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = core_device_proxy.hpp; sourceTree = ""; }; + 198077A72E5CA6FC00CB501E /* debug_proxy.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = debug_proxy.hpp; sourceTree = ""; }; + 198077A82E5CA6FC00CB501E /* diagnosticsservice.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = diagnosticsservice.hpp; sourceTree = ""; }; + 198077A92E5CA6FC00CB501E /* ffi.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = ffi.hpp; sourceTree = ""; }; + 198077AA2E5CA6FC00CB501E /* idevice.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = idevice.hpp; sourceTree = ""; }; + 198077AB2E5CA6FC00CB501E /* location_simulation.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = location_simulation.hpp; sourceTree = ""; }; + 198077AC2E5CA6FC00CB501E /* lockdown.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = lockdown.hpp; sourceTree = ""; }; + 198077AD2E5CA6FC00CB501E /* pairing_file.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = pairing_file.hpp; sourceTree = ""; }; + 198077AE2E5CA6FC00CB501E /* provider.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = provider.hpp; sourceTree = ""; }; + 198077AF2E5CA6FC00CB501E /* readwrite.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = readwrite.hpp; sourceTree = ""; }; + 198077B02E5CA6FC00CB501E /* remote_server.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = remote_server.hpp; sourceTree = ""; }; + 198077B12E5CA6FC00CB501E /* rsd.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = rsd.hpp; sourceTree = ""; }; + 198077B22E5CA6FC00CB501E /* tcp_object_stack.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = tcp_object_stack.hpp; sourceTree = ""; }; + 198077B32E5CA6FC00CB501E /* usbmuxd.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = usbmuxd.hpp; sourceTree = ""; }; + 198077B52E5CA6FC00CB501E /* idevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = idevice.h; sourceTree = ""; }; + 198077DB2E5CC33000CB501E /* libidevice_ffi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libidevice_ffi.a; path = "${DESTINATION_PATH}/libidevice_ffi.a"; sourceTree = ""; }; + 198077E02E5CD49200CB501E /* xcode_build_rust.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = xcode_build_rust.sh; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1980778D2E5CA6C700CB501E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 198077DF2E5CCA2900CB501E /* libidevice_ffi.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 198077562E5CA62F00CB501E = { + isa = PBXGroup; + children = ( + 1980777B2E5CA69800CB501E /* src */, + 198077612E5CA62F00CB501E /* Products */, + 198077B62E5CA6FC00CB501E /* include */, + 198077D92E5CC31100CB501E /* Frameworks */, + 198077E02E5CD49200CB501E /* xcode_build_rust.sh */, + ); + sourceTree = ""; + }; + 198077612E5CA62F00CB501E /* Products */ = { + isa = PBXGroup; + children = ( + 1980778F2E5CA6C700CB501E /* libidevice++.a */, + ); + name = Products; + sourceTree = ""; + }; + 1980777B2E5CA69800CB501E /* src */ = { + isa = PBXGroup; + children = ( + 1980776C2E5CA69800CB501E /* adapter_stream.cpp */, + 1980776D2E5CA69800CB501E /* app_service.cpp */, + 1980776E2E5CA69800CB501E /* core_device.cpp */, + 1980776F2E5CA69800CB501E /* debug_proxy.cpp */, + 198077702E5CA69800CB501E /* diagnosticsservice.cpp */, + 198077712E5CA69800CB501E /* ffi.cpp */, + 198077722E5CA69800CB501E /* idevice.cpp */, + 198077732E5CA69800CB501E /* location_simulation.cpp */, + 198077742E5CA69800CB501E /* lockdown.cpp */, + 198077752E5CA69800CB501E /* pairing_file.cpp */, + 198077762E5CA69800CB501E /* provider.cpp */, + 198077772E5CA69800CB501E /* remote_server.cpp */, + 198077782E5CA69800CB501E /* rsd.cpp */, + 198077792E5CA69800CB501E /* tcp_callback_feeder.cpp */, + 1980777A2E5CA69800CB501E /* usbmuxd.cpp */, + ); + path = src; + sourceTree = ""; + }; + 198077B42E5CA6FC00CB501E /* idevice++ */ = { + isa = PBXGroup; + children = ( + 198077A32E5CA6FC00CB501E /* adapter_stream.hpp */, + 198077A42E5CA6FC00CB501E /* app_service.hpp */, + 198077A52E5CA6FC00CB501E /* bindings.hpp */, + 198077A62E5CA6FC00CB501E /* core_device_proxy.hpp */, + 198077A72E5CA6FC00CB501E /* debug_proxy.hpp */, + 198077A82E5CA6FC00CB501E /* diagnosticsservice.hpp */, + 198077A92E5CA6FC00CB501E /* ffi.hpp */, + 198077AA2E5CA6FC00CB501E /* idevice.hpp */, + 198077AB2E5CA6FC00CB501E /* location_simulation.hpp */, + 198077AC2E5CA6FC00CB501E /* lockdown.hpp */, + 198077AD2E5CA6FC00CB501E /* pairing_file.hpp */, + 198077AE2E5CA6FC00CB501E /* provider.hpp */, + 198077AF2E5CA6FC00CB501E /* readwrite.hpp */, + 198077B02E5CA6FC00CB501E /* remote_server.hpp */, + 198077B12E5CA6FC00CB501E /* rsd.hpp */, + 198077B22E5CA6FC00CB501E /* tcp_object_stack.hpp */, + 198077B32E5CA6FC00CB501E /* usbmuxd.hpp */, + ); + path = "idevice++"; + sourceTree = ""; + }; + 198077B62E5CA6FC00CB501E /* include */ = { + isa = PBXGroup; + children = ( + 198077B42E5CA6FC00CB501E /* idevice++ */, + 198077B52E5CA6FC00CB501E /* idevice.h */, + ); + path = include; + sourceTree = ""; + }; + 198077D92E5CC31100CB501E /* Frameworks */ = { + isa = PBXGroup; + children = ( + 198077DB2E5CC33000CB501E /* libidevice_ffi.a */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 1980778B2E5CA6C700CB501E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 198077B72E5CA6FC00CB501E /* core_device_proxy.hpp in Headers */, + 198077B82E5CA6FC00CB501E /* pairing_file.hpp in Headers */, + 198077B92E5CA6FC00CB501E /* bindings.hpp in Headers */, + 198077BA2E5CA6FC00CB501E /* diagnosticsservice.hpp in Headers */, + 198077BB2E5CA6FC00CB501E /* idevice.h in Headers */, + 198077BC2E5CA6FC00CB501E /* debug_proxy.hpp in Headers */, + 198077BD2E5CA6FC00CB501E /* ffi.hpp in Headers */, + 198077BE2E5CA6FC00CB501E /* rsd.hpp in Headers */, + 198077BF2E5CA6FC00CB501E /* tcp_object_stack.hpp in Headers */, + 198077C02E5CA6FC00CB501E /* remote_server.hpp in Headers */, + 198077C12E5CA6FC00CB501E /* readwrite.hpp in Headers */, + 198077C22E5CA6FC00CB501E /* location_simulation.hpp in Headers */, + 198077C32E5CA6FC00CB501E /* adapter_stream.hpp in Headers */, + 198077C42E5CA6FC00CB501E /* lockdown.hpp in Headers */, + 198077C52E5CA6FC00CB501E /* usbmuxd.hpp in Headers */, + 198077C62E5CA6FC00CB501E /* app_service.hpp in Headers */, + 198077C72E5CA6FC00CB501E /* idevice.hpp in Headers */, + 198077C82E5CA6FC00CB501E /* provider.hpp in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 1980778E2E5CA6C700CB501E /* idevice++ */ = { + isa = PBXNativeTarget; + buildConfigurationList = 198077902E5CA6C700CB501E /* Build configuration list for PBXNativeTarget "idevice++" */; + buildPhases = ( + 198077E22E5CD4C900CB501E /* ShellScript */, + 1980778B2E5CA6C700CB501E /* Headers */, + 1980778C2E5CA6C700CB501E /* Sources */, + 1980778D2E5CA6C700CB501E /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "idevice++"; + packageProductDependencies = ( + ); + productName = "idevice++"; + productReference = 1980778F2E5CA6C700CB501E /* libidevice++.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 198077572E5CA62F00CB501E /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1640; + LastUpgradeCheck = 1640; + TargetAttributes = { + 1980778E2E5CA6C700CB501E = { + CreatedOnToolsVersion = 16.4; + }; + }; + }; + buildConfigurationList = 1980775A2E5CA62F00CB501E /* Build configuration list for PBXProject "idevice++" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 198077562E5CA62F00CB501E; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 198077612E5CA62F00CB501E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1980778E2E5CA6C700CB501E /* idevice++ */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + 198077E22E5CD4C900CB501E /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + "", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/bin/sh\n./xcode_build_rust.sh\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1980778C2E5CA6C700CB501E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 198077932E5CA6EF00CB501E /* adapter_stream.cpp in Sources */, + 198077942E5CA6EF00CB501E /* app_service.cpp in Sources */, + 198077952E5CA6EF00CB501E /* core_device.cpp in Sources */, + 198077962E5CA6EF00CB501E /* debug_proxy.cpp in Sources */, + 198077972E5CA6EF00CB501E /* diagnosticsservice.cpp in Sources */, + 198077982E5CA6EF00CB501E /* ffi.cpp in Sources */, + 198077992E5CA6EF00CB501E /* idevice.cpp in Sources */, + 1980779A2E5CA6EF00CB501E /* location_simulation.cpp in Sources */, + 1980779B2E5CA6EF00CB501E /* lockdown.cpp in Sources */, + 1980779C2E5CA6EF00CB501E /* pairing_file.cpp in Sources */, + 1980779D2E5CA6EF00CB501E /* provider.cpp in Sources */, + 1980779E2E5CA6EF00CB501E /* remote_server.cpp in Sources */, + 1980779F2E5CA6EF00CB501E /* rsd.cpp in Sources */, + 198077A02E5CA6EF00CB501E /* tcp_callback_feeder.cpp in Sources */, + 198077A12E5CA6EF00CB501E /* usbmuxd.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 198077672E5CA63000CB501E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = 4FW3Q8784L; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 198077682E5CA63000CB501E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 4FW3Q8784L; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 198077912E5CA6C700CB501E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 4FW3Q8784L; + EXECUTABLE_PREFIX = lib; + LIBRARY_SEARCH_PATHS = ( + "${TARGET_BUILD_DIR}/**", + "$(PROJECT_DIR)/${DESTINATION_PATH}", + ); + MACOSX_DEPLOYMENT_TARGET = 15.5; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator"; + SUPPORTS_MACCATALYST = NO; + TARGETED_DEVICE_FAMILY = "1,2,3,4"; + }; + name = Debug; + }; + 198077922E5CA6C700CB501E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 4FW3Q8784L; + EXECUTABLE_PREFIX = lib; + LIBRARY_SEARCH_PATHS = ( + "${TARGET_BUILD_DIR}/**", + "$(PROJECT_DIR)/${DESTINATION_PATH}", + ); + MACOSX_DEPLOYMENT_TARGET = 15.5; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator"; + SUPPORTS_MACCATALYST = NO; + TARGETED_DEVICE_FAMILY = "1,2,3,4"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1980775A2E5CA62F00CB501E /* Build configuration list for PBXProject "idevice++" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 198077672E5CA63000CB501E /* Debug */, + 198077682E5CA63000CB501E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 198077902E5CA6C700CB501E /* Build configuration list for PBXNativeTarget "idevice++" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 198077912E5CA6C700CB501E /* Debug */, + 198077922E5CA6C700CB501E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 198077572E5CA62F00CB501E /* Project object */; +} diff --git a/cpp/idevice++.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/cpp/idevice++.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/cpp/idevice++.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/cpp/idevice++.xcodeproj/xcshareddata/xcschemes/idevice++.xcscheme b/cpp/idevice++.xcodeproj/xcshareddata/xcschemes/idevice++.xcscheme new file mode 100644 index 0000000..779227d --- /dev/null +++ b/cpp/idevice++.xcodeproj/xcshareddata/xcschemes/idevice++.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cpp/xcode_build_rust.sh b/cpp/xcode_build_rust.sh new file mode 100755 index 0000000..eab5b62 --- /dev/null +++ b/cpp/xcode_build_rust.sh @@ -0,0 +1,130 @@ +#!/bin/sh + +# This script builds a Rust library for use in an Xcode project. +# It's designed to be used as a "Run Script" build phase on a native Xcode target. +# It handles multiple architectures by building for each and combining them with `lipo`. + +# --- Configuration --- +# The name of your Rust crate (the name in Cargo.toml) +CRATE_NAME="idevice_ffi" +# The path to your Rust project's root directory (containing Cargo.toml) +RUST_PROJECT_PATH="${PROJECT_DIR}/../ffi" + +# --- Environment Setup --- +# Augment the PATH to include common locations for build tools like cmake and go. +export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/local/go/bin:$PATH" + +# --- Locate Cargo --- +# Xcode's build environment often has a minimal PATH, so we need to find cargo explicitly. +if [ -x "${HOME}/.cargo/bin/cargo" ]; then + CARGO="${HOME}/.cargo/bin/cargo" +else + CARGO=$(command -v cargo) + if [ -z "$CARGO" ]; then + echo "Error: cargo executable not found." >&2 + echo "Please ensure Rust is installed and cargo is in your PATH or at ~/.cargo/bin/" >&2 + exit 1 + fi +fi + +# --- Script Logic --- + +# Exit immediately if a command exits with a non-zero status. +set -e + +# --- Platform & SDK Configuration --- +# In a "Run Script" phase on a native target, PLATFORM_NAME is reliable. +# We use it to determine the correct SDK and build parameters. +PLATFORM_SUFFIX="" +SDK_NAME="" + +if [ "$PLATFORM_NAME" = "iphoneos" ]; then + PLATFORM_SUFFIX="-iphoneos" + SDK_NAME="iphoneos" +elif [ "$PLATFORM_NAME" = "iphonesimulator" ]; then + PLATFORM_SUFFIX="-iphonesimulator" + SDK_NAME="iphonesimulator" +elif [ "$PLATFORM_NAME" = "macosx" ]; then + PLATFORM_SUFFIX="" + SDK_NAME="macosx" +else + echo "Error: Unsupported platform '$PLATFORM_NAME'" >&2 + exit 1 +fi + +# Get the SDK path. This is crucial for cross-compilation. +SDK_PATH=$(xcrun --sdk ${SDK_NAME} --show-sdk-path) +echo "Configured for cross-compilation with SDK: ${SDK_PATH}" + +# Export variables needed by crates like `bindgen` to find the correct headers. +export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=${SDK_PATH}" +export SDKROOT="${SDK_PATH}" # Also respected by some build scripts. + +STATIC_LIB_NAME="lib$(echo $CRATE_NAME | sed 's/-/_/g').a" +LIPO_INPUT_FILES="" + +# Determine if this is a release or debug build. +if [ "$CONFIGURATION" = "Release" ]; then + RELEASE_FLAG="--release" + RUST_BUILD_SUBDIR="release" +else + RELEASE_FLAG="" + RUST_BUILD_SUBDIR="debug" +fi + +# Loop through each architecture specified by Xcode. +for ARCH in $ARCHS; do + # Determine the Rust target triple based on the architecture and platform. + if [ "$PLATFORM_NAME" = "macosx" ]; then + if [ "$ARCH" = "arm64" ]; then + RUST_TARGET="aarch64-apple-darwin" + else + RUST_TARGET="x86_64-apple-darwin" + fi + elif [ "$PLATFORM_NAME" = "iphoneos" ]; then + RUST_TARGET="aarch64-apple-ios" + elif [ "$PLATFORM_NAME" = "iphonesimulator" ]; then + if [ "$ARCH" = "arm64" ]; then + RUST_TARGET="aarch64-apple-ios-sim" + else + RUST_TARGET="x86_64-apple-ios" + fi + fi + + echo "Building for arch: ${ARCH}, Rust target: ${RUST_TARGET}" + + # --- Configure Linker for Cargo --- + # Use RUSTFLAGS to pass linker arguments directly to rustc. This is the most + # reliable way to ensure the linker finds system libraries in the correct SDK. + export RUSTFLAGS="-C link-arg=-L${SDK_PATH}/usr/lib" + # export PATH="${SDK_PATH}:$PATH" + + # Run the cargo build command. It will inherit the exported RUSTFLAGS. + (cd "$RUST_PROJECT_PATH" && ${CARGO} build ${RELEASE_FLAG} --target ${RUST_TARGET}) + + BUILT_LIB_PATH="${RUST_PROJECT_PATH}/../target/${RUST_TARGET}/${RUST_BUILD_SUBDIR}/${STATIC_LIB_NAME}" + + # Add the path of the built library to our list for `lipo`. + LIPO_INPUT_FILES="${LIPO_INPUT_FILES} ${BUILT_LIB_PATH}" +done + +# --- Universal Library Creation --- + +# Construct the correct, platform-specific destination directory. +DESTINATION_DIR="${BUILT_PRODUCTS_DIR}" +mkdir -p "${DESTINATION_DIR}" +DESTINATION_PATH="${DESTINATION_DIR}/${STATIC_LIB_NAME}" + +echo "Creating universal library for architectures: $ARCHS" +echo "Input files: ${LIPO_INPUT_FILES}" +echo "Output path: ${DESTINATION_PATH}" + +# Use `lipo` to combine the individual architecture libraries into one universal library. +lipo -create ${LIPO_INPUT_FILES} -output "${DESTINATION_PATH}" + +echo "Universal library created successfully." + +# Verify the architectures in the final library. +lipo -info "${DESTINATION_PATH}" + +echo "Rust build script finished successfully."