Skip to content

Commit

Permalink
When reading in a xyz.plist, now checking whether a xyz.inApp.plist e…
Browse files Browse the repository at this point in the history
…xists and use it if it exists;

This allows to override the settings file for in-app usage
  • Loading branch information
Ortwin Gentz committed Jan 15, 2010
1 parent 52e9ca5 commit 818cea3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion InAppSettingsKit/Models/IASKSettingsReader.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ - (id)initWithFile:(NSString*)file {
// Generate the settings bundle path
NSString *path = [self bundlePath];

[self setPath:[path stringByAppendingPathComponent:[file stringByAppendingString:@".plist"]]];
[self setPath:[path stringByAppendingPathComponent:[file stringByAppendingString:@".inApp.plist"]]];
[self setSettingsBundle:[NSDictionary dictionaryWithContentsOfFile:[self path]]];
if (!self.settingsBundle) {
[self setPath:[path stringByAppendingPathComponent:[file stringByAppendingString:@".plist"]]];
[self setSettingsBundle:[NSDictionary dictionaryWithContentsOfFile:[self path]]];
}
_bundle = [[NSBundle bundleWithPath:path] retain];

if (_settingsBundle) {
Expand Down

0 comments on commit 818cea3

Please sign in to comment.