-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET MAUI macOS target publishing/archiving #5399
Comments
With
productbuild : error : directory "bin/Release/net6.0-macos/osx-x64/publish" does not exist for writing "Transmission.Client.Mobile-1.0.pkg". |
@xperiandri we were running into this issue as well. Please upgrade to the latest MacOS version (12.3.*), that resolved the issue for us. @jfversluis should we add instructions to move the |
Updated the description, thanks! |
@TanayParikh I still have the same issue after the macOS and XCode update. What else have you changed? |
Just realized you're using the |
|
That's still a different command from the one Gerald posted above... |
Indeed |
How do you use entitlements with MacCatalyst? I tried adding an Entitlements.plist to the MacCatalyst folder and setting the signing stuff like in the iOS projects. The app was built but it fails on start up with:
The entitlements file: <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
</array>
</dict>
</plist> |
I found a workaround for the above setting static linking: <_LibMonoLinkMode>Static</_LibMonoLinkMode>
<_LibXamarinLinkMode>Static</_LibXamarinLinkMode> |
Unfortunately, my attempt here was unsuccessful. The tip says but it doesn't work ~ Just like our said, we just want to release a Mac app or pkg installation package on Windows, but it's not so smooth~ |
@JaneConan building your macOS app on Windows is not something that is supported, so that is expected. |
does it support compiling arm64 target on a x64 machine? I'm seeing following error
|
How to create signed Mac App for Mac App Store? |
how to sign and send to notary to distribute outside of Mac AppStore? https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution when I submit a Mac Catalyst app, I don't have the option to validate/distribute in xcode |
1. Signing the Installer:
2. Sending the notarization request: Sign in to apps with your Apple ID using app-specific passwords:
you get back something like:
3. Checking the notarization status: 5. Stapling the ticket to the file stapling details with: |
After adding this to my csproj the app was notarized just fine.
|
I still can't build/sign a maccatalyst app for outside of the apple store. So that the malicious software warning does not appear when executing |
I keep getting code sign error at verifying target
I thought it's due to wrong |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Can someone write a good guide how to create certs etc from Apple to sign mac catalyst apps for uploading to AppStore? I can't figure it out, I have iOS version working just fine but the mac catalyst don't work at all and I'm starting to get frustrated about it. |
https://developercommunity.visualstudio.com/t/Signed-NET-MAUI-MACCATALYST-/10178897 Try to see if it works for you. |
Can you upload to apple store? Mac ? I can't manage to do so with net7 and latest maui. I press release in visual studio 2022 the trying to upload it with transporter but no luck. How do you do? |
Me too. I couldn't even get the Remote to work so I just use VS Mac on Mac. I tried different types of certificates and provisional profiles but it either fail at building (when I include the A step-by-step guide in both VS for Windows and for Mac would be appreciated. |
Ok, I see. I'm also on Mac. |
Got this figured out now, it's a lot of bugs that will trough you false positiv things etc. Have a guide ready tomorrow, I been asking in an other issue after the doc repo so I can upload it there. If they don't answer until tomorrow I'll publish it here as a issue our similar so can they use it later on if they need to |
Uploaded the guide in a Feature request. If you have any Q just ask in that issue and I'll answer it. |
thanks, and if I want to distribute outside the AppStore? I think you need to do what I put above. |
Change the release part in the project file to something like this:
And change the following line from Entitlements to what I'm pasting below.
Then past the .pkg file to any other folder then the bin / release folder, delete the bin folder then you can install the software. |
but the warning that the developer is not trustworthy will come out? that is, the application must be notarized. |
Have you tried to change |
Is signing for MacOS now supported? |
yes, check out the guide that I did here: |
Great info here. Does this work for signing and notarizing for distribution outside of the store as well? |
To publish for distribution outside the App Store, you need a Developer ID certificate, and a Developer ID Installer cert. Then publish with:
The point is that code signing must be enabled. The problem is that the _CodesignVerify build target will fail - I'll be logging a bug for this (note that the code signing will succeed, providing your certs/profile are right, it's just the verification of the code signing that fails). So add the following to your .csproj to skip the _CodesignVerify build target:
Then you can notarize:
Then staple the ticket:
|
Will it be added to the documentation? |
@angelru Yes, it's in-progress. |
Alright, closing this one for now. The official docs are on there way, you can find a quick overview of those here: https://github.com/dotnet/docs-maui/issues?q=is%3Aissue+is%3Aopen+Publish+Mac+Catalyst+ They should be here soon! And with that there is nothing much that we can do for this on this repo. Thanks everyone! |
Description
TL;DR
.app
and.pkg
works, I have been able to sign the binary as well as use it unsigned.Description
I have been trying to see if publishing a macOS (Mac Catalyst) app through .NET MAUI works at the moment.
Unsigned App Distribution
If you do not want to sign your app and/or do not want to publish you app to the store, and want to distribute it differently, you can create an unsigned
.app
or.pkg
file.Create
.app
executableThe command that can be used is:
dotnet build -f:net6.0-maccatalyst -c:Release
Note that the command is
dotnet build
as opposed todotnet publish
. Thepublish
command isn't working at this time.Create
.pkg
executableThe command that can be used is:
dotnet build -f:net6.0-maccatalyst -c:Release /p:CreatePackage=true
Note that the command is
dotnet build
as opposed todotnet publish
. Thepublish
command isn't working at this time.Running the app
If you want to run unsigned apps on macOS there is a few things that are good to know.
.app
file from the internet it won't run. You will have to execute a command like:chmod +x MyApp.app/Contents/MacOS/MyApp
, whereMyApp
is replaced with the actual app name. This will make the app executable. When double-clicked on macOS, it will only show you a warning and still not run. Right-click and choose Open. Another dialog will appear, this dialog has an Open button. Subsequent runs of the app (also through double-click) won't show the warning again..pkg
file if you use it on your dev machine. If the.app
is next to the.pkg
file in the build artifacts and you install the.pkg
, it will replace the.app
file that is next to it. Even more so; if you move the.pkg
file to elsewhere and run it, it still replaces the.app
file in the build artifacts. Those are somehow linked. To be really sure the.pkg
installs in your Applications folder, copy the.pkg
file to outside of your build artifacts folder, delete thebin
andobj
folder and make sure that also deletes the.app
file. The.pkg
should now install correctly. This is a feature/bug from Apple..pkg
file you will encounter similar dialogs as described at bullet 1 above. Also here, right-click and click Open to go around it.Signed App Distribution
If you want to distribute your app through the App Store, you will have to sign your app. Here you will find how to do that.
{WIP}
Creating a Universal Binary
When you want your app to run on both M1 Mac hardware (without Rosetta emulation) and pre-M1 hardware, you will want to create a so-called universal binary.
To do this, add both the runtime identifiers for both platforms in your
csproj
file.Just for completeness, you can do the same for iOS and "regular" macOS apps by using the runtime identifiers below:
Related Resources
Also See
security policy does not allow @ path expansion
xamarin/xamarin-macios#14686The text was updated successfully, but these errors were encountered: