Flutter App freezes in native Splash/Loading-Screen - ios

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.

Related

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

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.

Deploying Xamarin.Forms app to iOS: MT1006 EOF Error (error: 0xe800000e)

I am trying to run a Xamarin.Forms app on my iPad and getting the following error:
Launch failed. The app 'AppIOS' could not be launched on 'My iPad'. Error: error MT1006: Could not install the application '/Users/mycompany/Library/Caches/Xamarin/mtbs/builds/AppIOS/someguid/bin/iPhone/Debug/my.app' on the device 'My iPad': EOF Error (error: 0xe800000e).. Please check the logs for more details.
This app has previously ran fine on the same device. The iOS build and deployment process seems very unstable so it often takes multiple attempts so I'm used to having to restart Visual Studio, the Mac it builds on and the iPad and generally wasting a whole lot of time. I have restarted everything involved here multiple times but this error persists. I have checked the device logs and there are no related messages or even any messages at the appropriate times.
I'm using Visual Studio 2017 (15.9.4), Xamarin.iOS and Xamarin.Mac SDK (12.2.1.12), building on a Mac Mini running macOS Mojave and XCode 10.1, deploying to an iPad Air (A1474) running iOS 12.1.1. As far as I'm aware there have been no updates to any of these since I last had it working. The UWP version of the app runs fine.
I can find a lot of MT1006 issues but none with EOF Error (error: 0xe800000e) and I can find no information about this specific error at all. Can anyone enlighten me on what this means?
Sounds overly simple, but I just had this issue and I solved it by restarting the iOS device and redeploying it. Specifically, I was deploying to an iPod 6th Gen and I held the power and home buttons until the screen turned black, this is more of a hard restart. Then let the device reboot and try deploying again.
NOTE: Don't hold the power and home buttons too long, because if you do, the iPod will go into a factory reset restart.
Try pulling up the device in Xcodes' devices tab. I did and realized the device had an error within the tab. I then disabled the "Connect via network" button, then things started to work properly.
I am agree, Xamarin build environment on iOS part is very buggy.
In any case of unknown error in such config: VS<->MAC<->iOS Device try these steps:
Try to switch Off and On Mac wifi.
Reconnect VS to Macbook and Macbook to IPhone.
Delete bin and obj folders on Macbook
Check your PList and Entitlements file(as example wrong aps-environment setting can cause installing errors)
Check your sign project settings
5a. Check your provisoning profile term
unistall application from ios
rebuild and run project again
I'll appent new lines in case i'll remember something else.
What you described happened to me and solved by 1,2,7

Visual Studio 2015 / Xamarin, Debug not working: an error occurred while executing MTouch

I'm trying to get an answer on here before uninstalling this software and developing straight on Mac after spending 4 hours trying to figure this out. I just installed all these programs on both machines (VS15/Xamarin on Windows 10, Xcode/Xamarin on iMac, both on the same network). Mac Agent is connected, I have a Developer account on XCode, a device linked to my account, everything looks fine.
When I create a basic app (I don't even add a line of code, just a blank single view app) on XCode (iMac) and launch the simulator, it works just fine. I get the view of the device etc... When I do the same on my Windows machine, I can't debug. I get the error "The app could not be launched on 'iPhone SE iOS 10.2'. An error occurred while executing MTouch."
I looked all over the place searching for a solution. I removed the Entitlements.plist file, I also checked for updates on everything (as some suggested on StackOverflow). Nothing.
So I tried an Android app to see if that works and no issue there. I get the device I pick, shows a black screen because the app is empty, as expected.
If anyone can guide me before I uninstall this whole thing and code directly on a Mac, it would be greatly appreciated. Thank you!
Restarting Visual Studio and cleaning iOS project worked for me.

EXC_BAD_ACCESS when trying to run Unity game on iOS simulator

I'm usually not a Mac/Xcode user, please forgive me for incorrect terms or understandings.
I have a 2D Unity game which I can successfully build and run on Android and Windows Phone devices/emulators. When building for iOS, I can successfully create the Xcode project, open it and build the app in there. The only change in the iOS-specific player settings I made was to set SDK Version to Simulator SDK.
However, when trying to run it inside the simulator, the splash screen appears, then Xcode pauses on something that looks like an assemby file with an error message: Thread 1: EXC_BAD_ACCESS (code=1, address=0x4).
As I had no idea on what to do, I started stripping down my project (in Unity) until I had no more gameObjects but the camera left on the start scene. Also, I removed all other scenes from the build. The only thing that changed was that above error message now seems to appear on another assembly file.
What could be the issue here? How should I investigate further?
Update
This is the stacktrace:
Update 2
I've created a new blank Unity project, and I get the exactly same error there. The problem seems to be related to Unity or my machine, not the app itself.
Workaround
After days of researching, I still couldn't resolve the issue and finally built for a real devices instead of the simulator. Since I don't own one, I "blindly" submitted the result to the app store, and it got accepted.
For me, that's the proof that the issue is solely related to the combination of Unity and the iOS simulator, i.e. that those two don't work together reliably.
On the other hand, it seems relatively safe to assume that an app will work on iOS if it's been successfully tested on Android, Windows Phone and the default player. Of course, unless iOS-specific features are implemented.
I only know one reason, that leads to this behaviour (device builds work, but simulator builds won't).
=> This could happen, when using native iOS code / plugins
To fix that, you'll have to modify the <path-to-xcode-project>/Libraries/RegisterMonoModules.cpp file, cause somehow Unity does not register those classes/methods for the simulator.
Just look for #if !(TARGET_IPHONE_SIMULATOR) defines and shift them to have all your plugins included, also in the simulator. There will be some move mono_dl_register_symbol() that you'll need.

ios Simulator Could Not Find The Application To Simulate

I'm having trouble with the iOS simulator. I'm currently on 10.7 and was using the simulator to test my website. During the testing, I switched the iOS version via the tool bar, and the application froze and quit. Upon restarting, I get the following error message, with a finder window, inviting me to choose an application:
"ios Simulator Could Not Find The Application To Simulate"
Here's what I've tried to fix the issue:
1: Attempt to identify the application it needs, but the only thing i could see to open was a printer app and the ios simulator app, which just results in a "only one iOS simulator can run at a time" error message.
2: Restart the Mac.
3: Download the new Xcode tools from the app store.
4: Restart again.
None of this has helped, and I'm really stuck without it at the moment. If anyone knows how to resolve the problem, I would be grateful to hear any suggestions. Thanks.
Give this a shot.
Open up a new shell, and shoot of this command: sudo <Xcode>/Library/uninstall-devtools --mode=all (assuming thats the location of the instal).
Then run the Xcode installer you got from the app store.
This removes all the plist files that were also installed with xcode, which aren't removed when you simply reinstall. This is as close as you can come to a complete xcode refresh without reinstalling your OS.
Here's an alternative solution that worked for me... the answer selected here did not. I created a blank, "hello world" project and simply ran it. When you run the app, it sends the app to the simulator and voila! iOS Simulator has an app to simulate. From that point forward, you should be able to open the iOS Simulator without a problem.
After a while longer trying various things, it seems like I may have fixed it.
When asking for an application to open, I opened Xcode, and (weirdly) that opened up and left the testing shell visible, with the tool bar intact. I then selected the current version from the device options and hit the home button, and suddenly everything appeared.
Weird thing to have suddenly happened, but there you go.
I still can't test in iOS 3, so that's a bit of a problem, but not a disaster either!

Resources