Sending a file via AirDrop (iOS) and the recipient is not given the opportunity to accept/reject the file - ios

I've made it possible to send a serialised object via AirDrop. I've added both a custom Document Type and an Exported UTI.
Sending and receiving the file is working just fine - in that the recipient can process and use the data as expected.
However, when testing this process between my devices the files are automatically accepted - the recipient isn't given the opportunity to accept/reject.
Normally, when sharing files via AirDrop the user is given the opportunity to accept or reject, so I'm wondering if I need to do something to ensure this happens? But, I haven't seen anything in Apple's documentation relating to this...
Any suggestions?

Ah! This turned out to be a non-problem.
I've been testing the application using two of my own devices (iPhone and iPad). The key here is that the same user / Apple ID is signed into each device.
In this case, when sharing data using AirDrop files are accepted automatically. I confirmed this by sending a photo from the Photos app between the same devices and the same auto-acceptance was observed.
When expanding the test to use someone else's iPhone, data shared via AirDrop from my app did get the system's Accept/Reject dialog.
Nothing to code. Nothing to do.

Related

XCODE / IOS - How to use exclusive extension to immediately present whatsapp (.wai, .waa, .wam)

Is there any way to make work that part of the whatsapp document interaction API:
Alternatively, if you want to show only WhatsApp in the application list (instead of WhatsApp plus any other public/*-conforming apps) you can specify a file of one of aforementioned types saved with the extension that is exclusive to WhatsApp:
images - «.wai» which is of type net.whatsapp.image
videos - «.wam» which is of type net.whatsapp.movie
audio files - «.waa» which is of type net.whatsapp.audio
When triggered, WhatsApp will immediately present the user with the contact/group picker screen. The media will be automatically sent to a selected contact/group.
I don't really ask for a code example as I almost tried eveything, but more if someone ever successfully opened the whatsapp application WITHOUT passing through the share menu (with messenger tile, whatsapp, notepad...) ?
FYI: As I went through a lot of tests with this, I couldn't find any solution yet.
Whatsapp recognize the file extension, but cannot even read it. Once shared, when you click on it, it's written ".whatsapp audio file", nothing more (And it's not even shared directly).
I sent a email to whatsapp developper team, they said they have others problem to fix currently, so it's not even on their to do list.
Wait & see..

Upload files from dropbox/box account to a public cloud using an iphone app

I need to transfer files from the drop box account directly to a public cloud without downloading the files and storing it in the application sandbox. Does Apple allow this?
I am looking at the same and did not find it. It should not be due to Apple allowing or not; but dropbox app does not have the function. E.g. to send a photo from dropbox, sharing function only sends a link in my apple mail.
Only possible solution I am exploring is using airfile (not sure of other apps AFAIK now), clicking on sharing allows me to open it in other app (buggy 4 my test nw) or to send via email.. send via email sounds ok since i can select photos in airfile, see the actual pic in the apple mail and send it via to flickr.
Hope that idea helps!

MAP bluetooth profile to transfer data

​
I'm looking into MAP profile (on iOS) because is under standard profiles and you don't need MFi to use it.​
My question: is it possible to use MAP profile to transfer data (in messages)? or are you restricted to just messages, calls and emails? In other words - when I send data to phone over MAP profile is data accepted by any application or specifically my messages application (or phone application, or email application).
I hope I was clear :) thx​
My own replay for purposes of "closing" the question.
I couldn't find the way of sending data over MAP - at least on iOS and event if I would manage to send it I'm almost certain that only specific application would be able to accept the data. So for example mail would be accepted by Mail application.

Using MultipeerConnectivity.framework to send and receive photos and text files

I want to give to the user of my app the ability to share a photograph without having an internet connection. It is quite hard to explain but I'll do my best. Basically in my app a user can press on a plus button to take a shot using their iPhone. This image is then uploaded on the Internet (Dropbox) in a common folder that can be accessed by all app users. When other users open the app, the image that has been uploaded is downloaded on their device. Since there might be more than one image, the app refreshes itself once in a while, and downloads the new photographs. I want to do the same thing using the bluetooth (or airdrop). When one device takes a picture, this is saved on the device, and sent to all app users nearby. These users can edit it, send it back to the original device where it can be accessed by everyone. basically the original device acts as a server, and all other devices stream the information from that device. The whole purpose of this is to have, say 15 different iOS devices all in the same room in sync which display the same exact thing. When someone edits, all the other people will see it, as if they where in sync with "the cloud" (which now is Dropbox).
I understood that this might be possible with MultipeerConnectivity.framework as it permits more than one device to be connected at the same time. I also found an example app called beam it: http://arctouch.com/beamit/
What I'm asking here is not really for some code, rather some indications on how I could approach the problem.

Prevent installing passbook on multiple devices

Not exactly a programming question but here it goes:
How can a company who is distributing passbook passes via email or web prevent a pass from being installed on more than one device?
I can not find anything about this on Apple docs. The only I can think of is to check on the device registration webservice whether the combination of pass type and serial has a device already registered and delete it , but I am not aware of any command to delete the pass remotely.
Another option would be to check if it is already registered prior to generating the pass but this would only work for URL distribution, not for email.
Is there any way to delete a pass remotely via push notification + update? Any ideas on how to solve this issue?
Mail and Mobile Safari will present any pass they are given and the user can decide to add them to their Passbook. There is nothing the pass creator can do to prevent it except to be careful about how the .pkpass files get handed around.
If you really only want to deliver a specific pass to a specific device you might consider a companion app that uses a custom API to communicate with the the backend and request the pass for that device that way. Then you have much more control than distribution via email or url links.
Apple frowns on trying to delete a pass programmatically; only users are supposed to delete passes because they added them. You can, however, update a pass to make it clear that is not valid and should be deleted. For example you can remove the bar code, if any, and use a background image with a big red "INVALID" on it.
Just to extend #ohmi's answer:
You cannot prevent passes from being installed on more than one
device - e.g. if user enables iCloud for Passbook, the passes will get
synced automatically across devices.
Considering your links to pkpasses are public, you may want to consider
introducing one-time download links, but while it can fill your
needs just fine, users can be really disappointed if it's impossible to re-add
passes that they manually deleted. So I wouldn't recommend such solution.
You can make you pkpass links kind of private, so only GET request originating from your application and carrying a specific value for specific header field (e.g. auth_token), will receive a pkpass file, however this way you almost disable pass distribution via email or via sharing URLs to passes and make pass updating probably impossible.

Resources