0

I have multiple targets for an iOS app. The two "flavors" of app are for two different clients and the two different apps communicate with two different servers. In the Windows version of the app, I used a target-specific XML file for each target to hold default settings. These are settings like the URL for the server that the app uses for, well, server stuff.

Should I use the plist file associated with the different targets in the Xcode project, create plist files for this specific purpose, or just use my own file type to store default settings values for the different targets?

I'm writing in Swift although it is not likely to matter for this question.

[Update]

I found this, which suggests using a plist file: How to set initial values for NSUserDefault Keys?

Shivam Tripathi
  • 1,405
  • 3
  • 19
  • 37
David Rector
  • 958
  • 9
  • 31
  • Disregard the multiple target or "flavors" of apps and the question still applies - do I store the initial values of the various app settings in the plist file or in some other file? For instance, the app is shipped with blue as the highlight color for "cool" stuff but the user can change it. Where do I store the default color because hard-coding it is not good coding practice? – David Rector Apr 04 '18 at 22:29
  • Also, when Xcode builds a specific target, the plist, defaults, etc., are all just for that target and there is just the one app with the one flavor in the app store. if I build a different target from the same project, it is a separate app in the app store and the two are unrelated except that they came form the exact same project and mostly same source code. The app doesn't get multiple plist files because that selection is done at build time, not runtime. – David Rector Apr 04 '18 at 22:30

0 Answers0