简体   繁体   中英

Native iOS app built in Xamarin/Visual Studio opening then instantly closing

Our company has a native iOS app that was built in Xamarin/Visual Studio. We originally uploaded it to the App Store a few years ago and have made a few changes to it over the years.

The app itself is very basic. It's basically just a web view that navigates to a Single Page Application. There is very little native app code in the project.

Every week or so I regular launch the native app on our company iPad. Instead of running a version pulled down from the App Store, I periodically rebuild and upload the app from a Mac Mini running Visual Studio and/or debug it directly from the Mac Mini through Visual Studio.

A few days ago I tried launching the native app and after opening it immediately closed. I tried rebooting the iPad but the app still minimizes/closes immediately after opening. If I double-tab the Home button on the iPad, I can see the app still running in the background, but any time I tap on it it immediately minimizes itself.

I tried Cleaning and Rebuilding the native app solution in Visual Studio and re-uploading it to the iPad and that didn't fix it. I updated Visual Studio (and all of its packages) on the Mac Mini, updated XCode, updated Mac OS, updated iOS on the iPad, and nothing resolved the issue.

When I attempt to debug the app from Visual Studio, it shows two error codes in the Output window: MT1043 and MT1007. The debugger always fails to attach to the app as well.

I've tried Googling the error codes and the problem itself and haven't found anything that has worked. I've tried generating a new Development Certificate and Provisioning Profile to use to sign the app when uploading it to the iPad but that didn't work either.

What's strange is that if I download the app off of the App Store it works just fine. The source code that I'm attempting to build/run right now is identical to what it was at the time it was deployed to the app store. What else is strange is that, if I spin up an iOS Emulator and upload/debug against that, the app works just fine.

I tried using a different iPad and it had the same issue. The app minimizes itself immediately after attempting to launch it.

Found the answer. Had to set the system certificate trust from "Always Trust" to "Use System Default". Same solution as provided here: https://stackoverflow.com/a/52506186/9704484

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM