From 93e8d65d2b24269042b664ffb9f2b8ee3103c6c0 Mon Sep 17 00:00:00 2001 From: hushenggang Date: Fri, 26 Aug 2016 17:21:07 +0800 Subject: [PATCH] Libraries in Frameworks do not have Info.plist --- iReSign/iReSign/iReSignAppDelegate.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/iReSign/iReSign/iReSignAppDelegate.m b/iReSign/iReSign/iReSignAppDelegate.m index d536f4e..163b0c3 100755 --- a/iReSign/iReSign/iReSignAppDelegate.m +++ b/iReSign/iReSign/iReSignAppDelegate.m @@ -497,10 +497,12 @@ - (void)signFile:(NSString*)filePath { */ NSString *infoPath = [NSString stringWithFormat:@"%@/Info.plist", filePath]; - NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithContentsOfFile:infoPath]; - [infoDict removeObjectForKey:@"CFBundleResourceSpecification"]; - [infoDict writeToFile:infoPath atomically:YES]; - [arguments addObject:@"--no-strict"]; // http://stackoverflow.com/a/26204757 + if ([[NSFileManager defaultManager]fileExistsAtPath:infoPath]) { + NSMutableDictionary *infoDict = [NSMutableDictionary dictionaryWithContentsOfFile:infoPath]; + [infoDict removeObjectForKey:@"CFBundleResourceSpecification"]; + [infoDict writeToFile:infoPath atomically:YES]; + [arguments addObject:@"--no-strict"]; // http://stackoverflow.com/a/26204757 + } } if (![[entitlementField stringValue] isEqualToString:@""]) {