summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-11-04 23:43:11 +0100
committerGravatar Martin Szulecki2013-11-04 23:43:11 +0100
commit6e09b5942bc175a907c0f7de19e7fe9680a2840f (patch)
tree9153dbdc111765229a315e3827b7a0758a913b97
parentdee792dc79246d3fe7b0e5ddccc3c44c8a5379a6 (diff)
downloadideviceinstaller-6e09b5942bc175a907c0f7de19e7fe9680a2840f.tar.gz
ideviceinstaller-6e09b5942bc175a907c0f7de19e7fe9680a2840f.tar.bz2
iOS 7: Read BundleIdentifier from Info.plist and use during install/upgrade
-rw-r--r--src/ideviceinstaller.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index 3aac8ae..0877c86 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -858,12 +858,20 @@ run_again:
}
char *bundleexecutable = NULL;
+ char *bundleidentifier = NULL;
plist_t bname = plist_dict_get_item(info, "CFBundleExecutable");
if (bname) {
plist_get_string_val(bname, &bundleexecutable);
}
+
+ bname = plist_dict_get_item(info, "CFBundleIdentifier");
+ if (bname) {
+ plist_get_string_val(bname, &bundleidentifier);
+ printf("Installing bundle %s.\n", bundleidentifier);
+ }
plist_free(info);
+ info = NULL;
if (!bundleexecutable) {
fprintf(stderr, "Could not determine value for CFBundleExecutable!\n");
@@ -892,7 +900,7 @@ run_again:
/* copy archive to device */
pkgname = NULL;
- if (asprintf(&pkgname, "%s/%s", PKG_PATH, basename(appid)) < 0) {
+ if (asprintf(&pkgname, "%s/%s", PKG_PATH, bundleidentifier) < 0) {
fprintf(stderr, "Out of memory!?\n");
goto leave_cleanup;
}
@@ -906,6 +914,9 @@ run_again:
printf("done.\n");
+ if (bundleidentifier) {
+ instproxy_client_options_add(client_opts, "CFBundleIdentifier", bundleidentifier, NULL);
+ }
if (sinf) {
instproxy_client_options_add(client_opts, "ApplicationSINF", sinf, NULL);
}