ios - One different key between multiple Info.plist files per scheme? -


my application's info.plist file has around 20/30 keys inside. external sdk we're implementing requires app key set in info.plist, requires separate keys debug, enterprise distribution, , release schemes.

is there way can create conditional additions info.plist without having maintain 3 duplicates of file (and duplicate of other keys, identical across targets)?

basically i'd base plist now, additional new -debug, -distribution , release ones, contain new key. i'm trying avoid repetition of keys, since make adding new ones in future hassle.

is possible?

there few different things might try.

xcode run script executed before app build script automatically executed before build. let's 3 duplicate plist files called infoa.plist, infob.plist , infoc.plist exact duplicate. when build project contents of infoa.plist duplicated infob.plist , infoc.plist. require knowledge of writing shell script that, script simple.

you duplicate , rename files in script. or use command line tools copy contents of main file duplicate files. 2 command line utilities can use modify contents of plist files plutil , https://developer.apple.com/library/mac/documentation/darwin/reference/manpages/man8/plistbuddy.8.html. these links might help: add files xcode project script?,

modify scheme , add pre-action schemes allow add pre-actions build , can same above, have configured pre-action instead of build phase script.

here few links might help: how make xcode run script before dependencies?, https://www.objc.io/issues/6-build-tools/build-process/, xcode: running script before every build modifies source code directly google “xcode run script before build” more links.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -