DriverKit driver doesn't appear in Settings when installed with iPad app - ios

I'm working on a DriverKit driver. I have it running on macOS, including a very simple client app written in SwiftUI. Everything is working fine there. I've added iPadOS as a destination for the app as demonstrated in the WWDC video on DriverKit for iPadOS. The app builds and runs on my iPad, as expected (after a little work to conditionalize out my use of SystemExtensions.framework for installation on macOS). However, after installing and running the app on an iPad, the driver does not show up in Settings->General, nor in the app-specific settings pane triggered by the inclusion of a settings bundle in the app.
I've confirmed that the dext is indeed being included in the app bundle when built for iPadOS (in MyApp.app/SystemExtensions/com.me.MyApp.MyDriver.dext). I also can see in the build log that there's a validation step for the dext, and that seems to be succeeding.
I don't know why the driver isn't being discovered -- or in any case surfaced to the user -- when the app is installed on the iPad. Has anyone faced this problem and solved it? Are there ways to troubleshoot installation/discovery of an embedded DriverKit extensions on iOS?
Update after further debugging:
I've decided to try to get Apple's DriverKitUserClientSample sample app working on iOS, since some version of that is what was shown in the WWDC video, and it's much simpler than my driver.
I'm able to get it working on macOS, following the instructions for provisioning etc. in the page on the sample app. But I'm having the exact same problem on iPadOS where the app runs fine, but the driver doesn't show up in either general settings, nor the app's own settings page. I'm using manually, explicitly generated App IDs and provisioning profiles for the driver and container app.
Looking at the console logs on the iPad, the only thing I see that seems to have anything to do with the driver (as opposed to the container app) is this line:
debug 15:35:10.872075-0700 installd open(/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.3XF4J5/extracted/DriverKitSampleApp.app/SystemExtensions/com.openreelsoftware.dext-to-user-client.driver.dext/Info.plist,0x0,0x1b6) = 4
Not sure what that means, except that I worry that = 4 is an error code. Assuming it's the regular open() being used here, 4 is EINTR // Interrupted system call.. Not sure if that really means anything.
I've put my modified version of Apple sample project on GitHub here: https://github.com/armadsen/CommunicatingBetweenADriverKitExtensionAndAClientApp
Any help is most welcome.

Related

Flutter App freezes in native Splash/Loading-Screen

I and my team have a really frustrating problem for weeks now.
Problem in short
The newest version of our flutter app wrapped again by Citrix MDX is not able to continue running beyond its native implemented Splash Screen. It does not crash.
How I got there
I shipped a Flutter app as an IPA file build with Flutter 1.17.5. The file itself can be installed on any iOS device and runs fine. The IPA-file-receiver tried the same and it runs fine too.
The IPA-receiver wraps&signs the app again with his provisioning profile and certificate using Citrix MDX (Version > 20.x). Only the local MDX tool via command-line (not the online) is able to wrap the app. The log file from the MDX tool does not contain any errors.
The wrapped-app can be installed on their iOS devices and run.
Result: The native Splash-Screen is shown and that's it. The app does not continue to show the first Flutter view nor does it crash or close itself.
Unfortunately, we have no OS logs from the running app and also we don't have the wrapped-app from the MDX tool.
What makes me wonder: ...is that the wrapped app from MDX works on iOS tablets after changing its orientation this will somehow trigger Flutter to load its first view.
What we already did
try-catch'ed the main-Method and provided a Flutter-Screen with some Error-Output capability. Result: The error screen showed that some plugin we are using via pubspec was missing. However, the MDX tool logs showed that the plugin was there. Worth mentioning: The error screen did not showed up in our latest test, the app was just somehow freezing in its native Splash-Screen again.
Searching for any changes since the last release that was running fine.
Is there anyone who has some idea worth trying out or some hint where you would start searching for the problem?
Help is much appreciated and sorry for not having some re-produceable steps.

Ios share extension does not work when installed by testflight but works installed by xcode

Installed with testflight the application does appear in the list of target applications to share an image with. When I select my application icon in the list I do get a normal Post dialog. After pressing "Post" in the dialog the application does open but nothing else happens.
When the same version of application is installed with xcode the shared file is delivered and the application displays the shared image.
I am not even sure how to debug such an issue as the application installed by testflight does not appear in the list of installed applications in xcode Devices window. Nothing that I can find in device logs either.
Please suggest any approach to troubleshooting the issue.
Update: I found a way to get much more detailed logs from device than the one provided by xcode's "Devices" window: deviceconsole utility. This gives at least some information to approach troubleshooting.
Update 1: It turns out that the application installed through ad hoc ipa file exported from the same archive that was submitted to testflight shows the same problem. This allows much quicker testing turn around.
This answer indicates that the problem can be caused by "Deployment Target" of extension set above the ios version of test device. I did try different combination of this setting in the application and extension, nothing helped thus far.
Update 2: I created code-level support request with apple for this issue and provided full source of the application to them. After few months of apathetic communications they concluded that the problem is due to a bug and suggested to create report Apple Bug Reporter. I did that and after another few months of more apathetic communications the issue was promptly closed on the basis that the application does not crash. Frustrating, but I still need to resolve the problem, now looks like without help from vendor.
If the deployment target is higher than the version number of the actual phone, your code cannot run. So the only choice is reducing the deployment target of the extension to be the same as the app.
I’d check if you have somehow set different deployment targets for debug and release.

iPhone 7 device logs won't show up in the debugger in Xcode

When building and running my app from Xcode on our iPhone 7's, I can't get the logs to show up in the debugging area. I've tested both mine and my wife's iPhone 7's. It's completely blank. They show up for other devices (iPhone 5, iPad, etc.) and for the simulators but not for the 7's.
When I view logs in Window > Devices > (select device), or in the system's Console, I also don't see logs for my app. There's only references to the app from symptomsd, etc. But no process even appears with my apps name.
It seems there is some incompatibility between my app and these specific devices. I've been using and updating the same app since around 2012 so maybe there is some sort of cruft in there that is blocking logs on these very latest devices.
Things I've tried:
Building and running other apps (logs show up)
Testing other devices (logs show)
Re-powering iPhone and restarting Xcode
Setting a breakpoint and running a command in the debugger (I got response from that command)
Any other steps to try would be appreciated.
You can use alsodump to log. You may try this, maybe this one works. What may help you:
1. Create new building scheme.
2. Try running it on simulator. Use many iOS versions. Maybe the latest one have a bug.
3. Remove Derived data in this project.

Worked one day, errored out next on Mac: Error within debug UI #appcelerator

This could be related to the problem here, but since this is happening in my iOS build (not Android), and I have cleaned the project and restarted Appcelerator, I don't know why this would occur.
Note - I did not change my dev environment, update appcelerator, or change any certs on my MBA where I'm developing my app. The only thing that I've changed is app code. I thought that I might see bugs or errors, but I'm not trying to debut either, as I'm building and installing via iTunes sync to my ipod Touch w/9.2. The build process and settings have not changed, so I don't even know where to start.
Work around more than an answer, but for some reason, my device, registered at apple was not being recognized by appcelerator (see note in my comment for related issue). After logging into apple dev center, and going back to appcelerator, the issue appeared to go away. I don't know if this is solved, but the workaround got me in business again.

Why does XCode (4.5.1, Lion) require an internet connection to connect to iOS simulator?

I am developing an ios app that doesn't need an internet connection. I'm using phonegap and jquery-mobile. I'd like to develop offline, but XCode gets stuck with a status saying 'Attaching to iosproj' (iosproj is my project name). After that I cannot stop the stuck task, and have to force-quit XCode. With an internet connection however, everything works just fine. Grateful for any clues.
Edit: XCode seems to install the app fine without a network, but it gets stuck before/durimg receiving the deviceready event.
Update 1: The app runs fine on the simulator with or without the n/w. It is purely the XCode-iOS simulator interaction.
Update 2: When using phonegap (Apache cordova), there's an easy work-around to work offline. Once the project has been built and installed (with a n/w), all subsequent updates to html/js/css/img can be made directly to the www directory in the simulator's Library (under your app folder, in ~/Library/Application Support/iPhone Simulator/6.0/Applications).
The Simulator itself attempts to make an Internet connection to Apple as it launches. In particular, the itunesstored process attempts to connect to ax.init.itunes.apple.com and phobos.apple.com.
[That information comes from LittleSnitch. You would be well advised to install LittleSnitch so that you can be sure of exactly what connection is being attempted here. No one - certainly no developer - should be without it.]
If you find this troublesome (that is, if the connection failure is causing you to be unable to run your app in the Simulator at all) you should file a bug report with Apple. However, I've had no difficulty with this, so perhaps this an Xcode bug. I'd suggest first updating to Xcode 4.5.2 in case it is fixed there.

Resources