Compare commits
119 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f6b41519b | ||
|
|
5d2166fcef | ||
|
|
6ce22c2adc | ||
|
|
ede5d2542d | ||
|
|
6b7b31d54a | ||
|
|
8d60757e77 | ||
|
|
2f9fb4304a | ||
|
|
a6e94923cf | ||
|
|
342965c16a | ||
|
|
4ce3554561 | ||
|
|
ab39342b0f | ||
|
|
2a1844500b | ||
|
|
5e7420502b | ||
|
|
545521954b | ||
|
|
d6216760e4 | ||
|
|
0390522194 | ||
|
|
ca2e7a3c75 | ||
|
|
ed7c70aa59 | ||
|
|
093b4b3c9a | ||
|
|
4d58838ef1 | ||
|
|
d10562c501 | ||
|
|
99dba4e58c | ||
|
|
bf58b61561 | ||
|
|
d2aee71a92 | ||
|
|
92f6238bba | ||
|
|
6aa7b57014 | ||
|
|
55d076b805 | ||
|
|
3756385651 | ||
|
|
adc8a5b9c2 | ||
|
|
bb25caf586 | ||
|
|
75820a0979 | ||
|
|
16f52589db | ||
|
|
21c8dc9cf5 | ||
|
|
34540ce545 | ||
|
|
7b834b0e31 | ||
|
|
7ac9cdb107 | ||
|
|
cf9d024a2b | ||
|
|
4d4735e505 | ||
|
|
2c9ea8f16e | ||
|
|
5eb12202b2 | ||
|
|
307a5f9452 | ||
|
|
835e161f66 | ||
|
|
73f30fdfed | ||
|
|
be506a9f7f | ||
|
|
bc1bb0d320 | ||
|
|
7d997b89c7 | ||
|
|
6d61b7ca7c | ||
|
|
590da67714 | ||
|
|
8749a57936 | ||
|
|
3ba7403a39 | ||
|
|
84aeaad03b | ||
|
|
ddcb4932ab | ||
|
|
11f1a89128 | ||
|
|
c97b972172 | ||
|
|
1cb6110985 | ||
|
|
3dadb53b3b | ||
|
|
39aa232f97 | ||
|
|
609b635870 | ||
|
|
522f7bd667 | ||
|
|
250794ce98 | ||
|
|
41eeedc472 | ||
|
|
cdbe112ec6 | ||
|
|
5377d9bec7 | ||
|
|
5d2a0d5c8b | ||
|
|
e5fc979998 | ||
|
|
18873b8340 | ||
|
|
ed09a029de | ||
|
|
d65b94fa06 | ||
|
|
44b8068daa | ||
|
|
041d12e0b1 | ||
|
|
8a3dbce11f | ||
|
|
9e45cc0edb | ||
|
|
3857c9afc6 | ||
|
|
125cd8de64 | ||
|
|
7070623432 | ||
|
|
d712420e60 | ||
|
|
2c35b70ff7 | ||
|
|
ea8202c506 | ||
|
|
7c1372041d | ||
|
|
b67b90be19 | ||
|
|
9156689720 | ||
|
|
a89b71bdf4 | ||
|
|
6e4df1cc07 | ||
|
|
fc667bc423 | ||
|
|
2119c10455 | ||
|
|
a750efa382 | ||
|
|
0940a4d079 | ||
|
|
b72d31b816 | ||
|
|
5690b10635 | ||
|
|
1db084594e | ||
|
|
8d1f79d27c | ||
|
|
8c9dab1564 | ||
|
|
54a04e203f | ||
|
|
d90171d8e7 | ||
|
|
02c23792ee | ||
|
|
c1a0623e49 | ||
|
|
5efdcae8ce | ||
|
|
54818aae5c | ||
|
|
e882932053 | ||
|
|
cab5a31ab5 | ||
|
|
56abf4e92e | ||
|
|
05edec9562 | ||
|
|
48f7881a0b | ||
|
|
3e8a897fbc | ||
|
|
ba60ff6351 | ||
|
|
134a0a5fd0 | ||
|
|
96e91eb269 | ||
|
|
8577ef3411 | ||
|
|
abbd1a3769 | ||
|
|
e5e2a6349d | ||
|
|
5a8d7f9efb | ||
|
|
0dece5157e | ||
|
|
e1aacc0ba1 | ||
|
|
e4c4660f2a | ||
|
|
99f401018d | ||
|
|
6ac084844e | ||
|
|
3dcd64f7c0 | ||
|
|
12334f8ddf | ||
|
|
33f6a83e1d |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,6 +1,3 @@
|
||||
demo
|
||||
demo.app
|
||||
ios-deploy
|
||||
ios-deploy.dSYM
|
||||
build/*
|
||||
/.DS_Store
|
||||
*~
|
||||
|
||||
6
LICENSE
6
LICENSE
@@ -1,2 +1,8 @@
|
||||
ios-deploy is available under the provisions of the GNU General Public License,
|
||||
version 3 (or later), available here: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
|
||||
Error codes used for error messages were taken from SDMMobileDevice framework,
|
||||
originally reverse engineered by Sam Marshall. SDMMobileDevice is distributed
|
||||
under BSD 3-Clause license and is available here:
|
||||
https://github.com/samdmarshall/SDMMobileDevice
|
||||
|
||||
35
Makefile
35
Makefile
@@ -1,35 +0,0 @@
|
||||
IOS_SDK_VERSION = 7.1
|
||||
|
||||
IOS_CC = gcc -ObjC
|
||||
DEVICE_SUPPORT = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/DeviceSupport
|
||||
IOS_SDK = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK_VERSION).sdk
|
||||
|
||||
all: clean ios-deploy
|
||||
|
||||
demo.app: demo Info.plist
|
||||
mkdir -p demo.app
|
||||
cp demo demo.app/
|
||||
cp Info.plist ResourceRules.plist demo.app/
|
||||
codesign -f -s "iPhone Developer" --entitlements Entitlements.plist demo.app
|
||||
|
||||
demo: demo.c
|
||||
$(IOS_CC) -g -arch armv7 -isysroot $(IOS_SDK) -framework CoreFoundation -o demo demo.c
|
||||
|
||||
ios-deploy: clean ios-deploy.c
|
||||
$(IOS_CC) -g -o ios-deploy -framework Foundation -framework CoreFoundation -framework MobileDevice -F/System/Library/PrivateFrameworks ios-deploy.c
|
||||
|
||||
symlink:
|
||||
cd $(DEVICE_SUPPORT); ln -sfn "`find . -type d -maxdepth 1 -exec basename {} \; | tail -1`" Latest
|
||||
|
||||
install: symlink ios-deploy
|
||||
mkdir -p $(prefix)/bin
|
||||
cp ios-deploy $(prefix)/bin
|
||||
|
||||
uninstall:
|
||||
rm $(prefix)/bin/ios-deploy
|
||||
|
||||
debug: all
|
||||
./ios-deploy --debug --bundle demo.app
|
||||
|
||||
clean:
|
||||
rm -rf *.app demo ios-deploy
|
||||
90
README.md
90
README.md
@@ -4,9 +4,49 @@ Install and debug iOS apps without using Xcode. Designed to work on un-jailbroke
|
||||
|
||||
## Requirements
|
||||
|
||||
* Mac OS X. Tested on 10.10 Yosemite and iOS 8.1
|
||||
* You need to have a valid iOS development certificate installed.
|
||||
* Xcode 6.1 should be installed
|
||||
* Mac OS X. Tested on 10.11 El Capitan and iOS 9.0
|
||||
* You need to have a valid iOS Development certificate installed.
|
||||
* Xcode 6.4 or greater should be installed
|
||||
|
||||
## Roadmap
|
||||
|
||||
See our [milestones](https://github.com/phonegap/ios-deploy/milestones).
|
||||
|
||||
Significant changes:
|
||||
|
||||
1.8.0 will use an Xcode project instead of a Makefile (to prepare for 2.0.0)
|
||||
2.0.0 will break out the commands into their own files, and create ios-deploy-lib for node.js use
|
||||
|
||||
## Installation
|
||||
=======
|
||||
|
||||
ios-deploy installation is made simple using the node.js package manager. If you use [Homebrew](http://brew.sh/), install [node.js](https://nodejs.org):
|
||||
|
||||
```
|
||||
brew install node
|
||||
```
|
||||
|
||||
Now install ios-deploy with the [node.js](https://nodejs.org) package manager:
|
||||
|
||||
```
|
||||
npm install -g ios-deploy
|
||||
```
|
||||
|
||||
To install from source:
|
||||
|
||||
```
|
||||
make install prefix=/usr/local
|
||||
```
|
||||
|
||||
This will install ios-deploy in the `bin` folder of `/usr/local`, i.e. `/usr/local/bin`
|
||||
|
||||
|
||||
### OS X 10.11 El Capitan
|
||||
|
||||
If you are *not* using a node version manager like [nvm](https://github.com/creationix/nvm) or [n](https://github.com/tj/n), you may have to do either of these two things below when under El Capitan:
|
||||
|
||||
1. Add the `--unsafe-perm` flag when installing ios-deploy
|
||||
2. Ensure the `nobody` user has write access to `/usr/local/lib/node_modules/ios-deploy/ios-deploy`
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -23,14 +63,19 @@ Install and debug iOS apps without using Xcode. Designed to work on un-jailbroke
|
||||
-L, --justlaunch just launch the app and exit lldb
|
||||
-v, --verbose enable verbose output
|
||||
-m, --noinstall directly start debugging without app install (-d not required)
|
||||
-p, --port <number> port used for device, default: 12345
|
||||
-r, --uninstall uninstall the app before install (do not use with -m; app cache and data are cleared)
|
||||
-1, --bundle_id <bundle id> specify bundle id for list and upload
|
||||
-p, --port <number> port used for device, default: 12345
|
||||
-r, --uninstall uninstall the app before install (do not use with -m; app cache and data are cleared)
|
||||
-9, --uninstall_only uninstall the app ONLY. Use only with -1 <bundle_id>
|
||||
-1, --bundle_id <bundle id> specify bundle id for list, upload, and uninstall_only
|
||||
-l, --list list files
|
||||
-o, --upload <file> upload file
|
||||
-w, --download download app tree
|
||||
-2, --to <target pathname> use together with up/download file/tree. specify target
|
||||
-V, --version print the executable version
|
||||
-D, --mkdir <dir> make directory on device
|
||||
-R, --rm <path> remove file or directory on device (directories must be empty)
|
||||
-V, --version print the executable version
|
||||
-e, --exists check if the app with given bundle_id is installed or not
|
||||
-B, --list_bundle_id list bundle_id
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -47,7 +92,7 @@ The commands below assume that you have an app called `my.app` with bundle id `b
|
||||
|
||||
// Upload a file to your app's Documents folder
|
||||
ios-deploy --bundle_id 'bundle.id' --upload test.txt --to Documents/test.txt
|
||||
|
||||
|
||||
// Download your app's Documents, Library and tmp folders
|
||||
ios-deploy --bundle_id 'bundle.id' --download --to MyDestinationFolder
|
||||
|
||||
@@ -56,20 +101,29 @@ The commands below assume that you have an app called `my.app` with bundle id `b
|
||||
|
||||
// deploy and debug your app to a connected device, uninstall the app first
|
||||
ios-deploy --uninstall --debug --bundle my.app
|
||||
|
||||
// check whether an app by bundle id exists on the device (check return code `echo $?`)
|
||||
ios-deploy --exists --bundle_id com.apple.mobilemail
|
||||
|
||||
// Download the Documents directory of the app *only*
|
||||
ios-deploy --download=/Documents --bundle_id my.app.id --to ./my_download_location
|
||||
|
||||
// List ids and names of connected devices
|
||||
ios-deploy -c
|
||||
|
||||
// Uninstall an app
|
||||
ios-deploy --uninstall_only --bundle_id my.bundle.id
|
||||
|
||||
// list all bundle ids of all apps on your device
|
||||
ios-deploy --list_bundle_id
|
||||
|
||||
## Demo
|
||||
|
||||
* The included demo.app represents the minimum required to get code running on iOS.
|
||||
* `make install` will install demo.app to the device.
|
||||
* `make debug` will install demo.app and launch a GDB session.
|
||||
The included demo.app represents the minimum required to get code running on iOS.
|
||||
|
||||
* `make demo.app` will generate the demo.app executable. If it doesn't compile, modify `IOS_SDK_VERSION` in the Makefile.
|
||||
* `make debug` will install demo.app and launch a LLDB session.
|
||||
|
||||
## Notes
|
||||
|
||||
* With some modifications, it may be possible to use this without Xcode installed; however, you would need a copy of the relevant DeveloperDiskImage.dmg (included with Xcode). lldb would also run slower as symbols would be downloaded from the device on-the-fly.
|
||||
|
||||
|
||||
## Listing Device Ids
|
||||
|
||||
Device Ids are the UDIDs of the iOS devices. From the command line, you can list device ids [this way](http://javierhz.blogspot.com/2012/06/how-to-get-udid-of-iphone-using-shell.html):
|
||||
|
||||
system_profiler SPUSBDataType | sed -n -e '/iPod/,/Serial/p' | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}'
|
||||
|
||||
45
check_reqs.js
Executable file
45
check_reqs.js
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var util = require('util');
|
||||
var os = require('os');
|
||||
var child_process = require('child_process');
|
||||
|
||||
var XCODEBUILD_MIN_VERSION = '6.4';
|
||||
var XCODEBUILD_NOT_FOUND_MESSAGE = util.format('Please install Xcode version %s or greater from the Mac App Store.', XCODEBUILD_MIN_VERSION);
|
||||
var TOOL = 'xcodebuild';
|
||||
|
||||
var xcode_version = child_process.spawn(TOOL, ['-version']),
|
||||
version_string = '';
|
||||
|
||||
xcode_version.stdout.on('data', function (data) {
|
||||
version_string += data;
|
||||
});
|
||||
|
||||
xcode_version.stderr.on('data', function (data) {
|
||||
console.log('stderr: ' + data);
|
||||
});
|
||||
|
||||
xcode_version.on('error', function (err) {
|
||||
console.log(util.format('Tool %s was not found. %s', TOOL, XCODEBUILD_NOT_FOUND_MESSAGE));
|
||||
});
|
||||
|
||||
xcode_version.on('close', function (code) {
|
||||
if (code === 0) {
|
||||
var arr = version_string.match(/^Xcode (\d+\.\d+)/);
|
||||
var ver = arr[1];
|
||||
|
||||
if (os.release() >= '15.0.0' && ver < '7.0') {
|
||||
console.log(util.format('You need at least Xcode 7.0 when you are on OS X 10.11 El Capitan (you have version %s)', ver));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (ver < XCODEBUILD_MIN_VERSION) {
|
||||
console.log(util.format('%s : %s. (you have version %s)', tool, XCODEBUILD_NOT_FOUND_MESSAGE, ver));
|
||||
}
|
||||
}
|
||||
process.exit(code);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
5
demo/.gitignore
vendored
Normal file
5
demo/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
demo
|
||||
demo.app
|
||||
demo.dSYM
|
||||
/.DS_Store
|
||||
*~
|
||||
24
demo/Makefile
Normal file
24
demo/Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
IOS_SDK_VERSION = 9.0
|
||||
|
||||
IOS_CC = gcc -ObjC
|
||||
IOS_SDK = $(shell xcode-select --print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$(IOS_SDK_VERSION).sdk
|
||||
|
||||
all: clean demo.app
|
||||
|
||||
demo.app: demo Info.plist
|
||||
mkdir -p demo.app
|
||||
cp demo demo.app/
|
||||
cp Info.plist ResourceRules.plist demo.app/
|
||||
codesign -f -s "iPhone Developer" --entitlements Entitlements.plist demo.app
|
||||
|
||||
demo: demo.c
|
||||
$(IOS_CC) -g -arch armv7 -isysroot $(IOS_SDK) -framework CoreFoundation -o demo demo.c
|
||||
|
||||
debug: all ios-deploy
|
||||
@../build/Release/ios-deploy --debug --bundle demo.app
|
||||
|
||||
clean:
|
||||
@rm -rf *.app demo demo.dSYM
|
||||
|
||||
ios-deploy:
|
||||
@xcodebuild -project ../ios-deploy.xcodeproj
|
||||
@@ -6,4 +6,4 @@ int main(int argc, const char* argv[]) {
|
||||
printf("argv[%d] = %s\n", i, argv[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
275
ios-deploy.xcodeproj/project.pbxproj
Normal file
275
ios-deploy.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,275 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
7E70899C1B587DE4004D23AA /* ios-deploy.c in Sources */ = {isa = PBXBuildFile; fileRef = 7E7089991B587DE4004D23AA /* ios-deploy.c */; settings = {COMPILER_FLAGS = "-x objective-c -fno-objc-arc"; }; };
|
||||
7E70899E1B587F29004D23AA /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E70899D1B587F29004D23AA /* CoreFoundation.framework */; };
|
||||
7E7089A01B58801E004D23AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E70899F1B58801E004D23AA /* Foundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
7E70898C1B587BF3004D23AA /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
7E70898E1B587BF3004D23AA /* ios-deploy */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "ios-deploy"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7E7089991B587DE4004D23AA /* ios-deploy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ios-deploy.c"; path = "src/ios-deploy.c"; sourceTree = SOURCE_ROOT; };
|
||||
7E70899A1B587DE4004D23AA /* errors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = errors.h; path = src/errors.h; sourceTree = SOURCE_ROOT; };
|
||||
7E70899B1B587DE4004D23AA /* MobileDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MobileDevice.h; path = src/MobileDevice.h; sourceTree = SOURCE_ROOT; };
|
||||
7E70899D1B587F29004D23AA /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
|
||||
7E70899F1B58801E004D23AA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
7E70898B1B587BF3004D23AA /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7E7089A01B58801E004D23AA /* Foundation.framework in Frameworks */,
|
||||
7E70899E1B587F29004D23AA /* CoreFoundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
7E7089851B587BF3004D23AA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7E7089901B587BF3004D23AA /* ios-deploy */,
|
||||
7E7089A21B588219004D23AA /* Frameworks */,
|
||||
7E70898F1B587BF3004D23AA /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7E70898F1B587BF3004D23AA /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7E70898E1B587BF3004D23AA /* ios-deploy */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7E7089901B587BF3004D23AA /* ios-deploy */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7E7089991B587DE4004D23AA /* ios-deploy.c */,
|
||||
7E70899A1B587DE4004D23AA /* errors.h */,
|
||||
7E70899B1B587DE4004D23AA /* MobileDevice.h */,
|
||||
);
|
||||
path = "ios-deploy";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7E7089A21B588219004D23AA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7E70899F1B58801E004D23AA /* Foundation.framework */,
|
||||
7E70899D1B587F29004D23AA /* CoreFoundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
7E70898D1B587BF3004D23AA /* ios-deploy */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 7E7089951B587BF3004D23AA /* Build configuration list for PBXNativeTarget "ios-deploy" */;
|
||||
buildPhases = (
|
||||
7E70898A1B587BF3004D23AA /* Sources */,
|
||||
7E70898B1B587BF3004D23AA /* Frameworks */,
|
||||
7E70898C1B587BF3004D23AA /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "ios-deploy";
|
||||
productName = "ios-deploy";
|
||||
productReference = 7E70898E1B587BF3004D23AA /* ios-deploy */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
7E7089861B587BF3004D23AA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0710;
|
||||
ORGANIZATIONNAME = PhoneGap;
|
||||
TargetAttributes = {
|
||||
7E70898D1B587BF3004D23AA = {
|
||||
CreatedOnToolsVersion = 6.4;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 7E7089891B587BF3004D23AA /* Build configuration list for PBXProject "ios-deploy" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 7E7089851B587BF3004D23AA;
|
||||
productRefGroup = 7E70898F1B587BF3004D23AA /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
7E70898D1B587BF3004D23AA /* ios-deploy */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
7E70898A1B587BF3004D23AA /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7E70899C1B587DE4004D23AA /* ios-deploy.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
7E7089931B587BF3004D23AA /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.8;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
MobileDevice,
|
||||
"-F/System/Library/PrivateFrameworks",
|
||||
);
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7E7089941B587BF3004D23AA /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.8;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
MobileDevice,
|
||||
"-F/System/Library/PrivateFrameworks",
|
||||
);
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
7E7089961B587BF3004D23AA /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7E7089971B587BF3004D23AA /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
7E7089891B587BF3004D23AA /* Build configuration list for PBXProject "ios-deploy" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
7E7089931B587BF3004D23AA /* Debug */,
|
||||
7E7089941B587BF3004D23AA /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
7E7089951B587BF3004D23AA /* Build configuration list for PBXNativeTarget "ios-deploy" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
7E7089961B587BF3004D23AA /* Debug */,
|
||||
7E7089971B587BF3004D23AA /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 7E7089861B587BF3004D23AA /* Project object */;
|
||||
}
|
||||
11
package.json
11
package.json
@@ -1,12 +1,15 @@
|
||||
{
|
||||
"name": "ios-deploy",
|
||||
"version": "1.3.1",
|
||||
"description": "launch iOS apps iOS devices from the command line (Xcode 6)",
|
||||
"version": "1.8.0",
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"description": "launch iOS apps iOS devices from the command line (Xcode 7)",
|
||||
"main": "ios-deploy",
|
||||
"scripts": {
|
||||
"preinstall": "make ios-deploy"
|
||||
"preinstall": "./check_reqs.js && xcodebuild"
|
||||
},
|
||||
"bin" : "./ios-deploy" ,
|
||||
"bin": "./build/Release/ios-deploy",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phonegap/ios-deploy"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "$ make"
|
||||
make
|
||||
@@ -195,6 +195,10 @@ mach_error_t AMDeviceNotificationSubscribe(am_device_notification_callback
|
||||
callback, unsigned int unused0, unsigned int unused1, void* //unsigned int
|
||||
dn_unknown3, struct am_device_notification **notification);
|
||||
|
||||
|
||||
mach_error_t AMDeviceNotificationUnsubscribe(am_device_notification subscription);
|
||||
|
||||
|
||||
/* Connects to the iPhone. Pass in the am_device structure that the
|
||||
* notification callback will give to you.
|
||||
*
|
||||
386
src/errors.h
Normal file
386
src/errors.h
Normal file
@@ -0,0 +1,386 @@
|
||||
|
||||
typedef struct errorcode_to_id {
|
||||
unsigned int error;
|
||||
const char* id;
|
||||
} errorcode_to_id_t;
|
||||
|
||||
typedef struct error_id_to_message {
|
||||
const char* id;
|
||||
const char* message;
|
||||
} error_id_to_message_t;
|
||||
|
||||
// Parts of error code to localization id map is taken from SDMMobileDevice framework. Associated license is bellow.
|
||||
// https://github.com/samdmarshall/SDMMobileDevice/blob/master/Framework/MobileDevice/Error/SDMMD_Error.h
|
||||
//
|
||||
// Copyright (c) 2014, Sam Marshall
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
||||
// following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of Sam Marshall nor the names of its contributors may be used to endorse or promote products derived from this
|
||||
// software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
static errorcode_to_id_t errorcode_to_id[] = {
|
||||
{ 0xe8000001, "kAMDUndefinedError" },
|
||||
{ 0xe8000002, "kAMDBadHeaderError" },
|
||||
{ 0xe8000003, "kAMDNoResourcesError" },
|
||||
{ 0xe8000004, "kAMDReadError" },
|
||||
{ 0xe8000005, "kAMDWriteError" },
|
||||
{ 0xe8000006, "kAMDUnknownPacketError" },
|
||||
{ 0xe8000007, "kAMDInvalidArgumentError" },
|
||||
{ 0xe8000008, "kAMDNotFoundError" },
|
||||
{ 0xe8000009, "kAMDIsDirectoryError" },
|
||||
{ 0xe800000a, "kAMDPermissionError" },
|
||||
{ 0xe800000b, "kAMDNotConnectedError" },
|
||||
{ 0xe800000c, "kAMDTimeOutError" },
|
||||
{ 0xe800000d, "kAMDOverrunError" },
|
||||
{ 0xe800000e, "kAMDEOFError" },
|
||||
{ 0xe800000f, "kAMDUnsupportedError" },
|
||||
{ 0xe8000010, "kAMDFileExistsError" },
|
||||
{ 0xe8000011, "kAMDBusyError" },
|
||||
{ 0xe8000012, "kAMDCryptoError" },
|
||||
{ 0xe8000013, "kAMDInvalidResponseError" },
|
||||
{ 0xe8000014, "kAMDMissingKeyError" },
|
||||
{ 0xe8000015, "kAMDMissingValueError" },
|
||||
{ 0xe8000016, "kAMDGetProhibitedError" },
|
||||
{ 0xe8000017, "kAMDSetProhibitedError" },
|
||||
{ 0xe8000018, "kAMDRemoveProhibitedError" },
|
||||
{ 0xe8000019, "kAMDImmutableValueError" },
|
||||
{ 0xe800001a, "kAMDPasswordProtectedError" },
|
||||
{ 0xe800001b, "kAMDMissingHostIDError" },
|
||||
{ 0xe800001c, "kAMDInvalidHostIDError" },
|
||||
{ 0xe800001d, "kAMDSessionActiveError" },
|
||||
{ 0xe800001e, "kAMDSessionInactiveError" },
|
||||
{ 0xe800001f, "kAMDMissingSessionIDError" },
|
||||
{ 0xe8000020, "kAMDInvalidSessionIDError" },
|
||||
{ 0xe8000021, "kAMDMissingServiceError" },
|
||||
{ 0xe8000022, "kAMDInvalidServiceError" },
|
||||
{ 0xe8000023, "kAMDInvalidCheckinError" },
|
||||
{ 0xe8000024, "kAMDCheckinTimeoutError" },
|
||||
{ 0xe8000025, "kAMDMissingPairRecordError" },
|
||||
{ 0xe8000026, "kAMDInvalidActivationRecordError" },
|
||||
{ 0xe8000027, "kAMDMissingActivationRecordError" },
|
||||
{ 0xe8000028, "kAMDWrongDroidError" },
|
||||
{ 0xe8000029, "kAMDSUVerificationError" },
|
||||
{ 0xe800002a, "kAMDSUPatchError" },
|
||||
{ 0xe800002b, "kAMDSUFirmwareError" },
|
||||
{ 0xe800002c, "kAMDProvisioningProfileNotValid" },
|
||||
{ 0xe800002d, "kAMDSendMessageError" },
|
||||
{ 0xe800002e, "kAMDReceiveMessageError" },
|
||||
{ 0xe800002f, "kAMDMissingOptionsError" },
|
||||
{ 0xe8000030, "kAMDMissingImageTypeError" },
|
||||
{ 0xe8000031, "kAMDDigestFailedError" },
|
||||
{ 0xe8000032, "kAMDStartServiceError" },
|
||||
{ 0xe8000033, "kAMDInvalidDiskImageError" },
|
||||
{ 0xe8000034, "kAMDMissingDigestError" },
|
||||
{ 0xe8000035, "kAMDMuxError" },
|
||||
{ 0xe8000036, "kAMDApplicationAlreadyInstalledError" },
|
||||
{ 0xe8000037, "kAMDApplicationMoveFailedError" },
|
||||
{ 0xe8000038, "kAMDApplicationSINFCaptureFailedError" },
|
||||
{ 0xe8000039, "kAMDApplicationSandboxFailedError" },
|
||||
{ 0xe800003a, "kAMDApplicationVerificationFailedError" },
|
||||
{ 0xe800003b, "kAMDArchiveDestructionFailedError" },
|
||||
{ 0xe800003c, "kAMDBundleVerificationFailedError" },
|
||||
{ 0xe800003d, "kAMDCarrierBundleCopyFailedError" },
|
||||
{ 0xe800003e, "kAMDCarrierBundleDirectoryCreationFailedError" },
|
||||
{ 0xe800003f, "kAMDCarrierBundleMissingSupportedSIMsError" },
|
||||
{ 0xe8000040, "kAMDCommCenterNotificationFailedError" },
|
||||
{ 0xe8000041, "kAMDContainerCreationFailedError" },
|
||||
{ 0xe8000042, "kAMDContainerP0wnFailedError" },
|
||||
{ 0xe8000043, "kAMDContainerRemovalFailedError" },
|
||||
{ 0xe8000044, "kAMDEmbeddedProfileInstallFailedError" },
|
||||
{ 0xe8000045, "kAMDErrorError" },
|
||||
{ 0xe8000046, "kAMDExecutableTwiddleFailedError" },
|
||||
{ 0xe8000047, "kAMDExistenceCheckFailedError" },
|
||||
{ 0xe8000048, "kAMDInstallMapUpdateFailedError" },
|
||||
{ 0xe8000049, "kAMDManifestCaptureFailedError" },
|
||||
{ 0xe800004a, "kAMDMapGenerationFailedError" },
|
||||
{ 0xe800004b, "kAMDMissingBundleExecutableError" },
|
||||
{ 0xe800004c, "kAMDMissingBundleIdentifierError" },
|
||||
{ 0xe800004d, "kAMDMissingBundlePathError" },
|
||||
{ 0xe800004e, "kAMDMissingContainerError" },
|
||||
{ 0xe800004f, "kAMDNotificationFailedError" },
|
||||
{ 0xe8000050, "kAMDPackageExtractionFailedError" },
|
||||
{ 0xe8000051, "kAMDPackageInspectionFailedError" },
|
||||
{ 0xe8000052, "kAMDPackageMoveFailedError" },
|
||||
{ 0xe8000053, "kAMDPathConversionFailedError" },
|
||||
{ 0xe8000054, "kAMDRestoreContainerFailedError" },
|
||||
{ 0xe8000055, "kAMDSeatbeltProfileRemovalFailedError" },
|
||||
{ 0xe8000056, "kAMDStageCreationFailedError" },
|
||||
{ 0xe8000057, "kAMDSymlinkFailedError" },
|
||||
{ 0xe8000058, "kAMDiTunesArtworkCaptureFailedError" },
|
||||
{ 0xe8000059, "kAMDiTunesMetadataCaptureFailedError" },
|
||||
{ 0xe800005a, "kAMDAlreadyArchivedError" },
|
||||
{ 0xe800005b, "kAMDServiceLimitError" },
|
||||
{ 0xe800005c, "kAMDInvalidPairRecordError" },
|
||||
{ 0xe800005d, "kAMDServiceProhibitedError" },
|
||||
{ 0xe800005e, "kAMDCheckinSetupFailedError" },
|
||||
{ 0xe800005f, "kAMDCheckinConnectionFailedError" },
|
||||
{ 0xe8000060, "kAMDCheckinReceiveFailedError" },
|
||||
{ 0xe8000061, "kAMDCheckinResponseFailedError" },
|
||||
{ 0xe8000062, "kAMDCheckinSendFailedError" },
|
||||
{ 0xe8000063, "kAMDMuxCreateListenerError" },
|
||||
{ 0xe8000064, "kAMDMuxGetListenerError" },
|
||||
{ 0xe8000065, "kAMDMuxConnectError" },
|
||||
{ 0xe8000066, "kAMDUnknownCommandError" },
|
||||
{ 0xe8000067, "kAMDAPIInternalError" },
|
||||
{ 0xe8000068, "kAMDSavePairRecordFailedError" },
|
||||
{ 0xe8000069, "kAMDCheckinOutOfMemoryError" },
|
||||
{ 0xe800006a, "kAMDDeviceTooNewError" },
|
||||
{ 0xe800006b, "kAMDDeviceRefNoGood" },
|
||||
{ 0xe800006c, "kAMDCannotTranslateError" },
|
||||
{ 0xe800006d, "kAMDMobileImageMounterMissingImageSignature" },
|
||||
{ 0xe800006e, "kAMDMobileImageMounterResponseCreationFailed" },
|
||||
{ 0xe800006f, "kAMDMobileImageMounterMissingImageType" },
|
||||
{ 0xe8000070, "kAMDMobileImageMounterMissingImagePath" },
|
||||
{ 0xe8000071, "kAMDMobileImageMounterImageMapLoadFailed" },
|
||||
{ 0xe8000072, "kAMDMobileImageMounterAlreadyMounted" },
|
||||
{ 0xe8000073, "kAMDMobileImageMounterImageMoveFailed" },
|
||||
{ 0xe8000074, "kAMDMobileImageMounterMountPathMissing" },
|
||||
{ 0xe8000075, "kAMDMobileImageMounterMountPathNotEmpty" },
|
||||
{ 0xe8000076, "kAMDMobileImageMounterImageMountFailed" },
|
||||
{ 0xe8000077, "kAMDMobileImageMounterTrustCacheLoadFailed" },
|
||||
{ 0xe8000078, "kAMDMobileImageMounterDigestFailed" },
|
||||
{ 0xe8000079, "kAMDMobileImageMounterDigestCreationFailed" },
|
||||
{ 0xe800007a, "kAMDMobileImageMounterImageVerificationFailed" },
|
||||
{ 0xe800007b, "kAMDMobileImageMounterImageInfoCreationFailed" },
|
||||
{ 0xe800007c, "kAMDMobileImageMounterImageMapStoreFailed" },
|
||||
{ 0xe800007d, "kAMDBonjourSetupError" },
|
||||
{ 0xe800007e, "kAMDDeviceOSVersionTooLow" },
|
||||
{ 0xe800007f, "kAMDNoWifiSyncSupportError" },
|
||||
{ 0xe8000080, "kAMDDeviceFamilyNotSupported" },
|
||||
{ 0xe8000081, "kAMDEscrowLockedError" },
|
||||
{ 0xe8000082, "kAMDPairingProhibitedError" },
|
||||
{ 0xe8000083, "kAMDProhibitedBySupervision" },
|
||||
{ 0xe8000084, "kAMDDeviceDisconnectedError" },
|
||||
{ 0xe8000085, "kAMDTooBigError" },
|
||||
{ 0xe8000086, "kAMDPackagePatchFailedError" },
|
||||
{ 0xe8000087, "kAMDIncorrectArchitectureError" },
|
||||
{ 0xe8000088, "kAMDPluginCopyFailedError" },
|
||||
{ 0xe8000089, "kAMDBreadcrumbFailedError" },
|
||||
{ 0xe800008a, "kAMDBreadcrumbUnlockError" },
|
||||
{ 0xe800008b, "kAMDGeoJSONCaptureFailedError" },
|
||||
{ 0xe800008c, "kAMDNewsstandArtworkCaptureFailedError" },
|
||||
{ 0xe800008d, "kAMDMissingCommandError" },
|
||||
{ 0xe800008e, "kAMDNotEntitledError" },
|
||||
{ 0xe800008f, "kAMDMissingPackagePathError" },
|
||||
{ 0xe8000090, "kAMDMissingContainerPathError" },
|
||||
{ 0xe8000091, "kAMDMissingApplicationIdentifierError" },
|
||||
{ 0xe8000092, "kAMDMissingAttributeValueError" },
|
||||
{ 0xe8000093, "kAMDLookupFailedError" },
|
||||
{ 0xe8000094, "kAMDDictCreationFailedError" },
|
||||
{ 0xe8000095, "kAMDUserDeniedPairingError" },
|
||||
{ 0xe8000096, "kAMDPairingDialogResponsePendingError" },
|
||||
{ 0xe8000097, "kAMDInstallProhibitedError" },
|
||||
{ 0xe8000098, "kAMDUninstallProhibitedError" },
|
||||
{ 0xe8000099, "kAMDFMiPProtectedError" },
|
||||
{ 0xe800009a, "kAMDMCProtected" },
|
||||
{ 0xe800009b, "kAMDMCChallengeRequired" },
|
||||
{ 0xe800009c, "kAMDMissingBundleVersionError" },
|
||||
|
||||
// Errors without id->string mapping.
|
||||
{ 0xe8008015, "A valid provisioning profile for this executable was not found." },
|
||||
{ 0xe8008016, "The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile." },
|
||||
{ 0xe8008017, "A signed resource has been added, modified, or deleted." },
|
||||
{ 0xe8008018, "The identity used to sign the executable is no longer valid. Please verify that your device’s clock is properly set, and that your signing certificate is not expired." },
|
||||
{ 0xe8008019, "The application does not have a valid signature." },
|
||||
{ 0xe800801c, "No code signature found." },
|
||||
};
|
||||
|
||||
const int errorcode_to_id_count = sizeof(errorcode_to_id) / sizeof(errorcode_to_id_t);
|
||||
|
||||
// Taken from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/Resources/en_GB.lproj/Localizable.strings
|
||||
error_id_to_message_t error_id_to_message[] = {
|
||||
{ "kAMDAPIInternalError", "There was an internal API error." },
|
||||
{ "kAMDAlreadyArchivedError", "The application is already archived." },
|
||||
{ "kAMDAppBlacklistedError", "This app is not allowed to be installed on this device." },
|
||||
{ "kAMDApplicationAlreadyInstalledError", "A system application with the given bundle identifier is already installed on the device and cannot be replaced." },
|
||||
{ "kAMDApplicationMoveFailedError", "The application could not be moved into place on the device." },
|
||||
{ "kAMDApplicationSandboxFailedError", "The application could not be sandboxed." },
|
||||
{ "kAMDApplicationVerificationFailedError", "The application could not be verified." },
|
||||
{ "kAMDArchiveDestructionFailedError", "Could not remove the application archive." },
|
||||
{ "kAMDBadHeaderError", "Could not transfer file." },
|
||||
{ "kAMDBreadcrumbFailedError", "Could not write installation breadcrumb." },
|
||||
{ "kAMDBreadcrumbUnlockError", "Could not update installation breadcrumb." },
|
||||
{ "kAMDBundleVerificationFailedError", "The carrier bundle could not be verified." },
|
||||
{ "kAMDBusyError", "The device is busy." },
|
||||
{ "kAMDCannotTranslateError", "Could not translate messages from device" },
|
||||
{ "kAMDCarrierBundleCopyFailedError", "Could not install the carrier bundle." },
|
||||
{ "kAMDCarrierBundleDirectoryCreationFailedError", "Could not create the carrier bundle directory." },
|
||||
{ "kAMDCarrierBundleMissingSupportedSIMsError", "There are no supported SIMs for this carrier bundle." },
|
||||
{ "kAMDCheckinConnectionFailedError", "The service did not start properly on the device." },
|
||||
{ "kAMDCheckinOutOfMemoryError", "The service did not start properly on the device." },
|
||||
{ "kAMDCheckinReceiveFailedError", "The service did not start properly on the device." },
|
||||
{ "kAMDCheckinResponseFailedError", "The service did not start properly on the device." },
|
||||
{ "kAMDCheckinSendFailedError", "The service did not start properly on the device." },
|
||||
{ "kAMDCheckinSetupFailedError", "Could not start service on device" },
|
||||
{ "kAMDCheckinTimeoutError", "The service did not start properly on the device." },
|
||||
{ "kAMDCommCenterNotificationFailedError", "Could not listen for notification from the baseband." },
|
||||
{ "kAMDContainerCreationFailedError", "Could not create application container." },
|
||||
{ "kAMDContainerP0wnFailedError", "Could not repair permissions on application container." },
|
||||
{ "kAMDContainerRemovalFailedError", "Could not remove the application container." },
|
||||
{ "kAMDCryptoError", "Could not establish a secure connection to the device." },
|
||||
{ "kAMDDeviceDisconnectedError", "This device is no longer connected." },
|
||||
{ "kAMDDeviceFamilyNotSupported", "This application does not support this kind of device." },
|
||||
{ "kAMDDeviceOSVersionTooLow", "The device OS version is too low." },
|
||||
{ "kAMDDeviceRefNoGood", "This device is no longer connected." },
|
||||
{ "kAMDDeviceTooNewError", "This application needs to be updated." },
|
||||
{ "kAMDDictCreationFailedError", "Could not extract capabilities from the request." },
|
||||
{ "kAMDDigestFailedError", "Could not read disk image." },
|
||||
{ "kAMDEOFError", "End of file." },
|
||||
{ "kAMDEmbeddedProfileInstallFailedError", "Could not install the embedded provisioning profile." },
|
||||
{ "kAMDErrorError", "An error occurred." },
|
||||
{ "kAMDEscrowLockedError", "Device is not available until first unlock after boot." },
|
||||
{ "kAMDExecutableTwiddleFailedError", "Could not change executable permissions on the application." },
|
||||
{ "kAMDExistenceCheckFailedError", "Could not check to see if the application already exists." },
|
||||
{ "kAMDFMiPProtectedError", "The device is in lost mode." },
|
||||
{ "kAMDFileExistsError", "The file already exists." },
|
||||
{ "kAMDGeoJSONCaptureFailedError", "Could not save the GeoJSON data." },
|
||||
{ "kAMDGetProhibitedError", "Cannot retrieve value from the passcode-locked device." },
|
||||
{ "kAMDImmutableValueError", "This value cannot be changed." },
|
||||
{ "kAMDIncorrectArchitectureError", "This application does not support this device's CPU type." },
|
||||
{ "kAMDInstallMapUpdateFailedError", "Could not update the installed applications list." },
|
||||
{ "kAMDInstallProhibitedError", "Installation of apps is prohibited by a policy on the device." },
|
||||
{ "kAMDInvalidActivationRecordError", "The activation record is not valid." },
|
||||
{ "kAMDInvalidArgumentError", "The argument is invalid." },
|
||||
{ "kAMDInvalidCheckinError", "Could not start service on device" },
|
||||
{ "kAMDInvalidDiskImageError", "The disk image is invalid." },
|
||||
{ "kAMDInvalidHostIDError", "The device does not recognise this host." },
|
||||
{ "kAMDInvalidPairRecordError", "The host is no longer paired with the device." },
|
||||
{ "kAMDInvalidResponseError", "Received an unexpected response from the device." },
|
||||
{ "kAMDInvalidServiceError", "The service is invalid." },
|
||||
{ "kAMDInvalidSessionIDError", "The session ID is invalid." },
|
||||
{ "kAMDIsDirectoryError", "The path is a directory." },
|
||||
{ "kAMDLookupFailedError", "Could not list installed applications." },
|
||||
{ "kAMDMCChallengeRequired", "A policy on the device requires secure pairing." },
|
||||
{ "kAMDMCProtected", "Pairing is prohibited by a policy on the device." },
|
||||
{ "kAMDManifestCaptureFailedError", "Could not save the application manifest." },
|
||||
{ "kAMDMapGenerationFailedError", "Could not generate the map." },
|
||||
{ "kAMDMissingActivationRecordError", "The activation record could not be found." },
|
||||
{ "kAMDMissingApplicationIdentifierError", "Request was missing the application identifier." },
|
||||
{ "kAMDMissingAttributeValueError", "Request was missing a required value." },
|
||||
{ "kAMDMissingBundleExecutableError", "The application bundle does not contain an executable." },
|
||||
{ "kAMDMissingBundleIdentifierError", "The application bundle does not contain a valid identifier." },
|
||||
{ "kAMDMissingBundlePathError", "Could not determine the application bundle path." },
|
||||
{ "kAMDMissingBundleVersionError", "The bundle's Info.plist does not contain a CFBundleVersion key or its value is not a string." },
|
||||
{ "kAMDMissingCommandError", "The request did not contain a command." },
|
||||
{ "kAMDMissingContainerError", "Could not find the container for the installed application." },
|
||||
{ "kAMDMissingContainerPathError", "Request was missing the container path." },
|
||||
{ "kAMDMissingDigestError", "The digest is missing." },
|
||||
{ "kAMDMissingHostIDError", "The device does not recognise this host." },
|
||||
{ "kAMDMissingImageTypeError", "The image is missing." },
|
||||
{ "kAMDMissingKeyError", "The key is missing." },
|
||||
{ "kAMDMissingOptionsError", "The options are missing." },
|
||||
{ "kAMDMissingPackagePathError", "Request was missing the package path." },
|
||||
{ "kAMDMissingPairRecordError", "The host is not paired with the device." },
|
||||
{ "kAMDMissingServiceError", "The service is missing." },
|
||||
{ "kAMDMissingSessionIDError", "The session ID is missing." },
|
||||
{ "kAMDMissingValueError", "The value is missing." },
|
||||
{ "kAMDMobileImageMounterAlreadyMounted", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterDigestCreationFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterDigestFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterImageInfoCreationFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterImageMapLoadFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterImageMapStoreFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterImageMountFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterImageMoveFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterImageVerificationFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterMissingImagePath", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterMissingImageSignature", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterMissingImageType", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterMountPathMissing", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterMountPathNotEmpty", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterResponseCreationFailed", "Could not support development." },
|
||||
{ "kAMDMobileImageMounterTrustCacheLoadFailed", "Could not support development." },
|
||||
{ "kAMDMuxConnectError", "Could not connect to the device." },
|
||||
{ "kAMDMuxCreateListenerError", "Could not listen for USB devices." },
|
||||
{ "kAMDMuxError", "There was an error with the USB device multiplexor." },
|
||||
{ "kAMDMuxGetListenerError", "Could not get the USB listener." },
|
||||
{ "kAMDNewsstandArtworkCaptureFailedError", "Could not save the Newsstand artwork." },
|
||||
{ "kAMDNoResourcesError", "Could not allocate a resource." },
|
||||
{ "kAMDNoWifiSyncSupportError", "Device doesn't support wireless sync." },
|
||||
{ "kAMDNotConnectedError", "Not connected to the device." },
|
||||
{ "kAMDNotEntitledError", "The requesting application is not allowed to make this request." },
|
||||
{ "kAMDNotFoundError", "The file could not be found." },
|
||||
{ "kAMDNotificationFailedError", "Could not post a notification." },
|
||||
{ "kAMDOverrunError", "There was a buffer overrun." },
|
||||
{ "kAMDPackageExtractionFailedError", "Could not open the application package." },
|
||||
{ "kAMDPackageInspectionFailedError", "Could not inspect the application package." },
|
||||
{ "kAMDPackageMoveFailedError", "Could not move the application package into the staging location." },
|
||||
{ "kAMDPackagePatchFailedError", "Could not apply patch update to application." },
|
||||
{ "kAMDPairingDialogResponsePendingError", "The user has not yet responded to the pairing request." },
|
||||
{ "kAMDPairingProhibitedError", "Pairing only allowed over USB." },
|
||||
{ "kAMDPasswordProtectedError", "The device is passcode protected." },
|
||||
{ "kAMDPathConversionFailedError", "Could not convert the path." },
|
||||
{ "kAMDPermissionError", "You do not have permission." },
|
||||
{ "kAMDPluginCopyFailedError", "Could not copy VPN Plug-in into app container." },
|
||||
{ "kAMDProhibitedBySupervision", "Operation prohibited on supervised devices." },
|
||||
{ "kAMDProvisioningProfileNotValid", "The provisioning profile is not valid." },
|
||||
{ "kAMDReadError", "Could not read from the device." },
|
||||
{ "kAMDReceiveMessageError", "Could not receive a message from the device." },
|
||||
{ "kAMDRemoveProhibitedError", "Cannot remove value on device." },
|
||||
{ "kAMDRestoreContainerFailedError", "Could not restore the application container." },
|
||||
{ "kAMDSUFirmwareError", "Could not flash the firmware." },
|
||||
{ "kAMDSUPatchError", "Could not patch the file." },
|
||||
{ "kAMDSUVerificationError", "The software update package could not be verified." },
|
||||
{ "kAMDSavePairRecordFailedError", "Could not save the pairing record." },
|
||||
{ "kAMDSeatbeltProfileRemovalFailedError", "Could not remove the application seatbelt profile." },
|
||||
{ "kAMDSendMessageError", "Could not send a message to the device." },
|
||||
{ "kAMDServiceLimitError", "Too many instances of this service are already running." },
|
||||
{ "kAMDServiceProhibitedError", "The service could not be started on the device." },
|
||||
{ "kAMDSessionActiveError", "The session is active." },
|
||||
{ "kAMDSessionInactiveError", "The session is inactive." },
|
||||
{ "kAMDSetProhibitedError", "Cannot set value on device." },
|
||||
{ "kAMDStageCreationFailedError", "Could not create the staging directory." },
|
||||
{ "kAMDStartServiceError", "The service could not be started." },
|
||||
{ "kAMDSuccess", "There was no error." },
|
||||
{ "kAMDSymlinkFailedError", "Could not create the symlink." },
|
||||
{ "kAMDTimeOutError", "The operation timed out." },
|
||||
{ "kAMDTooBigError", "The message is too big." },
|
||||
{ "kAMDUndefinedError", "An unknown error occurred." },
|
||||
{ "kAMDUninstallProhibitedError", "Uninstallation of apps is prohibited by a policy on the device." },
|
||||
{ "kAMDUnknownCommandError", "The device does not recognise the command." },
|
||||
{ "kAMDUnknownPacketError", "The packet is unknown." },
|
||||
{ "kAMDUnsupportedError", "This operation is unsupported." },
|
||||
{ "kAMDUserDeniedPairingError", "The device rejected the pairing attempt." },
|
||||
{ "kAMDWriteError", "Could not write to the device." },
|
||||
{ "kAMDWrongDroidError", "The device is in recovery mode." },
|
||||
{ "kAMDiTunesArtworkCaptureFailedError", "Could not save the iTunes artwork." },
|
||||
{ "kAMDiTunesMetadataCaptureFailedError", "Could not save the iTunes metadata." },
|
||||
};
|
||||
|
||||
const int error_id_to_message_count = sizeof(error_id_to_message) / sizeof(error_id_to_message_t);
|
||||
|
||||
const char* get_error_message(unsigned int error) {
|
||||
const char* id = NULL;
|
||||
|
||||
// Lookup error localization id
|
||||
for (int i = 0; i < errorcode_to_id_count; i++) {
|
||||
if (errorcode_to_id[i].error == error) {
|
||||
id = errorcode_to_id[i].id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Lookup error message
|
||||
if (id) {
|
||||
for (int i = 0; i < error_id_to_message_count; i++)
|
||||
if (strcmp(error_id_to_message[i].id, id) == 0)
|
||||
return error_id_to_message[i].message;
|
||||
}
|
||||
|
||||
// If message is not found, then at least return id if it was found, otherwise NULL
|
||||
return id;
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user