apache/cordova-node-xcode

Install .xcframework

Opened this issue · 2 comments

Hello everyone

I saw that we have a function to add a .framework, but there's a way to add a .xcframework ?
I tried with the same function but this don't worked :/

Any help would be appreciated.

Hello,

I was able to add this method.
I set the sign option to true.

I hope this helps.

xcodeProj.addFramework(frameworkPath, {
      customFramework: true,
      embed: true,
      link: true,
      sign: true
});

Here's some sample code for what worked for me. I needed to embed and sign a third party framework. Without the line that adds the PBXCopyFilesBuildPhase, the embed part was being skipped.

xcodeProject.addBuildPhase([], 'PBXCopyFilesBuildPhase', 'Embed Frameworks', null, 'frameworks')
xcodeProject.addFramework(frameworkPath, {
  target: target.uuid,
  customFramework: true,
  embed: true,
  link: true,
  sign: true,
})