Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/add-swift-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,17 @@ module.exports = context => {
console.log('Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to: YES', 'for build configuration', buildConfig.name);
}

if (xcodeProject.getBuildProperty('LD_RUNPATH_SEARCH_PATHS', buildConfig.name) !== '"@executable_path/Frameworks"') {
xcodeProject.updateBuildProperty('LD_RUNPATH_SEARCH_PATHS', '"@executable_path/Frameworks"', buildConfig.name);
console.log('Update IOS build setting LD_RUNPATH_SEARCH_PATHS to: @executable_path/Frameworks', 'for build configuration', buildConfig.name);
let ldRunpathSearchPaths = xcodeProject.getBuildProperty('LD_RUNPATH_SEARCH_PATHS', buildConfig.name);
if (ldRunpathSearchPaths === undefined || ldRunpathSearchPaths.indexOf('"@executable_path/Frameworks"') === -1) {
if (ldRunpathSearchPaths === undefined) {
ldRunpathSearchPaths = ['"$(inherited)"', '"@executable_path/Frameworks"'];
} else if (typeof ldRunpathSearchPaths === 'string') {
ldRunpathSearchPaths = [ldRunpathSearchPaths, '"@executable_path/Frameworks"'];
} else if (Array.isArray(ldRunpathSearchPaths)) {
ldRunpathSearchPaths.push('"@executable_path/Frameworks"');
}
xcodeProject.updateBuildProperty('LD_RUNPATH_SEARCH_PATHS', ldRunpathSearchPaths, buildConfig.name);
console.log('Update IOS build setting LD_RUNPATH_SEARCH_PATHS to:', ldRunpathSearchPaths, 'for build configuration', buildConfig.name);
}

if (typeof xcodeProject.getBuildProperty('SWIFT_VERSION', buildConfig.name) === 'undefined') {
Expand Down