A file transfer and clipboard synchronization tool between Windows and iOS devices implemented using Python and Shortcuts.
flask==3.0.0
flask-babel==4.0.0
pillow==10.1.0
pystray==0.19.5
pyinstaller==6.2.0
windows-toasts==1.3.1
pyperclip==1.8.2
python build.py-
Network
- Your iPhone and PC must be on the same LAN, or the PC can connect to the iOS hotspot, or vice versa.
- (It doesn't use data when transferring files via a hotspot.)
-
Install Bonjour on PC (optional)
- Bonjour allows you to access Windows using the 'hostname.local' instead of an IP address.
- The latest version of Bonjour may encounter issues accessing 'hostname.local'. Please use an older version instead.
-
Start AirDropPlus.exe
Start 'AirDropPlus.exe', and when prompted with the following pop-up, please click to allow.
-
Set up AirdropPlus
- Right click on the tray icon and open the web configration with settings.
-
Get the shortcut on your iPhone. version: 1.5.4 https://www.icloud.com/shortcuts/c499c9a3d9b04e189cce38d9560b3e2e
-
Set up the shortcut:
- host:'hostname.local'
- port:The same port as that in the PC-side settings
- key:The same key as that in the PC-side settings
-
Set the trigger method of the shortcut (choose one of the three methods):
- Set it up in 'Settings-Accessibility-Touch-BackTap' to trigger with a double-tap on the back of the iPhone.
- The iPhone 15 Pro series can set it to trigger with the side button.
- Newer versions of iOS can add 'AirDrop Plus' shortcuts to the Control Center.
-
Remove the limit on the number of files sent via Shortcuts (Not performing this setting will cause an error when sending multiple images) iPhone - Settings - App - Shortcuts - Advanced - Allow Sharing Large Amounts of Data
-
Functionality Testing:
- Send files: Add the 'AirDrop Plus' shortcut to the file sharing menu. Tap the 'AirDrop Plus' shortcut from the file sharing menu. PC will receive the file and show a notification.
- Send texts:
- Copy the text which you want to send.
- Trigger the shortcut, then tap the 'Send' option.
- Receive files or texts:
- Trigger the shortcut
- Tap the 'Receive' option to receive file or text from PC's clipboard.
- Check if the local area network (LAN) environment is unobstructed. In campus network environments, communication with LAN devices may be prohibited.
- Check if the port in the PC-side settings is the same as that set in the shortcut commands.
- Ensure that the hostname set in the shortcut is consistent with the PC's hostname (the hostname should not be in Chinese and should not contain '-'). You can also try changing hostname.local to IP address.
- Check if the PC's firewall is blocking the port set in the config.ini file. Remove all entries related to AirDropPlus and restart AirDropPlus. After the restart, please allow the pop-up for network requests.
- It's possible that the PC's system version is too old to support interactive notifications. Try changing to basic notifications in the config.ini file.
| Arg Name | Type | Description |
|---|---|---|
| ShortcutVersion | String | The version of the shortcut. It must match the 'version' in the config.ini file. |
| Authorization | String | The key. It must match the first two segments of the 'key' in the config.ini file. For example, if the config.ini file has a version 1.5.1, this should be 1.5. |
Send a file from the mobile device to the PC.
[POST] /file
Request Body: Form
| Arg Name | Type | Description |
|---|---|---|
| file | File | The File to Send |
- Return Type: JSON
- Return Content:
{ "success": true, "msg": "发送成功", "data": null }
Retrieve a file on the PC
[GET] /file/[path]
| Arg Name | Type | Description |
|---|---|---|
| path | String | Base64 encoding of the file path |
- Return Type: File
Send the clipboard to PC
[POST] /clipboard
- Request Body: Form
| Arg Name | Type | Description |
|---|---|---|
| clipboard | String | Mobile Clipboard Content |
- Return Type: JSON
- Return Content:
{ "success": true, "msg": "发送成功", "data": null }
Retrieve the Clipboard Content on PC
[GET] /clipboard
- Return Type: JSON
- Return Content:
- When the Clipboard Contains Text:
{ "success": true, "msg": "", "data": { "type": "text", "data": "clipboard_text" } } - When the Clipboard Contains File:
{ "success": true, "msg": "", "data": { "type": "file", "data": ["file1_path_base64", "file2_path_base64", "file3_path_base64"] } } - When the Clipboard Contains Image:
{ "success": true, "msg": "", "data": { "type": "img", "data": "img_base64_code" } }
- When the Clipboard Contains Text:
Test Connection
[GET] /
- Return Type: Text
- Return Content: Hello world!