NativeScript / NativeScript/nativescript-cli

Ability to merge ExportOptions.plist from App_Resources and from plugins

未关闭
#4,528 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature help wanted
主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

It’ll be great to support merging of ExportOptions.plist file from App_Resources and from plugins. This way every user will be able to add custom options to this file and NativeScript CLI will merge them with the default options. Also, every plugin author will be able to add such custom options in platforms/ios folder of the plugin in case when it is required.

Currently NativeScript CLI supports merging of Info.plist files from plugins and from App_Resources. As the format of ExportOptions.plist and Info.plist is the same (the both files are .plist format), it seems the merging of ExportOptions.plist should be very similar to the merging of Info.plist files. Here is the code that merges Info.plist files. The mergeInfoPlists function has hardcoded path to the Info.plist file. It seems the common logic of this function can be extracted to a separate function, for example mergePlistFile. After that we can call this function for Info.plist and ExportOptions.plist:

mergePlistFile(<path to Info.plist>);
mergePlistFile(<path to ExportOptions.plist>);

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 lib/services/ios-project-service.ts 中的 mergeInfoPlists 函数和硬编码的 Info.plist 路径开始。跟踪 plugin 和 App_Resources plist 文件的定位与合并方式,然后确定同一个入口点应如何涵盖 ExportOptions.plist。完成的标准是两个 plist 源都可以提供自定义的 ExportOptions.plist 选项,同时现有的 Info.plist 合并仍能正常工作。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
cli, mobile-dev
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。