求助:关于提交程序到 Mac App Store

2015-09-25 23:44:09 +08:00
 HeartJ

新手一枚,在 os x 上开发了一个程序准备提交到 Mac App Store 。
开发环境, OS X 10.9.5 , xcode 6.1.1 。
提交之后,被拒了几次,拒绝信息如下

2.2 - Apps that exhibit bugs will be rejected
    Here is how we found this bug:
    The app produces no users interface or windows when launched. There is no apparent menus or items to display a main wiondow.

似乎是程序启动后没有界面。

提交程序做了以下操作:
1 、在 Member Center 中
(1). 添加了 app id
(2). 创建了 certificate ,类型为 Production: Mac App Store ,下载病安装
(3). 创建 Provisioning Profile ,类型为 Distribution: Mac App Store ,下载并安装

2 、在 xcode 中,

(1). TARGETS->General->Identity->Singing ,选择 Mac App Store; Team 选择我的开发者帐号
(2). TARGETS->Build Settings->Code Singing->Code Singing identity->Release ,选择 3rd Party Mac Developer Application; Provisioning Profile ,选择在 Member Center 中创建的文件

程序仅启用了 Sandbox ,没有使用 icloud 等功能。

在 Archive 之后, Validate 可通过, Submit 也通过。

不明白问题出在什么地方?

后来在 Archive 之后, Export 进行测试。
在使用 distribution 类型的 certificate 和 provisioning file 进行 Export ,

(1). Export a Developer ID-signed Application ,程序可以运行,进入软件的操作界面
(2). Save for Mac App Store Deployment ,程序 crash ,错误提示“ code Signature invalid ”
(3). Export as a Mac Installer Package, 程序 crash ,错误提示“ code Signature invalid ”
(4). Export as a Mac Application, 程序 crash ,错误提示“ code Signature invalid ”

查看文档,发现在本机测试提交到 Mac App Store 上的程序时,使用 Export 时的签名文件应该用 Development 类型的,于是又重新 Export ,使用的是 Development 类型的 certificate 和 Provisioning file ,

(1). Export a Developer ID-signed Application ,程序可以运行,进入软件的操作界面
(2). Save for Mac App Store Deployment ,程序 crash ,错误提示“ code Signature invalid ”
(3). Export as a Mac Installer Package, 程序 crash ,错误提示“ code Signature invalid ”
(4). Export as a Mac Application, 程序可以运行,进入软件的操作界面

请各位大侠帮帮忙,指点一下,到底是哪出了问题? Apple 拒绝是因为签名的问题,还是因为代码的问题?
如果是代码的问题,应该怎么去排查?因为在本机上要么因为“ code Signature invalid ”程序崩溃,要么就可以正常启动程序。

先谢谢大家了,已经被这个问题困扰好久了。

3661 次点击
所在节点    iDev
15 条回复
wzqcongcong
2015-09-26 10:21:00 +08:00
看 Apple 回复是说你的 app 启动后用户看不到任何界面啊~你的 app 长啥样~
wzqcongcong
2015-09-26 10:36:11 +08:00
@wzqcongcong ,还有,你打包出的 package 用 3rd Party Mac Developer Installer 签名了吗?
HeartJ
2015-09-26 11:24:50 +08:00
请大家帮忙看看什么原因,谢谢。
HeartJ
2015-09-26 11:33:09 +08:00
@wzqcongcong 界面是类似文本编辑器的样子,有输入区域和一些按钮。
在 export 出 package 时,有一个 Summary 界面, Singing identity 显示采用的是 3rd Party Mac Developer Installer 。刚开始用 V2EX ,不知道怎么贴图。抱歉。
HeartJ
2015-09-26 11:49:12 +08:00
HeartJ
2015-09-26 11:51:55 +08:00
code4life
2015-09-26 13:22:12 +08:00
There is no apparent menus or items to display a main wiondow.
你没给程序做菜单?这个不符合苹果的界面设计规范的
HeartJ
2015-09-26 19:48:26 +08:00
wzqcongcong
2015-09-26 20:22:11 +08:00
@HeartJ 从 Export 截图里看,你的 pkg 应该用 3rd Party Mac Developer Installer 签名,而不是 3rd Party Mac Developer Application ,这个是用来给 app 签的。
HeartJ
2015-09-29 19:33:03 +08:00
@wzqcongcong 您好,我看到了指出的问题。我想试着用 3rd Party Mac Developer Installer 来签名,但是我在 member center 中没找到在哪里可以创建使用“ Mac Installer Distribution ”的 provisioning file ,只能创建“ Mac App Distribution ”的 provisioning file 。
另外,“ The app produces no users interface or windows when launched. There is no apparent menus or items to display a main window ”。这句话的意思是我的程序启动的时候就 crash 了,还是可以启动,但启动后什么也没有?
谢谢。
wzqcongcong
2015-09-29 20:29:35 +08:00
@HeartJ pkg 本身的签名不需要 provisioning file 啊,它又不是 app ,直接用 cert 来签啊,我们就是这样的。至于审核的现象到底怎样,可以考虑邮件问问苹果,让它给你截个图啥的~。我觉得如果直接 crash 的话,应该能看到一个弹出框的,但审核的人好像没提到这个。
HeartJ
2015-09-30 18:34:36 +08:00
@wzqcongcong 今天已经问苹果了,是 crash 了还是可以启动但没有界面的问题。
用 cert 来签名 pkg 怎么做,麻烦指点一下,谢谢。
HeartJ
2015-10-02 01:09:20 +08:00
@code4life
@wzqcongcong
刚刚收到 apple 的回复

The app launches but no UI appears. No crashes or logs are generated. The user must quit the app via File > Quit DraftNote since no other actions are possible.

应该是 app 可以启动,但是不会显示用户界面的意思吧。这一般是因为什么引起的呢?因为在本地测试是可以启动的啊。
code4life
2015-10-02 15:31:02 +08:00
从这句来看 The user must quit the app via File > Quit DraftNote since no other actions are possible. 程序是在后台的,就是不被显示。你的界面应该有什么机制控制主界面的显示或隐藏吧?

苹果这个封闭环境有利有弊,这种情况只能依赖他们给你更多地信息去判断了。
HeartJ
2015-12-12 22:54:04 +08:00
问题目前搞清楚了。我更新了系统到 OSX 10.11.1 , Xcode 更新为 7.1.1 。 Apple 反馈给我的无界面的问题复现了,经过排查,是因为为 NSFont 赋值的时候,内容为 nil 。当时使用的字体是 Simsun ,跟新系统后,没有这个字体,所以界面就会卡住。现在,这个问题已经解决。但在提交的过程中,又遇到了新的问题, ls 两位大哥,如果有空的话,请帮忙看看。谢谢了。
@code4life
@wzqcongcong
新问题: http://www.v2ex.com/t/243119#reply0

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/223757

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX