[英]NativeScript: How to deploy iOS app to physical device?
I created an account with Telerik, signed a certificate with Apple Dev Centre and got a mobile provisioning. 我在Telerik创建了一个帐户,与Apple Dev Center签署了一个证书并获得了移动配置。 I used Appbuilder to import the certificate and the provision to my laptop.
我使用Appbuilder将证书和配置导入我的笔记本电脑。 But I still cannot deploy my app on iOS using
但我还是无法在iOS上部署我的应用程序
tns deploy ios
The warning says: 警告说:
IMPORTANT: Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your OS X system. 重要信息:在构建iOS设备之前,请确认您已在OS X系统上配置了一对有效的证书和配置文件。
But when I do "appbuilder provision" and "appbuilder certificate", the commands show me they have been successfully imported. 但是,当我执行“appbuilder provision”和“appbuilder certificate”时,命令显示我们已成功导入它们。 I also tried:
我也尝试过:
appbuilder deploy ios --provision '<name>' --certificate '<title>'
It says no project found at or above path and neither was a --path specified. 它说没有在路径上或路径上找到任何项目,也没有指定--path。 But I am in the project folder.
但我在项目文件夹中。 :/
:/
For me, I used: 对我来说,我用过:
$ tns deploy ios --device <device-udid>
Now, beforehand I... 现在,事先我...
Registered my device with Apple 用Apple注册我的设备
Created an explicit Bundle ID with Apple that matches the one that Native Script places in the package.json. 创建与苹果明确包ID 相匹配的一个本地脚本中的package.json地方。 This is what mine looked like.
这就是我的样子。
"nativescript": { "id": "org.nativescript.<app-name>", "tns-ios": { "version": "3.0.1" }, "tns-android": { "version": "3.0.1" } }
I then made provisioning profile with Apple https://developer.apple.com/account/ios/profile/ that then included the device and Bundle ID that I just made. 然后,我使用Apple https://developer.apple.com/account/ios/profile/制作配置文件,然后包含我刚刚创建的设备和Bundle ID。
Then in the file /app/App_Resources/iOS/build.xcconfig 然后在文件/app/App_Resources/iOS/build.xcconfig中
ie. 即。
DEVELOPMENT_TEAM = <Apple-dev-team-name>
PROVISIONING_PROFILE = <provision-profile-id>
The provison profile is found in User/Library/MobileDevice/Provisioning\\ Profiles/ 可在用户/库/ MobileDevice / Provisioning \\ Profiles /中找到provison配置文件
If there is more than one, sort be creation date and grab the first one 如果有多个,则排序为创建日期并抓住第一个
Then ctrl-click and choose "Rename" copy the ID and paste it into the build.xcconfig file from earlier. 然后按住Ctrl键单击并选择“重命名”复制ID并将其粘贴到之前的build.xcconfig文件中。
$ tns device ios --available-devices
ie 即
│#│Device Name│Platform│Device Identifier│ Type │ Status │
│1│ iPhone │ iOS │ <device-udid> │Device│Connected│
$ tns deploy ios --device <device-name>
PS : Let me know if this works. PS:如果有效,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.