seemoo-lab / opendrop

An open Apple AirDrop implementation written in Python
https://owlink.org
GNU General Public License v3.0
8.49k stars 265 forks source link

Support more file types (UTI and MIME) #56

Open boaz-warshawsky opened 3 years ago

boaz-warshawsky commented 3 years ago

I am having a problem that does not happen if I sending a file "normally" via the mac AirDrop in Finder.

When I am sending my file via the finder AirDrop, when the file receives on the iPhone, the iPhone offers me to open the exact application to which the file is targeted to. When I am sending the file with opendrop cli the iPhone telling me that the shared file requires another app from app store: IMG_0004

I can confirm that the expected does install on the iPhone device and working normally. My cli: opendrop send -r 0 -f /Users/boazwarshawsky/Downloads/m200_bundle_1.0.6.1.app.only.fw

boaz-warshawsky commented 3 years ago

The expected message I should get, and that I am getting when sending it via the finder is that: IMG_0005

schmittner commented 3 years ago

You are correct. OpenDrop does not support all file types properly. This is due to Apple's proprietary UTI system which we currently only support in a very limited fashion here: https://github.com/seemoo-lab/opendrop/blob/a309c1946e30c572cd97c6324858c5f5b07bc70d/opendrop/util.py#L52 Unfortunately, we do not have the capacity to extend this list and make it work with all content types.

schmittner commented 3 years ago

One could probably generate a valid MIME–UTI mapping by using Apple's UTType class.