Skip to content

Commit

Permalink
switch to CFBundleCopyInfoDictionaryInDirectory (#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
tburgin authored Aug 8, 2024
1 parent 013b0b4 commit b1cf83a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/common/SNTFileInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,11 @@ - (NSDictionary *)infoPlist {
return self.infoDict;
}

d = self.bundle.infoDictionary;
// `-[NSDictionary infoDictionary]` is heavily cached, changes to the Info.plist are not
// realized. Use `CFBundleCopyInfoDictionaryInDirectory` instead, which does not appear to
// cache.
d = CFBridgingRelease(CFBundleCopyInfoDictionaryInDirectory(
(__bridge CFURLRef)[NSURL fileURLWithPath:[self bundlePath]]));
if (d) {
self.infoDict = d;
return self.infoDict;
Expand Down

0 comments on commit b1cf83a

Please sign in to comment.