Compare commits

...

4 Commits

Author SHA1 Message Date
Shazron Abdullah
022b42ffd4 Updated logging 2015-08-18 09:44:38 +08:00
Shazron Abdullah
865fa822fd Updated version 2015-08-18 09:29:27 +08:00
Shazron Abdullah
00a362a99c Updated version 2015-08-18 09:25:13 +08:00
Shazron Abdullah
01f8e09b31 Added verbose logging to copy_xcode_path_for 2015-08-18 09:24:37 +08:00
2 changed files with 22 additions and 2 deletions

View File

@ -18,7 +18,7 @@
#include "MobileDevice.h"
#include "errors.h"
#define APP_VERSION @"1.7.0"
#define APP_VERSION @"1.7.0-dev1"
#define PREP_CMDS_PATH "/tmp/fruitstrap-lldb-prep-cmds-"
#define LLDB_SHELL "lldb -s " PREP_CMDS_PATH
/*
@ -325,6 +325,11 @@ CFStringRef copy_xcode_path_for(CFStringRef subPath, CFStringRef search) {
if (!found) {
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@/%@"), xcodeDevPath, subPath, search);
found = path_exists(path);
if (verbose) {
NSLog(@"copy_xcode_path_for:");
NSLog(@"\tpath: %@", path);
NSLog(@"\tfound: %d", found);
}
}
// Try find `xcode-select --print-path` with search as a name pattern
if (!found) {
@ -335,16 +340,31 @@ CFStringRef copy_xcode_path_for(CFStringRef subPath, CFStringRef search) {
path = find_path(CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@"), xcodeDevPath, subPath), search, CFSTR(""));
}
found = CFStringGetLength(path) > 0 && path_exists(path);
if (verbose) {
NSLog(@"copy_xcode_path_for:");
NSLog(@"\tpath: %@", path);
NSLog(@"\tfound: %d", found);
}
}
// If not look in the default xcode location (xcode-select is sometimes wrong)
if (!found) {
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Applications/Xcode.app/Contents/Developer/%@&%@"), subPath, search);
found = path_exists(path);
if (verbose) {
NSLog(@"copy_xcode_path_for:");
NSLog(@"\tpath: %@", path);
NSLog(@"\tfound: %d", found);
}
}
// If not look in the users home directory, Xcode can store device support stuff there
if (!found) {
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s/Library/Developer/Xcode/%@/%@"), home, subPath, search);
found = path_exists(path);
if (verbose) {
NSLog(@"copy_xcode_path_for:");
NSLog(@"\tpath: %@", path);
NSLog(@"\tfound: %d", found);
}
}
CFRelease(xcodeDevPath);

View File

@ -1,6 +1,6 @@
{
"name": "ios-deploy",
"version": "1.7.0",
"version": "1.7.0-dev1",
"os" : [ "darwin" ],
"description": "launch iOS apps iOS devices from the command line (Xcode 6)",
"main": "ios-deploy",