import { XcodeProject } from 'xcode' ; import { getXCBuildConfigurationFromPbxproj } from '../Target' ; import { resolvePathOrProject } from './Xcodeproj' ; param projectRoot param param1 returns export function getInfoPlistPathFromPbxproj ( projectRootOrProject , { targetName , buildConfiguration = 'Release' , } = { } ) { const project = resolvePathOrProject ( projectRootOrProject ) ; if ( ! project ) { return null ; } const xcBuildConfiguration = getXCBuildConfigurationFromPbxproj ( project , { targetName , buildConfiguration } ) ; if ( ! xcBuildConfiguration ) { return null ; } return sanitizeInfoPlistBuildProperty ( xcBuildConfiguration . buildSettings . INFOPLIST_FILE ) ; } function sanitizeInfoPlistBuildProperty ( infoPlist ? ) { return infoPlist ?. replace ( /"/g , '' ) . replace ( '$(SRCROOT)' , '' ) ?? null ; }