https://kotlinlang.org logo
Title
c

Colton Idle

01/10/2021, 7:45 PM
Built a DMG and sent it to a friend but he said it seems like it's corrupted. Any ideas? Do I need to sign my code? Are there instructions for it, or any ways around signing it for just sending little dumb apps to a friend?
b

Big Chungus

01/10/2021, 7:51 PM
It's not corrupted, apple is lying to you as always... Since it's not signed, that dmg will only work normally on the machine that built it. If your friend wants to use your dmg he needs to configure it as trusted app.
👍 1
c

Colton Idle

01/10/2021, 7:54 PM
Any easy way for him to configure as a trusted app?
c

Colton Idle

01/10/2021, 7:58 PM
Thanks. Will read when I get back home. 👍👍👍👍👍👍👍
s

suresh

01/10/2021, 9:08 PM
Recently compose-jb added an option to create
.app
executable. Could you try creating the standalone folder (
./gradlew createDistributable
) and run that? You might need secondary-click on them to run, and then grant permission.
j

jim

01/11/2021, 12:29 AM
Yeah, distributing apps for Apple machines is never easy, due to Apple's draconian policies. They require all app developers to sign their apps before distributing them.  In such cases, it is possible for users to use 
xattr -cr  <http://MyFancyProgram.app|MyFancyProgram.app>
 to remove attributes from the file and allow it to run, and they may also need to do 
sudo spctl --master-disable
, but if you are planning to distribute a mac application, I think you'll need to talk to your build/infrastructure team or learn how to get a development signing cert and sign manually (https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html)
c

Colton Idle

01/11/2021, 12:37 AM
Yeah. I guess it's two fold. 1. I just want to give a friend (who's not a dev) fairly easy steps to test my app 2. I don't have a team with me building, and so eventually if I do want to distribute I will have to learn how to do it myself, I just expected compose apps to have steps built for it (similar to how android app signing works). But again I've only ever done android development so this is all really foreign to me.
Also, I'm still away from home and so I haven't read any of those links yet. Sorry!
j

jim

01/11/2021, 12:43 AM
I don't know of an easy way to give an app to an Apple-user friend, unfortunately. It's not a compose thing, but is an apple thing. You walk them through how to run a couple of commands on the command line, or you can register a signing certificate with apple - neither one is particularly straight forward.
c

Colton Idle

01/11/2021, 12:56 AM
Thanks. Just making sure I'm not missing something straightforward and overcomplicating it. Thanks @jim appreciate it
For anyone following along or that finds this in the future: to set up a cert quickly so you can send a dmg to a friend (my friend actually hasn't tried it yet but it seems like everything worked) 1. Open "Keychain Access" on mac > keychain access > certificate assistant > create a certificate. specify a name ie. "my sample cert" and choose code signing under certificate type 2. run
codesign -s "my sample cert" [path to your dmg]
if it gives you no errors... you should be good to go to send to a friend!
edit: may have spoke too soon. Friend said that they now get a warning about not trusting the developer identity, but right click > open solved that, but after doing that if they tried to open they got the error that the image is damaged. 😭