美文网首页
Mac App 的发布

Mac App 的发布

作者: semiscone | 来源:发表于2020-01-09 23:49 被阅读0次

    使用 Xcode 打开项目

    执行 Product->Archive

    过程中会提示生成各种证书

    Validate 通过后就可以点击 Distribute App 进行发布提交了


    Validate and Distribute

    碰到的问题

    版本问题

    • 错误信息

    App Store Connect Operation Error
    The Info.plist in the package must contain the CFBundleVersion key.

    App Store Connect Operation Error
    The Info.plist in the package must contain the CFBundleShortVersionString key.

    • 解决方法

    在文件 Info.plist 手动增加以下字段

    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    

    沙箱

    • 错误信息
      App Store Connect Operation Error
      App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list: [( "com.alithon.miniterminal.pkg/Payload/MiniTerminal.app/Contents/MacOS/MiniTerminal" )] Refer to App Sandbox page at https://developer.apple.com/devcenter/mac/app-sandbox/ for more information on sandboxing your app.
    • 解决方法
      在 Signing & Capabilities 页面点击 +Capability 添加 Sandbox


      Add Sandbox

    图标

    • 错误信息

    App Store Connect Operation Error

    Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon

    • 解决方法

    找到一个 1024x1024的图片,执行以下生成对应大小的图片

    sips -z 16 16     pic.png --out icons.iconset/icon_16x16.png
    sips -z 32 32     pic.png --out icons.iconset/icon_16x16@2x.png
    sips -z 32 32     pic.png --out icons.iconset/icon_32x32.png
    sips -z 64 64     pic.png --out icons.iconset/icon_32x32@2x.png
    sips -z 64 64     pic.png --out icons.iconset/icon_64x64.png
    sips -z 128 128   pic.png --out icons.iconset/icon_64x64@2x.png
    sips -z 128 128   pic.png --out icons.iconset/icon_128x128.png
    sips -z 256 256   pic.png --out icons.iconset/icon_128x128@2x.png
    sips -z 256 256   pic.png --out icons.iconset/icon_256x256.png
    sips -z 512 512   pic.png --out icons.iconset/icon_256x256@2x.png
    sips -z 512 512   pic.png --out icons.iconset/icon_512x512.png
    sips -z 1024 1024   pic.png --out icons.iconset/icon_512x512@2x.png
    

    然后逐个拖到AppIcon里即可

    相关文章

      网友评论

          本文标题:Mac App 的发布

          本文链接:https://www.haomeiwen.com/subject/zdnuactx.html