Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Howey-Do-It · May 17, 2013 at 03:52 AM · macpackageosxappsign

Signing a Mac App Correctly Problem

Hey folks,

I am having an issue getting the signing process to work with a Mac/OSX app I am trying to set up for the Mac App Store. I attempted to follow the instructions in the "Blurst Blog Post" (although I really don't know if I did it right), and also tried using a Postprocessor (I couldn't figure out how to use this, after I followed the instructions the resulting built app had the same exact same plist info and not the custom ones I set).

However, I don't believe any of that is the problem, I followed several manual signing tutorials using the terminal and everything works almost fine. I say "almost".

Originally when I try to codesign it says that the executable is not valid, etc. However, when I codesign it without this part, the codesign proceeds but afterward the resulting package produces a damaged app.

        <key>CFBundleExecutable</key>
     <string>GameName</string>

It will not let me proceed without changing ^this^ line.

This is my .plist file. Obviously the "gamename" and "company" are actually replaced with the correct information. All of my apple certificates, keychains, profiles, etc. are set up as well.

     <key>CFBundleShortVersionString</key>
     <string>1.0.0</string>
     <key>LSApplicationCategoryType</key>
     <string>public.app-category.arcade-games</string>
     <key>NSHumanReadableCopyright</key>
     <string>(c) 2013 Company, LLC. All rights reserved.</string>
 
     <key>CFBundleDevelopmentRegion</key>
     <string>English</string>
     <key>CFBundleExecutable</key>
     <string>GameName</string>
     <key>CFBundleGetInfoString</key>
     <string>Unity Player version 4.1.2f1 (911c7369eeac). (c) 2012 Unity Technologies ApS. All rights reserved.</string>
     <key>CFBundleIconFile</key>
     <string>UnityPlayer.icns</string>
     <key>CFBundleIdentifier</key>
     <string>com.company.gamename</string>
     <key>CFBundleInfoDictionaryVersion</key>
     <string>6.0</string>
     <key>CFBundleName</key>
     <string>gamename</string>
     <key>CFBundlePackageType</key>
     <string>APPL</string>
     <key>CFBundleShortVersionString</key>
     <string>Unity Player version 4.1.2f1</string>
     <key>CFBundleSignature</key>
     <string>????</string>
     <key>CFBundleVersion</key>
     <string>1.0.0</string>
     <key>NSMainNibFile</key>
     <string>MainMenu</string>
     <key>NSPrincipalClass</key>
     <string>PlayerApplication</string>
     <key>UnityBuildNumber</key>
     <string>911c7369eeac</string>



This is what I am using in the Terminal to codesign, package, and test install:

Codesign:

codesign -f -v -s "3rd Party Mac Developer Application: Company, LLC" /path/GameName.app

Build:

productbuild --component /path/GameName.app "/Applications" --sign "3rd Party Mac Developer Installer: Company, LLC" /path/GameName.pkg

Test Install:

sudo installer -store -pkg /path/GameName.pkg -target /

Thanks all, for your help in advance, if the Postprocessor script works, please let me know how it does. I have been researching this for a while now, and it appears that nobody else has this problem.

If I am missing something silly, please point it out.

Thanks again, God bless!

Howey

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Khakionion · May 17, 2013 at 04:00 AM

Okay, editing in response to your comment. Make sure that:

  1. ...your Xcode Command Line Tools are installed. (do that in Xcode, it's at Preferences -> Downloads -> Components)

  2. ...you have a CODESIGN_ALLOCATE variable set in your terminal shell.

If this command:

 echo $CODESIGN_ALLOCATE

returns nothing, then you need to define that variable. If you won't be signing apps often, just run this before signing:

 export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"

Good luck!

Original Message: Make sure your CFBundleExecutable exactly matches; it's case-sensitive (and required, so deleting it won't work).

Could you paste the actual error?

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Howey-Do-It · May 17, 2013 at 04:08 AM 0
Share

Yes, I figured that was the reason it was broken afterwards, deleting it obviously didn't work. I checked the case and it is correct. As long as it is supposed to be matching the Unix Executable File inside the $$anonymous$$acOS folder.

This is the error I get: "object file format unrecognized, invalid, or unsuitable".

Thanks for the quick response, let me know what you think.

[EDIT:] Accidentally posted it as an answer... deleted it... :)

avatar image Khakionion · May 17, 2013 at 04:36 AM 0
Share

(just an FYI, make sure you copy that whole export line, it's longer than the box in which it appears.)

avatar image Howey-Do-It · May 17, 2013 at 04:57 AM 0
Share

Haha, thank you so much! That works perfectly now, just fired up the app after installing it from the package. It's not damaged, works great.

I didn't have the Command Line Tools installed and I definitely did not have that allocate thing going.

If I may ask, why did that work?

Thanks again, God bless!

Howey

avatar image Khakionion · May 17, 2013 at 05:09 AM 0
Share

The only "damage" is just $$anonymous$$acOS being unable to find the binary; it uses CFBundleExecutable to find it, so if that's missing, it can't run the app.

The "codesign" tool uses another tool, "codesign_allocate," to allocate the space for codesigning information. By default it (and other CLI tools) are installed within Xcode.app, but not accessible at the command line.

CODESIGN_ALLOCATE is the environment variable that codesign looks for in order to find codesign_allocate. (Why Apple doesn't just automatically set that for us, I do not know.)

Happy that it worked for you!

avatar image Hamdullahshah · Jun 18, 2014 at 07:26 AM 0
Share

a script for singing(app and plugins) and packaging the build http://goo.gl/pq0Wav

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

14 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to get mac version to dmg for amazon? 1 Answer

Can't run game made in Windows on Mac 1 Answer

Unity 3.5b6 building for OSX 10.5 0 Answers

How to install Unity 4 on OSX after installing 5 2 Answers

Unity UI Tearing on resolution change on OSX 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges