From 18873b834067578d8265ce6700d13b8972d307fd Mon Sep 17 00:00:00 2001 From: Incont Date: Sat, 16 May 2015 18:07:27 +0300 Subject: [PATCH] small correction in app_exists --- ios-deploy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ios-deploy.c b/ios-deploy.c index c8dcd66..4d79900 100644 --- a/ios-deploy.c +++ b/ios-deploy.c @@ -1312,8 +1312,7 @@ int app_exists(AMDeviceRef device) CFDictionaryRef result = nil; check_error(AMDeviceLookupApplications(device, options, &result)); - CFDictionaryRef app_dict = CFDictionaryGetValue(result, cf_bundle_id); - bool appExists = (app_dict == NULL) ? false : true; + bool appExists = CFDictionaryContainsKey(result, cf_bundle_id); printf("%s", appExists ? "true\n" : "false\n"); CFRelease(cf_bundle_id);