我是 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 上测试它或者我做错了什么?提前致谢!
最佳答案
如评论中提供的链接所示,要在真实设备上进行测试,您需要提供开发团队 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>
关于ios - 如何在真实 iPhone 上测试 NativeScript 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40413822/