apache / apache/cordova-node-xcode

How do you define the target for Specific Build Settings or Adding Frameworks?

Abierto
#54 5 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement help wanted support
Lenguaje dominante
JavaScript
Estrellas
217
Forks
102
Merge medio
2 d 3 h
PR fusionados (30 d)
6

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza siguiendo pbxProject.prototype.updateBuildProperty y addFramework, incluida la ruta pbxfile/addToFrameworkSearchPaths, utilizando extTarget.uuid tal como se muestra en el informe. Se considera terminado cuando las propiedades de compilación y el framework personalizado se aplican al destino de app-extension añadido, en lugar de aplicarse únicamente al proyecto principal.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, nodejs
Área
build-system, mobile, tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.