如何获取 xcode 应用程序的 .app 文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1984727/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:13:44  来源:igfitidea点击:

How to get .app file of a xcode application

xcode

提问by Shakti

I have created an xcode project. Now I want to give .app file to my friend to use that application. From where do I get this file? How to install this .app file in his Applications folder using an installer package?

我创建了一个 xcode 项目。现在我想将 .app 文件提供给我的朋友使用该应用程序。我从哪里得到这个文件?如何使用安装程序包在他的 Applications 文件夹中安装这个 .app 文件?

采纳答案by iamamac

Build a release version, and the .app file is under build/Release folder of your project. Just copy it to Applications folder of your friend's machine. I don't think you need to build a installer.

构建发布版本,.app 文件位于项目的 build/Release 文件夹下。只需将其复制到您朋友机器的 Applications 文件夹中即可。我认为您不需要构建安装程序。

回答by Roel Van de Paar

You can find the .app file here:

您可以在此处找到 .app 文件:

~/Library/Developer/Xcode/DerivedData/{app name}/Build/Products/Deployment/

~/Library/Developer/Xcode/DerivedData/{app name}/Build/Products/Deployment/

(credit for path goes to https://stackoverflow.com/a/9673810/1208218)

(路径的功劳转到https://stackoverflow.com/a/9673810/1208218

SIDENOTE: I had a lot of fun trying to get this into my iPad after that. It worked however. Using Snow Leopard + Xcode 4.2 + iPad with IOS 5.1.1 :) - I used the iPhone configuration utility to get the app into the ipad (you have to add the app, then click on the device, then click "install" behind the app you just added in the "application library" of iphone configuration utility) and had to create a Distribution Provisioning Profile (https://developer.apple.com/ios/manage/provisioningprofiles/viewDistributionProfiles.action) and get the WWDR certificate (https://developer.apple.com/ios/manage/certificates/team/distribute.action) and finally change the build settings in Xcode after all the certificates were in place (https://developer.apple.com/legacy/library/technotes/tn2250/_index.html) - but after much fun I am now looking at my first app on my iPad :) - btw, for getting apps into the app store you need to create a app store Distribution Provisioning Profile, while for ad hoc installs like these you create an ad hoc one. There is a bit more to it, but I think these are the most important and tricky steps. Enjoy.

旁注:在那之后,我尝试将它放入我的 iPad 中获得了很多乐趣。然而它奏效了。使用 Snow Leopard + Xcode 4.2 + iPad 和 IOS 5.1.1 :) - 我使用 iPhone 配置实用程序将应用程序导入 ipad(您必须添加应用程序,然后单击设备,然后单击后面的“安装”应用程序您刚刚添加到 iphone 配置实用程序的“应用程序库”中),并且必须创建分发配置文件(https://developer.apple.com/ios/manage/provisioningprofiles/viewDistributionProfiles.action)并获取 WWDR 证书(https://developer.apple.com/ios/manage/certificates/team/distribute.action),最后在所有证书到位后更改 Xcode 中的构建设置(https://developer.apple.com/legacy/library/technotes/tn2250/_index.html) - 但在玩得很开心之后,我现在正在 iPad 上查看我的第一个应用程序 :) - 顺便说一句,用于将应用程序放入应用程序商店您需要创建一个应用商店分发配置文件,而对于这样的临时安装,您需要创建一个临时安装。还有一点,但我认为这些是最重要和最棘手的步骤。享受。

PS. Just remembered that you also have to set the build type (top left of xcode) to "iOS device", otherwise it will never sign your application. So the path name above only has limited value: yes, it will have the .app file in it, but no you can't upload it (at least not using the iphone configuration utility) since it is not code signed - you will get an "Could not copy validate signature" error. So change it to "iOS device" and build (remember to select the right certificates in the build section of xcode as per the url info above). In that same build section, you can also set the "Installation Build Products Location" to a different path, so that you can determine where the .app (the one that is properly code signed) ends up.

附注。请记住,您还必须将构建类型(xcode 的左上角)设置为“iOS 设备”,否则它将永远不会对您的应用程序进行签名。所以上面的路径名只有有限的值:是的,它里面会有 .app 文件,但不,你不能上传它(至少不使用 iphone 配置实用程序),因为它没有代码签名 - 你会得到“无法复制验证签名”错误。因此,将其更改为“iOS 设备”并构建(请记住根据上面的 url 信息在 xcode 的构建部分选择正确的证书)。在同一构建部分中,您还可以将“安装构建产品位置”设置为不同的路径,以便您可以确定 .app(正确代码签名的那个)的最终位置。

回答by Ahmet Kazim Günay

  1. xCode window tab
  2. Organizer
  3. Right click to the archive you want to get app
  4. Show in finder
  5. Right click to (ProductName….). xcarchive file
  6. Show package contents
  7. Products
  8. Applications
  1. xCode 窗口选项卡
  2. 组织者
  3. 右键单击要获取应用程序的存档
  4. 在取景器中显示
  5. 右键单击(产品名称....)。存档文件
  6. 显示包裹内容
  7. 产品
  8. 应用

Finally- THERE IS YOUR .APP PROJECT FILE !

最后- 有你的 .APP 项目文件!

回答by mikecsh

The application will appear in your projects Build directory. In the source pane on the left of the Xcode window you should see a section called 'Products'. Listed under there will be your application name. If you right-click on this you can select 'Reveal in Finder' to be taken to the application in the Finder. You can send this to your friend directly and he can just copy it into his Applications folder. Most applications do not require an installer package on Mac OS X.

该应用程序将出现在您的项目 Build 目录中。在 Xcode 窗口左侧的源代码窗格中,您应该会看到一个名为“产品”的部分。下面列出的是您的应用程序名称。如果您右键单击它,您可以选择“在 Finder 中显示”以进入 Finder 中的应用程序。您可以直接将其发送给您的朋友,他只需将其复制到他的应用程序文件夹中即可。大多数应用程序在 Mac OS X 上不需要安装程序包。

回答by douyw

Under Xcode 4.5.2, you can find the .app file in this way:

在Xcode 4.5.2下,可以这样找到.app文件:

  1. Select Window > Organizer in the Xcode's menu(or just press 'Shift+Command+2')
  2. Select your project on the left side of Organizer, and you will find the Derived Data path on the right side. Just click the mini arrow in the end of the path, this will open Finder at the path.
  3. In the Finder, click "Build > Products > Release", you will find the .app.
  1. 在 Xcode 的菜单中选择 Window > Organizer(或者直接按“Shift+Command+2”)
  2. 在 Organizer 左侧选择您的项目,您将在右侧找到 Derived Data 路径。只需单击路径末尾的小箭头,这将在路径上打开 Finder。
  3. 在 Finder 中,单击“构建 > 产品 > 发布”,您将找到 .app。

回答by Priyam

~/Library/Developer/Xcode/DerivedData/{app name}/Build/Products/Debug-iphonesimulator/

~/Library/Developer/Xcode/DerivedData/{app name}/Build/Products/Debug-iphonesimulator/

回答by Marc Fearby

In Xcode 7 a quick way is to use Product > Archive. It's probably not a signed copy for submission but it's good enough to give to somebody else for testing.

在 Xcode 7 中,一个快速的方法是使用 Product > Archive。它可能不是用于提交的签名副本,但足以提供给其他人进行测试。

回答by Samus

Xcode 8.1

Xcode 8.1

Product -> Archive Then export on the right hand side to somewhere on your drive.

产品 -> 存档然后将右侧的导出到驱动器上的某个位置。

回答by NITIN SURANGE

I know as for Appium Mobile Automation you need .app file to run ios app on Simulator.So as like me many of you face this problem. So I explain how to create that .app file and where it is located.

我知道对于 Appium Mobile Automation,您需要 .app 文件才能在模拟器上运行 ios 应用程序。所以和我一样,你们中的许多人都面临这个问题。所以我解释了如何创建该 .app 文件以及它的位置。

1.Open Xcode.

1.打开Xcode。

2.Click on your sample project.(If you don't have then click on create new xcode project)

2.单击您的示例项目。(如果没有,请单击创建新的 xcode 项目)

3.In left panel inside screen you will see products folder then click and expand that, you will see the list.

3.在屏幕内的左侧面板中,您将看到产品文件夹,然后单击并展开它,您将看到列表。

  1. Then right click on .app file and click on Show in Finder and thats your .app file. Now you can copy or use that path in capabilities for appium desktop or in framework.
  1. 然后右键单击 .app 文件并单击在 Finder 中显示,这就是您的 .app 文件。现在您可以在 appium 桌面或框架的功能中复制或使用该路径。

Check the attached screenshot for detail

检查附加的屏幕截图以了解详细信息