Skip to content

Commit

Permalink
Fixed resource bundle selection to work with the iOS target
Browse files Browse the repository at this point in the history
  • Loading branch information
abbeycode committed Aug 12, 2016
1 parent 2d48a07 commit cbebce0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/UZKArchive.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef NS_ENUM(NSUInteger, UZKFileMode) {
UZKFileModeAppend
};

static NSBundle *_resources;
static NSBundle *_resources = nil;



Expand Down Expand Up @@ -93,7 +93,10 @@ + (void)initialize {
dispatch_once(&onceToken, ^{
NSBundle *mainBundle = [NSBundle mainBundle];
NSURL *resourcesURL = [mainBundle URLForResource:@"UnzipKitResources" withExtension:@"bundle"];
_resources = [NSBundle bundleWithURL:resourcesURL];

_resources = (resourcesURL
? [NSBundle bundleWithURL:resourcesURL]
: mainBundle);
});
}

Expand Down

0 comments on commit cbebce0

Please sign in to comment.