Skip to content

Commit

Permalink
feat(xcode): Added EXCLUDED_ARCHS support for specific build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
matejpolak committed Feb 27, 2021
1 parent 1387a37 commit 5ef7487
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions packages/rnv-engine-rn/src/sdks/sdk-xcode/xcodeParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,28 @@ const _parseXcodeProject = (c, platform) => new Promise((resolve) => {
}

if (excludedArchs) {
xcodeProj.updateBuildProperty(
'EXCLUDED_ARCHS',
`"${excludedArchs.join(' ')}"`
);
const tempExcludedArchs = [];

if (typeof excludedArchs.forEach === 'function') {
excludedArchs.forEach((arch) => {
if (typeof arch === 'string') tempExcludedArchs.push(arch);
if (typeof arch === 'object') {
Object.keys(arch).forEach((key) => {
xcodeProj.updateBuildProperty(
`"EXCLUDED_ARCHS[${key}]"`,
`"${arch[key]}"`
);
});
}
});
}

if (tempExcludedArchs.length) {
xcodeProj.updateBuildProperty(
'EXCLUDED_ARCHS',
`"${tempExcludedArchs.join(' ')}"`
);
}
}


Expand Down

0 comments on commit 5ef7487

Please sign in to comment.