apache / apache/cordova-node-xcode
How do you define the target for Specific Build Settings or Adding Frameworks?
- 主要语言
- JavaScript
- 星标
- 217
- 派生
- 102
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 6
描述
I've made an App Extension with the `addTarget` function but even though I have the target defined like so :
```javascript
// (some global paths deliberately left out but they all point correctly)
var extFiles = [
'NotificationService.h',
'NotificationService.m',
`${extName}-Info.plist`,
'appgroupconfig.json',
'PushExtension.entitlements',
];
const proj = xcode.project(projPath);
proj.parseSync();
// Copy in the extension files
fs.mkdirSync(`${iosPath}${extName}`);
extFiles.forEach(function (extFile) {
let targetFile = `${iosPath}${extName}/${extFile}`;
fs.createReadStream(`${sourceDir}${extFile}`)
.pipe(fs.createWriteStream(targetFile));
});
// Add a target for the extension
let extTarget = proj.addTarget(extName, 'app_extension');
```
I cannot seem to define any buildProperties for it specifically. For example, the function
```javascript
pbxProject.prototype.updateBuildProperty = function(prop, value, build)
```
takes in the `property key` the `value` and the `build` but this will only update the main project and not any of the targets defined.
The target parameter in the `addFramework` function doesn't appear to work either. When digging into the `pbxfile` that it creates to `addToFrameworkSearchPaths` the `target` is not passed or accessed in the constructor. The following code doesn't add the Framework to the target:
```javascript
var opt = {target: extTarget.uuid, embed: true, customFramework: true, sign: true}
proj.addFramework(`${custom_framework_path}`, opt);
```
Can somebody please point me to the right direction here? I don't know what I'm doing wrong.
贡献指南
调研方向
首先使用报告中显示的 extTarget.uuid,跟踪 pbxProject.prototype.updateBuildProperty 和 addFramework,包括 pbxfile/addToFrameworkSearchPaths 路径。完成的标准是构建属性和自定义 framework 应用于添加的 app-extension target,而不只是主项目。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, nodejs
- 领域
- build-system, mobile, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100