You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/08/31 05:58:57 UTC

[GitHub] [cordova-node-xcode] TheMartas29 opened a new issue #120: Is there any documentation for this project?

TheMartas29 opened a new issue #120:
URL: https://github.com/apache/cordova-node-xcode/issues/120


   I would like to ask if there is some sort of documentation for this project or perhaps can someone answer my questions?
   
   I need to create "group" in the xcode project an add files in it. Then add these files into "compile sources" in "build phases". Is it possible to do this? I tried to create group with `pbxCreateGroup()` function and to add it in Xcode project I used `addPbxGroupFunction()`. But non of this seems to work. Also I tried to add the files directly to project with `addFile()` and `addHeaderFile()` / `addSourceFile()` functions but without success. I have to admit that first time I ran the script the files were added into "compile sources" in "build phases" but I wasn't able to do this again. Also I'm not really sure what the `myProj.parse()` does and how should I use it. 
   
   I know it is a lot of things but hopefully someone could help me. 
   
   script that I used: 
   ```
   project.parse(function(err) {
       if(err) console.log(err);
   
       var group = project.pbxCreateGroup("ASIHTTPRequest");
   
       files.forEach(file => {
           console.log(file);
   
           if (file.indexOf(".h") >= 0) {
                   project.addFile(file, group);
                   project.addHeaderFile(file);
                   fs.writeFileSync(_PROJECT_FILE_PATH, project.writeSync());
           }
           else {
                   project.addFile(file, group);
                   project.addSourceFile(file);
                   fs.writeFileSync(_PROJECT_FILE_PATH, project.writeSync());
           }
       })
   
       project.addPbxGroup([_PROJECT_FILE_PATH], "ASIHTTPRequest", _PROJECT_FILE_PATH);
       fs.writeFileSync(_PROJECT_FILE_PATH, project.writeSync());
   })
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org