apache / apache/cordova-node-xcode

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

Ouverte
#54 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement help wanted support
Langage dominant
JavaScript
Étoiles
217
Forks
102
Merge moyen
2 j 3 h
PR mergées (30 j)
6

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par suivre pbxProject.prototype.updateBuildProperty et addFramework, y compris le chemin pbxfile/addToFrameworkSearchPaths, en utilisant extTarget.uuid indiqué dans le rapport. C’est terminé lorsque les propriétés de build et le framework personnalisé sont appliqués à la cible d’app-extension ajoutée, plutôt qu’uniquement au projet principal.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, nodejs
Domaine
build-system, mobile, tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.