From 2a1844500b52bc5fc8bb33be9ca11eeb0afdc047 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Tue, 6 Oct 2015 13:43:28 -0700 Subject: [PATCH] Fixes #168 - Segmentation Fault 11 (when deploying an .ipa file) --- src/ios-deploy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ios-deploy.c b/src/ios-deploy.c index 733d591..546991f 100644 --- a/src/ios-deploy.c +++ b/src/ios-deploy.c @@ -702,7 +702,10 @@ CFURLRef copy_device_app_url(AMDeviceRef device, CFStringRef identifier) { CFStringRef copy_disk_app_identifier(CFURLRef disk_app_url) { CFURLRef plist_url = CFURLCreateCopyAppendingPathComponent(NULL, disk_app_url, CFSTR("Info.plist"), false); CFReadStreamRef plist_stream = CFReadStreamCreateWithFile(NULL, plist_url); - CFReadStreamOpen(plist_stream); + if (!CFReadStreamOpen(plist_stream)) { + on_error(@"Cannot read Info.plist file: %@", plist_url); + } + CFPropertyListRef plist = CFPropertyListCreateWithStream(NULL, plist_stream, 0, kCFPropertyListImmutable, NULL, NULL); CFStringRef bundle_identifier = CFRetain(CFDictionaryGetValue(plist, CFSTR("CFBundleIdentifier"))); CFReadStreamClose(plist_stream);