@mcesystems/apple-kit 1.0.74 → 1.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -258
- package/dist/index.js +850 -896
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +847 -892
- package/dist/index.mjs.map +4 -4
- package/dist/resources/plist/certificate-trust.xml +43 -43
- package/dist/resources/plist/ddm-managed-app.xml +55 -0
- package/dist/resources/plist/wifi-enterprise.xml +59 -59
- package/dist/resources/plist/wifi-standard.xml +50 -50
- package/dist/types/graphql/queries.d.ts +9 -0
- package/dist/types/graphql/queries.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logic/actions/activation.d.ts +12 -0
- package/dist/types/logic/actions/activation.d.ts.map +1 -0
- package/dist/types/logic/actions/appState.d.ts +2 -0
- package/dist/types/logic/actions/appState.d.ts.map +1 -0
- package/dist/types/logic/actions/device.d.ts +22 -13
- package/dist/types/logic/actions/device.d.ts.map +1 -1
- package/dist/types/logic/actions/install.d.ts +12 -7
- package/dist/types/logic/actions/install.d.ts.map +1 -1
- package/dist/types/logic/actions/proxy.d.ts +9 -21
- package/dist/types/logic/actions/proxy.d.ts.map +1 -1
- package/dist/types/logic/actions/usbmuxd.d.ts +10 -0
- package/dist/types/logic/actions/usbmuxd.d.ts.map +1 -0
- package/dist/types/logic/activationFlow.d.ts +5 -4
- package/dist/types/logic/activationFlow.d.ts.map +1 -1
- package/dist/types/logic/appleDeviceKit.d.ts +11 -10
- package/dist/types/logic/appleDeviceKit.d.ts.map +1 -1
- package/dist/types/logic/iosClient.d.ts +50 -0
- package/dist/types/logic/iosClient.d.ts.map +1 -0
- package/dist/types/logic/profileParser.d.ts +13 -0
- package/dist/types/logic/profileParser.d.ts.map +1 -0
- package/dist/types/types/auth.d.ts +13 -0
- package/dist/types/types/auth.d.ts.map +1 -0
- package/dist/types/types/install.d.ts +13 -0
- package/dist/types/types/install.d.ts.map +1 -0
- package/dist/types/types/ios.d.ts +4 -0
- package/dist/types/types/ios.d.ts.map +1 -1
- package/dist/types/types/mdm.d.ts +33 -0
- package/dist/types/types/mdm.d.ts.map +1 -0
- package/dist/types/types.d.ts +173 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils/authClient.d.ts +7 -0
- package/dist/types/utils/authClient.d.ts.map +1 -0
- package/dist/types/utils/ddmDeclaration.d.ts +8 -0
- package/dist/types/utils/ddmDeclaration.d.ts.map +1 -0
- package/dist/types/utils/debug.d.ts +17 -0
- package/dist/types/utils/debug.d.ts.map +1 -0
- package/dist/types/utils/installRawProfileRetry.d.ts +7 -0
- package/dist/types/utils/installRawProfileRetry.d.ts.map +1 -0
- package/dist/types/utils/mdmClient.d.ts +7 -0
- package/dist/types/utils/mdmClient.d.ts.map +1 -0
- package/dist/types/utils/trustProfile.d.ts +12 -0
- package/dist/types/utils/trustProfile.d.ts.map +1 -0
- package/package.json +7 -5
- package/resources/ios.exe +0 -0
- package/resources/wintun-LICENSE.txt +84 -0
- package/resources/wintun.dll +0 -0
- package/scripts/README.md +209 -209
- package/scripts/build-windows.sh.template +222 -222
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Prebuilt Binaries License
|
|
2
|
+
-------------------------
|
|
3
|
+
|
|
4
|
+
1. DEFINITIONS. "Software" means the precise contents of the "wintun.dll"
|
|
5
|
+
files that are included in the .zip file that contains this document as
|
|
6
|
+
downloaded from wintun.net/builds.
|
|
7
|
+
|
|
8
|
+
2. LICENSE GRANT. WireGuard LLC grants to you a non-exclusive and
|
|
9
|
+
non-transferable right to use Software for lawful purposes under certain
|
|
10
|
+
obligations and limited rights as set forth in this agreement.
|
|
11
|
+
|
|
12
|
+
3. RESTRICTIONS. Software is owned and copyrighted by WireGuard LLC. It is
|
|
13
|
+
licensed, not sold. Title to Software and all associated intellectual
|
|
14
|
+
property rights are retained by WireGuard. You must not:
|
|
15
|
+
a. reverse engineer, decompile, disassemble, extract from, or otherwise
|
|
16
|
+
modify the Software;
|
|
17
|
+
b. modify or create derivative work based upon Software in whole or in
|
|
18
|
+
parts, except insofar as only the API interfaces of the "wintun.h" file
|
|
19
|
+
distributed alongside the Software (the "Permitted API") are used;
|
|
20
|
+
c. remove any proprietary notices, labels, or copyrights from the Software;
|
|
21
|
+
d. resell, redistribute, lease, rent, transfer, sublicense, or otherwise
|
|
22
|
+
transfer rights of the Software without the prior written consent of
|
|
23
|
+
WireGuard LLC, except insofar as the Software is distributed alongside
|
|
24
|
+
other software that uses the Software only via the Permitted API;
|
|
25
|
+
e. use the name of WireGuard LLC, the WireGuard project, the Wintun
|
|
26
|
+
project, or the names of its contributors to endorse or promote products
|
|
27
|
+
derived from the Software without specific prior written consent.
|
|
28
|
+
|
|
29
|
+
4. LIMITED WARRANTY. THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF
|
|
30
|
+
ANY KIND. WIREGUARD LLC HEREBY EXCLUDES AND DISCLAIMS ALL IMPLIED OR
|
|
31
|
+
STATUTORY WARRANTIES, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
32
|
+
FOR A PARTICULAR PURPOSE, QUALITY, NON-INFRINGEMENT, TITLE, RESULTS,
|
|
33
|
+
EFFORTS, OR QUIET ENJOYMENT. THERE IS NO WARRANTY THAT THE PRODUCT WILL BE
|
|
34
|
+
ERROR-FREE OR WILL FUNCTION WITHOUT INTERRUPTION. YOU ASSUME THE ENTIRE
|
|
35
|
+
RISK FOR THE RESULTS OBTAINED USING THE PRODUCT. TO THE EXTENT THAT
|
|
36
|
+
WIREGUARD LLC MAY NOT DISCLAIM ANY WARRANTY AS A MATTER OF APPLICABLE LAW,
|
|
37
|
+
THE SCOPE AND DURATION OF SUCH WARRANTY WILL BE THE MINIMUM PERMITTED UNDER
|
|
38
|
+
SUCH LAW. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
|
|
39
|
+
WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR
|
|
40
|
+
A PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE
|
|
41
|
+
EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
|
|
42
|
+
|
|
43
|
+
5. LIMITATION OF LIABILITY. To the extent not prohibited by law, in no event
|
|
44
|
+
WireGuard LLC or any third-party-developer will be liable for any lost
|
|
45
|
+
revenue, profit or data or for special, indirect, consequential, incidental
|
|
46
|
+
or punitive damages, however caused regardless of the theory of liability,
|
|
47
|
+
arising out of or related to the use of or inability to use Software, even
|
|
48
|
+
if WireGuard LLC has been advised of the possibility of such damages.
|
|
49
|
+
Solely you are responsible for determining the appropriateness of using
|
|
50
|
+
Software and accept full responsibility for all risks associated with its
|
|
51
|
+
exercise of rights under this agreement, including but not limited to the
|
|
52
|
+
risks and costs of program errors, compliance with applicable laws, damage
|
|
53
|
+
to or loss of data, programs or equipment, and unavailability or
|
|
54
|
+
interruption of operations. The foregoing limitations will apply even if
|
|
55
|
+
the above stated warranty fails of its essential purpose. You acknowledge,
|
|
56
|
+
that it is in the nature of software that software is complex and not
|
|
57
|
+
completely free of errors. In no event shall WireGuard LLC or any
|
|
58
|
+
third-party-developer be liable to you under any theory for any damages
|
|
59
|
+
suffered by you or any user of Software or for any special, incidental,
|
|
60
|
+
indirect, consequential or similar damages (including without limitation
|
|
61
|
+
damages for loss of business profits, business interruption, loss of
|
|
62
|
+
business information or any other pecuniary loss) arising out of the use or
|
|
63
|
+
inability to use Software, even if WireGuard LLC has been advised of the
|
|
64
|
+
possibility of such damages and regardless of the legal or quitable theory
|
|
65
|
+
(contract, tort, or otherwise) upon which the claim is based.
|
|
66
|
+
|
|
67
|
+
6. TERMINATION. This agreement is affected until terminated. You may
|
|
68
|
+
terminate this agreement at any time. This agreement will terminate
|
|
69
|
+
immediately without notice from WireGuard LLC if you fail to comply with
|
|
70
|
+
the terms and conditions of this agreement. Upon termination, you must
|
|
71
|
+
delete Software and all copies of Software and cease all forms of
|
|
72
|
+
distribution of Software.
|
|
73
|
+
|
|
74
|
+
7. SEVERABILITY. If any provision of this agreement is held to be
|
|
75
|
+
unenforceable, this agreement will remain in effect with the provision
|
|
76
|
+
omitted, unless omission would frustrate the intent of the parties, in
|
|
77
|
+
which case this agreement will immediately terminate.
|
|
78
|
+
|
|
79
|
+
8. RESERVATION OF RIGHTS. All rights not expressly granted in this agreement
|
|
80
|
+
are reserved by WireGuard LLC. For example, WireGuard LLC reserves the
|
|
81
|
+
right at any time to cease development of Software, to alter distribution
|
|
82
|
+
details, features, specifications, capabilities, functions, licensing
|
|
83
|
+
terms, release dates, APIs, ABIs, general availability, or other
|
|
84
|
+
characteristics of the Software.
|
|
Binary file
|
package/scripts/README.md
CHANGED
|
@@ -1,209 +1,209 @@
|
|
|
1
|
-
# Export Apple Resources Script
|
|
2
|
-
|
|
3
|
-
This script exports libimobiledevice binaries and their dependencies to a specified target directory. The exported resources can be used by applications that depend on `@mcesystems/apple-kit`.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
After installing `@mcesystems/apple-kit`:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# Using the binary (recommended)
|
|
11
|
-
npx export-apple-resources <target-path>
|
|
12
|
-
|
|
13
|
-
# Or run the script directly with tsx
|
|
14
|
-
npx tsx node_modules/@mcesystems/apple-kit/scripts/export-resources.ts <target-path>
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### Examples
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# Export to a relative path
|
|
21
|
-
npx tsx export-resources.ts ./my-app/resources/apple-kit
|
|
22
|
-
|
|
23
|
-
# Export to an absolute path
|
|
24
|
-
npx tsx export-resources.ts /Users/me/projects/my-app/resources
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Output Structure
|
|
28
|
-
|
|
29
|
-
The script creates the following directory structure:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
<target-path>/
|
|
33
|
-
├── bin/
|
|
34
|
-
│ ├── darwin/ # macOS binaries and dylibs
|
|
35
|
-
│ │ ├── idevice_id
|
|
36
|
-
│ │ ├── ideviceinfo
|
|
37
|
-
│ │ ├── iproxy
|
|
38
|
-
│ │ ├── libimobiledevice-1.0.6.dylib
|
|
39
|
-
│ │ └── ... (other tools and dylibs)
|
|
40
|
-
│ └── windows/ # Windows binaries and DLLs
|
|
41
|
-
│ ├── idevice_id.exe
|
|
42
|
-
│ ├── ideviceinfo.exe
|
|
43
|
-
│ ├── iproxy.exe
|
|
44
|
-
│ ├── libimobiledevice-1.0-6.dll
|
|
45
|
-
│ └── ... (other tools and DLLs)
|
|
46
|
-
├── licenses/
|
|
47
|
-
│ └── LGPL-2.1.txt
|
|
48
|
-
└── build-windows.sh # Windows build script (generated on non-Windows)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Platform-Specific Prerequisites
|
|
54
|
-
|
|
55
|
-
### macOS
|
|
56
|
-
|
|
57
|
-
#### Prerequisites
|
|
58
|
-
|
|
59
|
-
1. **Homebrew** installed ([https://brew.sh](https://brew.sh))
|
|
60
|
-
|
|
61
|
-
2. **libimobiledevice tools** installed via Homebrew:
|
|
62
|
-
```bash
|
|
63
|
-
brew install libimobiledevice ideviceinstaller
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
3. **Node.js 18+** with `tsx` available:
|
|
67
|
-
```bash
|
|
68
|
-
npm install -g tsx
|
|
69
|
-
# or use npx
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
#### How It Works
|
|
73
|
-
|
|
74
|
-
On macOS, the script:
|
|
75
|
-
1. Locates Homebrew installation (`/opt/homebrew` for Apple Silicon, `/usr/local` for Intel)
|
|
76
|
-
2. Copies required binaries (`idevice_id`, `ideviceinfo`, `iproxy`, etc.)
|
|
77
|
-
3. Recursively collects all dylib dependencies
|
|
78
|
-
4. Fixes dylib paths using `install_name_tool` to use `@loader_path` (makes binaries portable)
|
|
79
|
-
|
|
80
|
-
#### Running
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
cd scripts/export-apple-resources
|
|
84
|
-
npx tsx export-resources.ts /path/to/output
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
### Windows
|
|
90
|
-
|
|
91
|
-
#### Prerequisites
|
|
92
|
-
|
|
93
|
-
1. **MSYS2** installed from [https://www.msys2.org](https://www.msys2.org)
|
|
94
|
-
- Download and run the installer
|
|
95
|
-
- Default installation path: `C:\msys64`
|
|
96
|
-
|
|
97
|
-
2. **Required MSYS2 packages** - Open **MSYS2 MinGW 64-bit** shell and run:
|
|
98
|
-
```bash
|
|
99
|
-
pacman -S base-devel \
|
|
100
|
-
git \
|
|
101
|
-
mingw-w64-x86_64-gcc \
|
|
102
|
-
make \
|
|
103
|
-
libtool \
|
|
104
|
-
autoconf \
|
|
105
|
-
automake-wrapper
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
3. **Apple Mobile Device Support** (for USB communication)
|
|
109
|
-
- Either install iTunes from [https://www.apple.com/itunes/](https://www.apple.com/itunes/)
|
|
110
|
-
- Or install just "Apple Mobile Device Support" from the iTunes installer
|
|
111
|
-
|
|
112
|
-
#### How It Works
|
|
113
|
-
|
|
114
|
-
On Windows, building libimobiledevice from source is required. The script:
|
|
115
|
-
1. Generates a `build-windows.sh` script in the target directory
|
|
116
|
-
2. The build script downloads the official libimobiledevice build script
|
|
117
|
-
3. Compiles all required libraries and tools from source
|
|
118
|
-
4. Copies the resulting binaries and DLLs to the target directory
|
|
119
|
-
|
|
120
|
-
#### Running
|
|
121
|
-
|
|
122
|
-
**Step 1:** Generate the build script (can be done on any platform):
|
|
123
|
-
```bash
|
|
124
|
-
cd scripts/export-apple-resources
|
|
125
|
-
npx tsx export-resources.ts /path/to/output
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
**Step 2:** Open **MSYS2 MinGW 64-bit** shell (NOT regular MSYS2 shell!)
|
|
129
|
-
- Find it in Start Menu: "MSYS2 MinGW 64-bit"
|
|
130
|
-
|
|
131
|
-
**Step 3:** Run the build script:
|
|
132
|
-
```bash
|
|
133
|
-
cd /path/to/output
|
|
134
|
-
bash build-windows.sh
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
> **Note:** The build process may take 10-30 minutes depending on your system.
|
|
138
|
-
|
|
139
|
-
#### Troubleshooting Windows Build
|
|
140
|
-
|
|
141
|
-
| Issue | Solution |
|
|
142
|
-
|-------|----------|
|
|
143
|
-
| "gcc not found" | Install packages: `pacman -S mingw-w64-x86_64-gcc` |
|
|
144
|
-
| "This script must be run from MSYS2 MinGW 64-bit shell" | Open the correct shell from Start Menu |
|
|
145
|
-
| Build fails with SSL errors | `pacman -S mingw-w64-x86_64-openssl` |
|
|
146
|
-
| Device not detected | Ensure iTunes or Apple Mobile Device Support is installed |
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## Tools Included
|
|
151
|
-
|
|
152
|
-
### Required Tools (must be present)
|
|
153
|
-
| Tool | Description |
|
|
154
|
-
|------|-------------|
|
|
155
|
-
| `idevice_id` | List connected iOS devices |
|
|
156
|
-
| `ideviceinfo` | Get device information |
|
|
157
|
-
| `idevicepair` | Manage device pairing/trust |
|
|
158
|
-
| `idevicename` | Get/set device name |
|
|
159
|
-
| `idevicedebug` | Debug applications |
|
|
160
|
-
| `ideviceinstaller` | Install/uninstall apps |
|
|
161
|
-
| `iproxy` | Port forwarding |
|
|
162
|
-
|
|
163
|
-
### Optional Tools (copied if available)
|
|
164
|
-
| Tool | Description |
|
|
165
|
-
|------|-------------|
|
|
166
|
-
| `ideviceactivation` | Device activation |
|
|
167
|
-
| `idevicesyslog` | View device system log |
|
|
168
|
-
| `idevicescreenshot` | Take screenshots |
|
|
169
|
-
| `idevicediagnostics` | Device diagnostics |
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Integrating with Your Application
|
|
174
|
-
|
|
175
|
-
After exporting resources, configure `apple-kit` to use them:
|
|
176
|
-
|
|
177
|
-
### Option 1: Environment Variable
|
|
178
|
-
|
|
179
|
-
Set `IDeviceBinPath` to point to the bin directory:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# macOS
|
|
183
|
-
export IDeviceBinPath=/path/to/resources/bin/darwin
|
|
184
|
-
|
|
185
|
-
# Windows (PowerShell)
|
|
186
|
-
$env:IDeviceBinPath = "C:\path\to\resources\bin\windows"
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Option 2: Bundle with Your App
|
|
190
|
-
|
|
191
|
-
Copy the exported resources into your application's resources folder. The `apple-kit` package will automatically detect binaries in:
|
|
192
|
-
- `<your-app>/resources/bin/darwin/` (macOS)
|
|
193
|
-
- `<your-app>/resources/bin/windows/` (Windows)
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## License
|
|
198
|
-
|
|
199
|
-
The libimobiledevice tools are licensed under **LGPL-2.1**. When distributing these binaries, you must:
|
|
200
|
-
1. Include the LGPL-2.1 license (automatically included in `licenses/` folder)
|
|
201
|
-
2. Provide access to the source code (links included in the license file)
|
|
202
|
-
|
|
203
|
-
Source code repositories:
|
|
204
|
-
- https://github.com/libimobiledevice/libimobiledevice
|
|
205
|
-
- https://github.com/libimobiledevice/libusbmuxd
|
|
206
|
-
- https://github.com/libimobiledevice/libplist
|
|
207
|
-
- https://github.com/libimobiledevice/libimobiledevice-glue
|
|
208
|
-
- https://github.com/libimobiledevice/ideviceinstaller
|
|
209
|
-
|
|
1
|
+
# Export Apple Resources Script
|
|
2
|
+
|
|
3
|
+
This script exports libimobiledevice binaries and their dependencies to a specified target directory. The exported resources can be used by applications that depend on `@mcesystems/apple-kit`.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
After installing `@mcesystems/apple-kit`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Using the binary (recommended)
|
|
11
|
+
npx export-apple-resources <target-path>
|
|
12
|
+
|
|
13
|
+
# Or run the script directly with tsx
|
|
14
|
+
npx tsx node_modules/@mcesystems/apple-kit/scripts/export-resources.ts <target-path>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Examples
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Export to a relative path
|
|
21
|
+
npx tsx export-resources.ts ./my-app/resources/apple-kit
|
|
22
|
+
|
|
23
|
+
# Export to an absolute path
|
|
24
|
+
npx tsx export-resources.ts /Users/me/projects/my-app/resources
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Output Structure
|
|
28
|
+
|
|
29
|
+
The script creates the following directory structure:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
<target-path>/
|
|
33
|
+
├── bin/
|
|
34
|
+
│ ├── darwin/ # macOS binaries and dylibs
|
|
35
|
+
│ │ ├── idevice_id
|
|
36
|
+
│ │ ├── ideviceinfo
|
|
37
|
+
│ │ ├── iproxy
|
|
38
|
+
│ │ ├── libimobiledevice-1.0.6.dylib
|
|
39
|
+
│ │ └── ... (other tools and dylibs)
|
|
40
|
+
│ └── windows/ # Windows binaries and DLLs
|
|
41
|
+
│ ├── idevice_id.exe
|
|
42
|
+
│ ├── ideviceinfo.exe
|
|
43
|
+
│ ├── iproxy.exe
|
|
44
|
+
│ ├── libimobiledevice-1.0-6.dll
|
|
45
|
+
│ └── ... (other tools and DLLs)
|
|
46
|
+
├── licenses/
|
|
47
|
+
│ └── LGPL-2.1.txt
|
|
48
|
+
└── build-windows.sh # Windows build script (generated on non-Windows)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Platform-Specific Prerequisites
|
|
54
|
+
|
|
55
|
+
### macOS
|
|
56
|
+
|
|
57
|
+
#### Prerequisites
|
|
58
|
+
|
|
59
|
+
1. **Homebrew** installed ([https://brew.sh](https://brew.sh))
|
|
60
|
+
|
|
61
|
+
2. **libimobiledevice tools** installed via Homebrew:
|
|
62
|
+
```bash
|
|
63
|
+
brew install libimobiledevice ideviceinstaller
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
3. **Node.js 18+** with `tsx` available:
|
|
67
|
+
```bash
|
|
68
|
+
npm install -g tsx
|
|
69
|
+
# or use npx
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### How It Works
|
|
73
|
+
|
|
74
|
+
On macOS, the script:
|
|
75
|
+
1. Locates Homebrew installation (`/opt/homebrew` for Apple Silicon, `/usr/local` for Intel)
|
|
76
|
+
2. Copies required binaries (`idevice_id`, `ideviceinfo`, `iproxy`, etc.)
|
|
77
|
+
3. Recursively collects all dylib dependencies
|
|
78
|
+
4. Fixes dylib paths using `install_name_tool` to use `@loader_path` (makes binaries portable)
|
|
79
|
+
|
|
80
|
+
#### Running
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
cd scripts/export-apple-resources
|
|
84
|
+
npx tsx export-resources.ts /path/to/output
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### Windows
|
|
90
|
+
|
|
91
|
+
#### Prerequisites
|
|
92
|
+
|
|
93
|
+
1. **MSYS2** installed from [https://www.msys2.org](https://www.msys2.org)
|
|
94
|
+
- Download and run the installer
|
|
95
|
+
- Default installation path: `C:\msys64`
|
|
96
|
+
|
|
97
|
+
2. **Required MSYS2 packages** - Open **MSYS2 MinGW 64-bit** shell and run:
|
|
98
|
+
```bash
|
|
99
|
+
pacman -S base-devel \
|
|
100
|
+
git \
|
|
101
|
+
mingw-w64-x86_64-gcc \
|
|
102
|
+
make \
|
|
103
|
+
libtool \
|
|
104
|
+
autoconf \
|
|
105
|
+
automake-wrapper
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
3. **Apple Mobile Device Support** (for USB communication)
|
|
109
|
+
- Either install iTunes from [https://www.apple.com/itunes/](https://www.apple.com/itunes/)
|
|
110
|
+
- Or install just "Apple Mobile Device Support" from the iTunes installer
|
|
111
|
+
|
|
112
|
+
#### How It Works
|
|
113
|
+
|
|
114
|
+
On Windows, building libimobiledevice from source is required. The script:
|
|
115
|
+
1. Generates a `build-windows.sh` script in the target directory
|
|
116
|
+
2. The build script downloads the official libimobiledevice build script
|
|
117
|
+
3. Compiles all required libraries and tools from source
|
|
118
|
+
4. Copies the resulting binaries and DLLs to the target directory
|
|
119
|
+
|
|
120
|
+
#### Running
|
|
121
|
+
|
|
122
|
+
**Step 1:** Generate the build script (can be done on any platform):
|
|
123
|
+
```bash
|
|
124
|
+
cd scripts/export-apple-resources
|
|
125
|
+
npx tsx export-resources.ts /path/to/output
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Step 2:** Open **MSYS2 MinGW 64-bit** shell (NOT regular MSYS2 shell!)
|
|
129
|
+
- Find it in Start Menu: "MSYS2 MinGW 64-bit"
|
|
130
|
+
|
|
131
|
+
**Step 3:** Run the build script:
|
|
132
|
+
```bash
|
|
133
|
+
cd /path/to/output
|
|
134
|
+
bash build-windows.sh
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
> **Note:** The build process may take 10-30 minutes depending on your system.
|
|
138
|
+
|
|
139
|
+
#### Troubleshooting Windows Build
|
|
140
|
+
|
|
141
|
+
| Issue | Solution |
|
|
142
|
+
|-------|----------|
|
|
143
|
+
| "gcc not found" | Install packages: `pacman -S mingw-w64-x86_64-gcc` |
|
|
144
|
+
| "This script must be run from MSYS2 MinGW 64-bit shell" | Open the correct shell from Start Menu |
|
|
145
|
+
| Build fails with SSL errors | `pacman -S mingw-w64-x86_64-openssl` |
|
|
146
|
+
| Device not detected | Ensure iTunes or Apple Mobile Device Support is installed |
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Tools Included
|
|
151
|
+
|
|
152
|
+
### Required Tools (must be present)
|
|
153
|
+
| Tool | Description |
|
|
154
|
+
|------|-------------|
|
|
155
|
+
| `idevice_id` | List connected iOS devices |
|
|
156
|
+
| `ideviceinfo` | Get device information |
|
|
157
|
+
| `idevicepair` | Manage device pairing/trust |
|
|
158
|
+
| `idevicename` | Get/set device name |
|
|
159
|
+
| `idevicedebug` | Debug applications |
|
|
160
|
+
| `ideviceinstaller` | Install/uninstall apps |
|
|
161
|
+
| `iproxy` | Port forwarding |
|
|
162
|
+
|
|
163
|
+
### Optional Tools (copied if available)
|
|
164
|
+
| Tool | Description |
|
|
165
|
+
|------|-------------|
|
|
166
|
+
| `ideviceactivation` | Device activation |
|
|
167
|
+
| `idevicesyslog` | View device system log |
|
|
168
|
+
| `idevicescreenshot` | Take screenshots |
|
|
169
|
+
| `idevicediagnostics` | Device diagnostics |
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Integrating with Your Application
|
|
174
|
+
|
|
175
|
+
After exporting resources, configure `apple-kit` to use them:
|
|
176
|
+
|
|
177
|
+
### Option 1: Environment Variable
|
|
178
|
+
|
|
179
|
+
Set `IDeviceBinPath` to point to the bin directory:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# macOS
|
|
183
|
+
export IDeviceBinPath=/path/to/resources/bin/darwin
|
|
184
|
+
|
|
185
|
+
# Windows (PowerShell)
|
|
186
|
+
$env:IDeviceBinPath = "C:\path\to\resources\bin\windows"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Option 2: Bundle with Your App
|
|
190
|
+
|
|
191
|
+
Copy the exported resources into your application's resources folder. The `apple-kit` package will automatically detect binaries in:
|
|
192
|
+
- `<your-app>/resources/bin/darwin/` (macOS)
|
|
193
|
+
- `<your-app>/resources/bin/windows/` (Windows)
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
The libimobiledevice tools are licensed under **LGPL-2.1**. When distributing these binaries, you must:
|
|
200
|
+
1. Include the LGPL-2.1 license (automatically included in `licenses/` folder)
|
|
201
|
+
2. Provide access to the source code (links included in the license file)
|
|
202
|
+
|
|
203
|
+
Source code repositories:
|
|
204
|
+
- https://github.com/libimobiledevice/libimobiledevice
|
|
205
|
+
- https://github.com/libimobiledevice/libusbmuxd
|
|
206
|
+
- https://github.com/libimobiledevice/libplist
|
|
207
|
+
- https://github.com/libimobiledevice/libimobiledevice-glue
|
|
208
|
+
- https://github.com/libimobiledevice/ideviceinstaller
|
|
209
|
+
|