Thanks for the help.
I have tried to run this locally (SIP off, developer on). A key step in the example is "4. In the "Build Settings" tab, change the "Code Signing Identity" value to "Sign to Run Locally" for all three targets.". This is not possible for the NullDriver target ( I get "Ad Hoc" signing not allowed in ... as a build error.) What am I missing?
Thanks again!
Gene
Post
Replies
Boosts
Views
Activity
OK, it's working now! I don't know why, but it is. The Ad Hoc problem occurs when I have a provisioning profile for the NullDriver target.
I have applied for an entitlement so that I can get the example to work fully code signed.
Thanks again for the help, Quinn!
I have a followup question. When I add my iPad Air gen 5 as a potential destination, I get the error message "Ad Hoc signing is not allowed with SDK iOS 17". When I replace "Sign to Run Locally" with iOS development, I get the following Xcode error:
"Showing Recent Messages
/Users/gene/Desktop/DriverKitExsample_Unsigned/CommunicatingBetweenADriverKitExtensionAndAClientApp/DriverKitUserClientSample/DriverKitUserClientSample.xcodeproj: Provisioning profile "iOS Team Provisioning Profile: *" doesn't include the com.apple.developer.driverkit.userclient-access entitlement."
Xcode pops up a bow saying to submit the error (which I Will do). Should this entitlement be part of automatic signing? If yes, then it is a bug. If no, then it seems liker there is a "catch-22" scenario trying to run "locally" on an iPad. What am I missing?
Gene
When I do that, it sets up a pair of swift files. I have C code that I want to use which currently compiles and runs on the command line in macOS. I am trying to get this "function" to run in iPadOS. I have destinations, etc set up for iOS and it compiles the code for iOS but does not wrap it up as an app. I have seen C++ used in an app target.
Do you have any suggestions for how to include the code into an app for iOS?
The latest behavior is that all assembly files are not found when I use "Product>Perform Action.Assemble ..."
This is the latest error code.
missing input '/Users/gene/Library/Developer/Xcode/DerivedData/volk-neon-asm-fmqioscvzlcgqjferhnlcfrdltsi/Build/Intermediates.noindex/volk-neon-asm.build/Debug-maccatalyst/volk-neon-asm.build/Objects-normal/x86_64/volk_16i_max_star_horizontal_16i' and no rule to build it
I see that the URL include "Debug-maccatalyst" when it should be "Debug-iphoneos".
Also, there is a "Debug-iphoneos" directory with content.
The problem is that adding assembly files to a project is not getting them copied into the "Objects-normal/arm64" directory. If I copy a source file manually and then use Xcode to assemble it, it works.
deleted
@ssmith_c , I have a version of libUSB that I have compiled for iOS which uses the methods in IOKit in iPadOS. I can access some of the information from the device attached to the USB-C connector but not all of it. Sandbox denies some of the accesses but not all of them. If it could be made to work, then porting a software defined radio application , in theory, should be possible. If there is no way to make it work I would need a bridge between calls to libUSB and calls to DriverKit, and I know that would not be possible for me at the present based on what I don’t know.
Gene
@ssmith_c Even IORegisteryEntryCreateCFProperty, in the attempt to read a device id, is denied by Sandbox.
@eskimo , how do I install Apps on my iPad using Finder on my Mac? Installing using the "Simulators and Devices" menu gives me the same error about not being able to install the app
Error installing '/Users/gene/Desktop/USBApp.app', ERROR: Error Domain=com.apple.dt.CoreDeviceError Code=3002 "Failed to install the app on the device." UserInfo={NSUnderlyingError=0x60000b2cc510 {Error Domain=IXUserPresentableErrorDomain Code=14 "Unable to Install “USBApp”" UserInfo={NSUnderlyingError=0x60000b2cc480 {Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.769olK/extracted/USBApp.app/SystemExtensions/w1ebr.MUUI.ipadOS.driver.dext : 0xe8008015 (A valid provisioning profile for this executable was not found.)" UserInfo={FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:], LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=78, LibMISErrorNumber=-402620395, NSLocalizedDescription=Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.769olK/extracted/USBApp.app/SystemExtensions/w1ebr.MUUI.ipadOS.driver.dext : 0xe8008015 (A valid provisioning profile for this executable was not found.)}}, NSLocalizedDescription=Unable to Install “USBApp”, NSLocalizedRecoverySuggestion=Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.769olK/extracted/USBApp.app/SystemExtensions/w1ebr.MUUI.ipadOS.driver.dext : 0xe8008015 (A valid provisioning profile for this executable was not found.), NSLocalizedFailureReason=This app cannot be installed because its integrity could not be verified.}}, NSURL=file:///Users/gene/Desktop/USBApp.app/, NSLocalizedDescription=Failed to install the app on the device.}
Domain: com.apple.dt.DVTCoreDevice
Code: -1
User Info: {
DVTErrorCreationDateKey = "2024-01-11 21:29:30 +0000";
}
--
System Information
macOS Version 14.3 (Build 23D5051b)
Xcode 15.0.1 (22266) (Build 15A507)
Timestamp: 2024-01-11T16:29:30-05:00
@eskimo , I have tried everything that you suggested. No success so far. I get this log entry (from the iPad)
Received termination request from [osservice<com.apple.mobile.installd>:411] on <RBSProcessPredicate <RBSProcessBundleIdentifierPredicate "w1ebr.MUUIipadOS">> with context <RBSTerminateContext| explanation:installd terminating bundleID:w1ebr.MUUIipadOS reportType:None maxTerminationResistance:Interactive attrs:[
<RBSPreventLaunchLimitation| <RBSProcessPredicate <RBSProcessBundleIdentifierPredicate "w1ebr.MUUIipadOS">> allow:(null)>
]>
Does this tell you anything helpful?
@eskimo , I made progress, but I don't understand what it means :-)
When I remove specific Vendor IDs from the DEXT's entitlement file, the DEXT loads. idVendor="*" also loads the DEXT successfully.
I need your advice.
Device drivers written for my specific receiver (and many others) have been written for Windows, Linux and OSX. The linux and OSX drivers call libUSB. I have compiled a version of libUSB for iPadOS. "Sandbox" in iPadOS denies access to the USB device. I don't know how to temporarily disable Sandbox (I suspect it isn 't possible for me) When I requested entitlements from Apple so that I could try to create a driver, Apple denied my request.
Does this imply that iPadOS, even with DriverKit really isn't a viable platform for software which can communicate with many different USB devices?
My wild guess is that there are probably about 100 different radio receivers with USB interfaces and unique hardware ids that are available for purchase. The one that I bought has a Realtek USB tuner chip inside of it (idVendor=0x0bda, idProduct=0x2838). Folks that develop software defined receiver apps (SDRs) typically write the software that does the radio receiver math and the presentation and user interface graphics and rely on other teams to create device drivers that interface to specific hardware. (There is even a GNU Radio project that allows users to create software defined radios using pre-defined building blocks connected by a graph.)
The M1 and M2 iPads have more than the necessary CPU and graphics performance that a portable SDR solution requires. I also am curious about the neural processor and it's potential use for signal processing.
@ssmith_c , I think, for the iPad, it isn't possible to compile it to run locally without entitlements. The DEXT loading mechanism needs a way to match the Vendor and Product IDs and the only way I know of to do that is to have them in the entitlements (on an iPad). Is this incorrect?
The DeviceClass=0x00 and the InterfaceClass, Interface SubClass and Interface Protocol all = 0xFF which means the device does not specify how to interface to it. The code is complex and the dependencies are difficult to figure out (for me), so I think the next step is to try to trace the device driver running on my MBP. (I wish I could turn Sandbox off!)