【问题标题】:How to test NativeScript app on real iPhone如何在真实 iPhone 上测试 NativeScript 应用程序
【发布时间】:2017-03-17 18:21:40
【问题描述】:

我是 NativeScript 的新手,我刚刚制作了我的第一个应用程序。我的应用需要在真 iPhone 上进行测试;但是,我不知道如何在真正的 iPhone 而不是模拟器上测试它。我尝试查看 appbuilder 文档,但不知道如何在 iPhone 上对其进行测试。我在插入 iPhone 时尝试使用 tns run ios,但我得到了这个:

=== BUILD TARGET LOKale OF PROJECT LOKale WITH CONFIGURATION Debug ===

Check dependencies
Signing for "LOKale" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
Code signing is required for product type 'Application' in SDK 'iOS 10.0'

** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)
Command xcodebuild failed with exit code 65
# run ios

我不知道为什么我不能在 iPhone 上运行它。谁能告诉我如何在真正的 iPhone 上测试它或者我做错了什么?提前致谢!

【问题讨论】:

标签: ios iphone nativescript


【解决方案1】:

如 cmets 中提供的链接所示,要在真实设备上进行测试,您需要提供 开发团队 ID

以下是在 NativeScript 应用程序中执行此操作的步骤:

  • 打开app/App_Resources/iOS/build.xcconfig
  • 取消注释(或添加)DEVELOPMENT_TEAM = YOUR_TEAM_ID;
  • 放置您的团队 ID 并重新构建您的应用程序

更新:你也可以使用

tns run ios --provision

查看可用的配置文件并使用

构建应用程序
tns run ios --provision <my-provision-profile>

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多