我在 Xcode 中编写了一个程序,它是一个简单的计算器,它采用第一个数字和第二个数字,然后根据单选按钮进行加、减、乘或除。我构建并运行该程序并运行良好。当我在 Mac 上向我的朋友展示时,当您双击该程序时,该程序会在托盘中弹出约 0.05 秒,然后消失,我们永远无法真正运行该程序。但在我的电脑上它仍然可以完美运行。
我做错了什么?如何获取我编写的程序并在不同的 Mac 上运行它?我将版本设置为 10.5,但活动 SDK 设置为 10.6。它可以在 10.5 和 10.6 模拟器中运行。一个朋友像我一样有 10.6.3,另一个朋友有 10.5.x(不记得最后一部分了)。
为了获取该应用程序,我从调试更改为发布,并将活动 SDK 设置为 10.5。然后在发布文件夹中我找到了该应用程序并通过 iChat 发送了该应用程序。
我觉得如果我制作了一个合法的应用程序来分发,这将在将来成为一个问题。
谢谢你!
我上传了发布版本,以便更好地向您展示我的意思。
http://www.filefront.com/16472557/Mac%20App%20Test.zip
I made a program in Xcode, being a simple calculator that takes a first number, and a second number, and then either adds,subtracts,multiplies, or divides depending on the radio button. I build and run and the program comes up and works fine. When I went to show my friends on their macs, when you double click on the program the program pops in the tray for like .05 seconds and then disappears and we never can actually run the program. It still works perfect however on my computer.
What am I doing wrong? How can I take the program I made, and run it on different macs? I have the release set to 10.5 but the active SDK to 10.6. It runs in both 10.5 and 10.6 simulators. One friend has 10.6.3 like me and the other has 10.5.x(cant remember the last part).
To get the app, I changed from debug to release and set active SDK to 10.5. Then in the release folder I found the app and sent that over iChat.
I feel this will be a problem in the future if I ever make a legit application to distribute.
Thank you!
I uploaded the release version to show you better what I mean.
http://www.filefront.com/16472557/Mac%20App%20Test.zip
发布评论
评论(2)
您需要关闭 ZeroLink,以便您需要的所有代码都包含在可执行文件中。您可以在链接构建设置集合中执行此操作。
当您切换到发布版本时,ZeroLink 应该已关闭。我不确定为什么没有,但你应该能够手动完成。
希望有帮助。
You will need to turn off ZeroLink so that all the code you need is included in the executable. You can do that in the Linking build settings collection.
ZeroLink should have been turned off when you switched to release. I'm not sure why it didn't, but you should be able to do it manually.
Hope that helps.
演练:按 ctrl + 图标 ->打开以防止此应用程序的未签名安全处理。
Walkthrough: Press ctrl + icon -> open to prevent unsigned security handling for this app.