Forum Xamarin.Forms

Xamarin IOS closing on startup

TepcoTepco Member ✭✭

Hello. Despite having been working with Xamarin for a while I'm new to IOS. I have an App which is in Google Play and I plan on getting it in the MS Store but right now I'm wrestling with IOS. I just bought an iPad and am using hot restart to test with my Apple developer account. I have 4 apps and every single one flashes the opening screen on my iPad and then closes immediately. 2 of the apps were created today and are nothing more than the shell that VS 2019 creates. They run fine on as UWP apps but on the iPad I get the "Please Launch the application...." message in VS 2019. When I press on the app on my iPad it opens and closes in a nanosecond. This happens with all the apps and I'm at wit's end after 2 days of banging my head against the wall and scouring Google. It has to be a simple setting issue. The code never hits the breakpoint I set in main.cs (UIApplication.Main(args, null, "AppDelegate");). Does anybody have any suggestions?

Answers

  • JuniorJiangJuniorJiang Member, Xamarin Team Xamurai

    Hi, @Tepco do you mean a new created Xamarin Forms application can not work in iPad by using Hot Restart, whether you are using the latest version of Xamarin Forms to test?


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

  • TepcoTepco Member ✭✭

    Hello JuniorJiang and thank you for replying as this is driving me mad. I followed the instructions for using Hot Restart and I have 3 apps. 1 is fairly complex and is in Google Play, one is rather simple and one is a "Hello World" Xamarin app I just created yesterday for testing. Everything is up to date as far as I'm aware. All 3 apps build properly and are visible on my new iPad but they flash open and then close. Crucially they do not seem to crash; they just never hit a breakpoint in main.cs of my ios project so I'm guessing it has something to do with permissions as I had a similar experience with Android that was solved by setting proper permissions in the Android manifest. Any help would be appreciated as I'm at wit's end.

  • JuniorJiangJuniorJiang Member, Xamarin Team Xamurai

    @Tepco Okey, if so it seems like an issue for Visual Studio. You could submit it as an issue from Visual Studio: https://docs.microsoft.com/en-us/visualstudio/ide/feedback-options?view=vs-2019.

  • TepcoTepco Member ✭✭

    Hello JunioJiang and thanks for your attention to my issue! I have been sidetracked by some upgrades to the Android version but I hope to be tackling Apple again next week and will certainly be posting for help if I can't figure it out. I get the same message every time concerning a debugger attachment that is null so it HAS to be a simple set up issue.

  • JuniorJiangJuniorJiang Member, Xamarin Team Xamurai

    @Tepco Okey, look forward to your good news! If there are any other doubts remember to update here.

  • TepcoTepco Member ✭✭

    Count on it! :)

  • TepcoTepco Member ✭✭

    Well; I'm back at the ios leg of my project and am having the same error. Since all 3 test projects generate the same error I'm guessing it's some sort of setup issue. Here is the error message. All 3 apps build, open and then close instantly.

    Launching app with args: /private/var/containers/Bundle/Application/4401E48B-885C-4E6A-AAC0-3A5BD8C03263/TestIPad.iOS.app -monodevelop-port 10000 -connection-mode usb
    Starting Apple Service 'com.apple.debugserver'...
    Stopping Apple Service 'com.apple.debugserver'...
    An error occurred while trying to launch the app 'TestIPad.iOS'. Details: Error running hotrestart: 'An error occurred while disposing the 'com.apple.debugserver' service. Details: Value cannot be null.'. Command: 'launch -u=00008020-0016481C2E01402E -i=com.companyname.TestIPad -p=10000 -d="C:\Users\Thomas\AppData\Local\Xamarin\iOS\DeveloperDiskImages\14.4\DeveloperDiskImage.dmg" -w=True'
    Please launch the application 'TestIPad' on the device 'Thomas’s iPad' to continue

Sign In or Register to comment.