Rember to change the package id and app icon when publish in different platform
Publish applicaion in Android platform
- APK: dotnet publish -f net8.0-android -c Release -p:AndroidPackageFormats=apk
- AAB: dotnet publish -f net8.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyPass=(CS password) -p:AndroidSigningStorePass=(CS password) (mac use \ for escaping special symbol <)
Publish application in IOS platform
- Follow the tutorial in https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/publish-cli?view=net-maui-8.0
- Create an app Id and prvisioning profile in Apple Developer
- Download provisioning profiles and open it in macbook air
- Set up the PropertyGroup with RuntimeIdentifier, CodesignKey, CodesignProvision and ArchiveOnBuild
- Ensure that the location of folder is not sync with iCloud
- IPA: dotnet publish -f net8.0-ios -c Release
Troubleshooting in IOS
- Getting error of resource fork, Finder information, or similar detritus not allowed
- Open terminal in macbook air
- cd (path to directory)todolist/todolist/bin/Release/net8.0-ios/ios-arm64/
- xattr -lr todolist.app (list out all attributes)
- xattr -cr todolist.app (clear all attributes)
- xattr -lr todolist.app (ensure no more documents are found)
Old method Publish application in IOS platform
- Follow the tutorial in https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/publish-app-store?view=net-maui-8.0&tabs=vs
- Create an app Id and provisioning profile
- download provisioning profiles in Visual Studio
- Counter check for duplicate version number set background color of app icon
- Connect the visual studio to macbook air for distrubution
- Remember to have a App-Specific password for apple Id
- Troubleshooting: clean and build solution
Troubleshooing in IOS
- solution->properties->iOS->Bundle Signing, Scheme: Manual Provision / Signing identity: whatever (not automatic) / Provisoning profile: whatever (not automatic)
- After building the archive, Distribute->App Store->Signing identity: whatever (not automatic) / Provisoning profile: whatever (not automatic), select the valid one that matched with apple account
- delete the cache profile in AppData\Local\Xamarin\iOS\Provisioning then redownload the profile in Tools->Options->Xamarin->Apple Accounts->View Details
- use xcode (Window-> Organizer->Archives->Distibute App) for distribution after sucessful archive or having errors "altool" exited with code 1