How to create macOS app bundle correctly?

0

I tried to create an .app bundle but I do something wrong and it doesn't start. So I have folder structure

MayApp.app
  - Contents
      - MacOS
          - Useless_Auto_Clicker_0.6.0 (exec file)
      - Resources
          - rt (some resource folder for the app)
          - AppIcon.icns
      - Info.plist

Info.plist content

<?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>CFBundleGetInfoString</key>
  <string>Foo</string>
  <key>CFBundleExecutable</key>
  <string>Useless_Auto_Clicker_0.6.0</string>
  <key>CFBundleIdentifier</key>
  <string>com.your-company-name.www</string>
  <key>CFBundleName</key>
  <string>foo</string>
  <key>CFBundleIconFile</key>
  <string>AppIcon.icns</string>
  <key>CFBundleShortVersionString</key>
  <string>0.01</string>
  <key>CFBundleInfoDictionaryVersion</key>
  <string>6.0</string>
  <key>CFBundlePackageType</key>
  <string>APPL</string>
  <key>IFMajorVersion</key>
  <integer>0</integer>
  <key>IFMinorVersion</key>
  <integer>1</integer>
</dict>
</plist>

App name is recognized, icon is loaded but I can't launch the application. Or nothing happens, or some uniformative error is thrown.

I think it's something wrong with the executable file. Even if it has all permissions (after chmod +x) it still isn't recognized as an executable. But if you run it from terminal it starts well

I stuck here and don't know where to search the solution

Here the link to download the app folder, if you want to try it yourself DropBox link

Serhii Dikobrazko

Posted 2019-06-20T13:04:16.647

Reputation: 101

No answers