From c383e3dce28bad8bc86520e78c5b042c14cf2aae Mon Sep 17 00:00:00 2001 From: Ronald van Eijnatten Date: Thu, 29 Oct 2015 14:33:24 +0100 Subject: [PATCH] Support MobileIron: Rename bundle id in CFBundleURLTypes --- iReSign/iReSign/iReSignAppDelegate.m | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/iReSign/iReSign/iReSignAppDelegate.m b/iReSign/iReSign/iReSignAppDelegate.m index d536f4e..b24a477 100755 --- a/iReSign/iReSign/iReSignAppDelegate.m +++ b/iReSign/iReSign/iReSignAppDelegate.m @@ -20,6 +20,10 @@ static NSString *kProductsDirName = @"Products"; static NSString *kInfoPlistFilename = @"Info.plist"; static NSString *kiTunesMetadataFileName = @"iTunesMetadata"; +static NSString *kKeyCFBundleURLTypes = @"CFBundleURLTypes"; +static NSString *kKeyCFBundleURLName = @"CFBundleURLName"; +static NSString *kKeyCFBundleURLSchemes = @"CFBundleURLSchemes"; + @implementation iReSignAppDelegate @@ -251,8 +255,37 @@ - (BOOL)changeBundleIDForFile:(NSString *)filePath bundleIDKey:(NSString *)bundl if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { plist = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath]; + NSString *orgBundleID = plist[bundleIDKey]; [plist setObject:newBundleID forKey:bundleIDKey]; + if (plist[kKeyCFBundleURLTypes]!=nil) { + NSMutableArray *cfBundleURLTypes = [NSMutableArray arrayWithArray:plist[kKeyCFBundleURLTypes]]; + for(int j=0; j