NativeScript / NativeScript/nativescript-cli
Unable to use --provision option to build or run iOS apps
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.1k
- 派生
- 204
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 8
描述
Environment
OSX: 10.15.4
Output of tns doctor:
✔ Getting NativeScript components versions information...
✔ Component nativescript has 6.7.4 version and is up to date.
✔ Component tns-core-modules has 6.5.2 version and is up to date.
✔ Component tns-ios has 6.5.1 version and is up to date.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 11.5.0 satisfies minimum required version 10.
Not interested in Android in this project, so Android bits are not configured
Describe the bug
I am unable to run or build the app.
I can build the prepared app using XCode (once I fix the signing configuration, another potential issue with prepare command)
When trying to list available provisioning profiles:
tns <run|build|provision> ios --provision
Results in the not so friendly:
Expected """ or [^'"'] but "'" found.
When I run the command with the logging level increased:
tns <run|build|provision> ios --provision --log trace
I get the more useful:
...
Current CLI version: 6.7.4
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/j/Projects/visionlab/sad-dev/hooks' ]
BeforeHookName for command resolveCommand is before-resolveCommand
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/j/Projects/visionlab/sad-dev/hooks' ]
AfterHookName for command resolveCommand is after-resolveCommand
Validate options for platform: iOS
SyntaxError: Expected "\"" or [^'"'] but "'" found.
at peg$buildStructuredError (/usr/local/lib/node_modules/nativescript/node_modules/ios-mobileprovision-finder/parsers/security-find-identity.js:314:12)
at Object.peg$parse [as parse] (/usr/local/lib/node_modules/nativescript/node_modules/ios-mobileprovision-finder/parsers/security-find-identity.js:999:11)
at Object.read (/usr/local/lib/node_modules/nativescript/node_modules/ios-mobileprovision-finder/index.ts:243:43)
at IOSProvisionService.<anonymous> (/usr/local/lib/node_modules/nativescript/lib/services/ios-provision-service.js:80:55)
...
I tried to checkout what was going on above but it's complicated. I think it fails when trying to parse provisioning profiles.
Sadly the same error occurs when I try to supply a provisioning profile:
tns run ios --provision <UUID or Name>
Same thing happens on a newly created app.
Trying to run the app with no provisioning profile supplied in the command line fails with a signing error (regardless of the PROVISIONING_PROFILE or DEVELOPMENT_TEAM) being set in app/App_Resources/build.xcconfig but that's probably another issue.
To Reproduce
tns create sad-dev
cd sad-dev
tns run ios --provision
Expected behavior
A list of provisioning profiles
Additional context
I am running on Catalina. All seemed to work before I updated the OS. But sadly other stuff changed as well: NS version, etc...
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在报告的环境中使用 tns create sad-dev 重现问题,然后运行 tns run ios --provision。从 ios-provision-service.js 和 ios-mobileprovision-finder 解析器开始,尤其检查 parsers/security-find-identity.js,其中 trace 显示解析失败。完成的标准是可以列出 provisioning profiles,并且可以使用提供的 profile,而不会出现报告中的语法错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- ios, javascript
- 领域
- cli, mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100