Issue with iOS release version

Hi, I’m trying to deploy my game on iOS in both debug and release modes. It works fine on the emulator, but when I install it on a physical device, it doesn’t launch :frowning_face:. Have any of you encountered this issue before? Thank you in advance. I’m working on the latest version of Visual Studio for Mac and the latest version of iOS. I appreciate your assistance.

does an “empty” project work? If not than i have no ideé!

But if its your code and the program dont run on hardware, In my experiens, this can happen from time to time!

Unfortunately its diffrent every time so it can be all sort of things.

Backtrack to the point when it last point your project ran by commenting out code. Try to pinpoint what dosnt work and fix it.

I also use a debug log fuktion that writes strings to disk. It can be used to pinpoint where the crash happens or help you write out exceptions

1 Like

Hi, thank you for your response. I created an empty project as you suggested. I have iOS version 16.5 on my iPhone. I have also upgraded to Ventura and Xcode 14.2. Here are the steps I followed: I created a project with Xcode and changed the bundle name to match my project’s name. However, when I try to compile it in VS Mac, I get the following error message:

DVTRadarComponentKey=261622, NSLocalizedDescription=Could not support development.}}, NSLocalizedRecoverySuggestion=This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your Mac and device in order to correctly detect compatibility., NSLocalizedFailure=Could not support development., DVTRadarComponentKey=487927, NSLocalizedDescription=Failed to prepare the device for development.}
warning HE0030: Could not mount developer tools on 'iPhone (3)': Failed to prepare the device for development.
        
warning HE0031: Failed to mount developer tools on 'iPhone (3)'.
error MT1007: Failed to launch the application '/.../Projets_monoGame/MyGameIOSEmpty/bin/Release/net6.0-ios/MyGameIOSEmpty.app' on the device 'iPhone (3)': Failed to launch the application 'project.MonoGame.MyGameIOSEmpty' on the device 'iPhone (3)': Invalid Service Error (error: 0xe8000022)
        . You can still launch the application manually by tapping on it.

I just noticed that it’s suggesting an update for Xcode, so I’m going to test that and get back to you :slightly_smiling_face:

I updated Xcode to version 14.3, and it was not a good idea. I encountered several problems, so I reverted back to version 14.2. I created a blank app, and it compiles in both debug and release modes. How do you test an iOS app on a physical device? I used a method that used to work before May, but I’m not sure if it’s still valid. Before upgrading to a paid developer account, I create a MonoGame application in Visual Studio and an application in Xcode. Then I rename the Xcode bundle with the same name as the MonoGame project, which allows me to generate the archive. Do I have to switch to a paid account to test?

No you shouldn’t have to buy some service just to do some test build.

Are you following this guide?

Last time i tested this it worked but it might have been before may. I only have access to Apple hardware every othet month so i cant cofirm if something chaged but i doubt it.

In my experiense the latest version of xcode is always requiered talking to your harware but i could be wrong.

One simpel test you can do is to build an “empty” xcode projekt ios app and try to deploy that. Maybe it will give you some clues.

1 Like

Thank you for your response :grinning:. I tried it, and it works. You need to select Objective-C language in Xcode. However, suddenly, when I changed the emulator, Monogame is no longer recognized. It gives me this error: Error CS0234: The type or namespace name ‘Xna’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?) (CS0234) (GameIOSEmpty). I checked the .csproj and auget.conf files, and Monogame is present. I have no idea where this could be coming from. Do you have any suggestions?

well no… but this is a good thing :slight_smile: now you have a lead to follow

This one surgests removing and reinstalling the monogame packages:

Double check version numbers on everything while your at it.

1 Like

Great :+1:, thank you for the quick response. I will give it a try.

In my case, it was a .csproj issue. There was a modification from net6.0-ios14.4 to net6.0-ios. I removed “14.4” and everything started working again. I had compared my .csproj file with a working one, but I’m not sure why my file got modified. Anyway, it’s working again now. Thank you once again :grinning:.

1 Like

hi, I found the problem, it’s SQLite on Android. It works fine there, but here it’s causing a block. I’m using a class to handle SQLite (addition, deletion, etc.):

string dbPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
dbPath = Path.Combine(dbPath, "highscoredata.sqlite");
_database = new SQLiteAsyncConnection(dbPath);
_database.CreateTableAsync<HighScore2>().Wait();

The issue lies with the connection. I downgraded to a lower version, but the problem persists. Has anyone recently used SQLite? Any help would be greatly appreciated. Thank you in advance.