Skip to content

Commit

Permalink
support querying system apps and containerless apps
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Sep 14, 2022
1 parent 3933ca3 commit e110cc8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Jitterbug/JBHostDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,11 @@ - (void)updateAddress:(NSData *)address {

static NSString *plist_dict_get_nsstring(plist_t dict, const char *key) {
plist_t *value = plist_dict_get_item(dict, key);
NSString *string = [NSString stringWithUTF8String:plist_get_string_ptr(value, NULL)];
return string;
if (value) {
return [NSString stringWithUTF8String:plist_get_string_ptr(value, NULL)];
} else {
return @"";
}
}

- (NSArray<JBApp *> *)parseLookupResult:(plist_t)plist {
Expand Down Expand Up @@ -434,7 +437,7 @@ - (BOOL)updateDeviceInfoWithError:(NSError **)error {
}

client_opts = instproxy_client_options_new();
instproxy_client_options_add(client_opts, "ApplicationType", "User", NULL);
instproxy_client_options_add(client_opts, "ApplicationType", "Any", NULL);
instproxy_client_options_set_return_attributes(client_opts, "CFBundleName", "CFBundleIdentifier", "CFBundleExecutable", "Path", "Container", "iTunesArtwork", NULL);
if ((err = instproxy_lookup(instproxy_client, NULL, client_opts, &apps)) != INSTPROXY_E_SUCCESS) {
[self createError:error withString:NSLocalizedString(@"Failed to lookup installed apps.", @"JBHostDevice") code:err];
Expand Down

0 comments on commit e110cc8

Please sign in to comment.