使用 Ionic 部署 IOS
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33076886/
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
IOS Deployment with Ionic
提问by Nikola
Is it possible to deploy an ionic app to your ios device without publishing it on the app store? I do have a Mac and a developers license, the app I want to use is for private use (for about 5 users).
是否可以在不将 ionic 应用程序发布到应用程序商店的情况下将其部署到您的 ios 设备?我确实有 Mac 和开发人员许可证,我想使用的应用程序仅供私人使用(大约 5 个用户)。
采纳答案by Guillem Cucurull
Of course, you just need Xcode to generate the ipa so you can install it anywhere.
当然,您只需要 Xcode 来生成 ipa,这样您就可以将其安装在任何地方。
Check this guide: http://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.htmlAs ionic is essentially cordova the steps are similar.
检查本指南:http: //cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html由于 ionic 本质上是cordova,因此步骤相似。
回答by Nikola
Yes, indeed you can.
是的,确实可以。
You first have to build your project for ios:
您首先必须为 ios 构建项目:
ionic build ios
Then you have to open up (with Xcode) the .xproj project that was generated by ionic build ios
command (you'll see the exact location in the command's output).
然后您必须(使用 Xcode)打开由ionic build ios
命令生成的 .xproj 项目(您将在命令的输出中看到确切的位置)。
Now you have to connect your iPhone to you Mac computer and you'll be able to choose your iPhone as a "deployment" device.
现在您必须将您的 iPhone 连接到您的 Mac 计算机,您将能够选择您的 iPhone 作为“部署”设备。
Click run in Xcode and after the Xcode finishes guiding you through creating a provisioning profile you'll have the app on your phone.
单击在 Xcode 中运行,在 Xcode 完成指导您创建配置文件后,您的手机上将拥有该应用程序。
For more info take a look at https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html
回答by DEEP ADHIYA
Steps to upload ipa to App Store and Device (ionic App)
将 ipa 上传到 App Store 和设备的步骤(ionic App)
Step 1 1. Import Project to Mac Laptop 2. Create a new Project in Mac via terminal and import all SRC Folder from old project to new Project. 3. Open the New Project. 4. Copy the Dependency from old Projects from Dependencies and paste in New Project in Dependencies 5. Don't remove old Dependency of new Project just install new one 6. Fire command Npm install once dependency and Src Folder is copied to new Project 7. Go to config.xml change widget id, version, Description, author email, href. 8. Change Version in package-lock.json 9. Npm install 10. Don't Forget to Save All Files.
步骤 1 1. 将项目导入 Mac 笔记本电脑 2. 通过终端在 Mac 中创建一个新项目,并将旧项目中的所有 SRC 文件夹导入新项目。3. 打开新项目。4.从依赖项复制旧项目中的依赖项并粘贴到依赖项中的新项目5.不要删除新项目的旧依赖项,只需安装新的6.一旦依赖项和Src文件夹复制到新项目7.转到 config.xml 更改小部件 ID、版本、描述、作者电子邮件、href。8. 在 package-lock.json 中更改版本 9. npm install 10. 不要忘记保存所有文件。
Step 2 1. Ionic serve -l If you have installed Native Plugins (I.e. camera, network, base 64 etc.), Reinstall that All Native Plugins. 2. Verify that app is running in browser 3. Ionic cordova build ios
第 2 步 1. Ionic serve -l 如果您已经安装了原生插件(即相机、网络、base 64 等),请重新安装所有原生插件。2. 验证应用程序是否在浏览器中运行 3. Ionic cordova build ios
Step 3 1. Go to developer.apple.com 2. Click on Identifier-> App Id. 3. Register App Id Name and Bundle Id 4. Click on Continue and Register 5. Go to Provisional Profile 6. Click + Sign 7. Click on Development 8. Select Ios App Development 9. Select IPhone Listed 10. Generate Profile Name by Giving Name 11. Continue and Profile will be Ready 12. Click on Done.
第 3 步 1. 前往 developer.apple.com 2. 单击 Identifier-> App Id。3. 注册应用程序 ID 名称和捆绑 ID 4. 单击继续并注册 5. 转到临时配置文件 6. 单击 + 签名 7. 单击开发 8. 选择 Ios App Development 9. 选择列出的 iPhone 10. 通过提供生成配置文件名称名称 11. 继续,配置文件将准备就绪 12. 单击完成。
Step 4 1. Go to Project-> ios-> projectName.xcodeproj 2. Xcode will be opened when you open file projectName.xcodeproj 3. Click on Project and Automatic Signing 4. Select your Device and Click on Run Button 5. Change Bundle Name and Bundle Identifier Name in INFO 6. File -> Project Setting ->Shared Project Setting -> Build Setting ->Select Legacy Build System instead of Default (Verify Once) 7. Click on Run Button Your App will be Deployed in iPhone
第 4 步 1. 转到 Project-> ios-> projectName.xcodeproj 2. 当您打开文件 projectName.xcodeproj 时 Xcode 将被打开 3. 单击项目和自动签名 4. 选择您的设备并单击运行按钮 5. 更改捆绑包INFO 中的名称和捆绑标识符名称 6. 文件 -> 项目设置 -> 共享项目设置 -> 构建设置 -> 选择传统构建系统而不是默认值(验证一次) 7. 单击运行按钮您的应用程序将在 iPhone 中部署