Best way to transfer files from 3rd party device to iOS app - ios

What is the best way to transfer files from 3rd party device (that I want to build) to iOS app (that I want to create)?
The device will generate data which will be processed by this iOS app and presented afterwards.
This device will be some kind of GPS logger - tens of megabytes.
Can I use Bluetooth PAN initiated and handled completly by the iOS app?
Can I make WiFi direct connection initiated and handled completly by the iOS app?
For this solution I need MFI program enrollment?

Related

Limitations of programmatically setting phone calls

Is there a way of programmatically setting an app so that it lets you automatically reject all phone calls while in the app?
Thankfully this is not supported in any way. A 3rd party app has no control at a all over how a phone call is handled.
This might be possible on a jailbroken device using private APIs, but certainly not for an App Store app running on normal devices.

Passing objects between different applications

I am trying to develop a Bluetooth Fitness Watch (Bluetooth LE only) as a project of mine. I have created an application (for now we can call it FitX) that allows the user to connect to the watch, similar to the the Pebble Watch, and the object within this app is called fitXWatch (handles the connection and all of that).
However, I now wish to be able to reference this fitXWatch object in another test app so users would be able to integrate my watch into there respective apps. This is the same principal again as Pebble.
I know iOS in general is very sandboxed, but based on Pebble, it gives me hope it can be done.
So my question is this, How can I pass an object from one app to another app similar to Pebble?
Thanks!
According to Apple's Technical Q&A QA1657:
Q: I understand that the External Accessory framework in iOS 3.0 and later will allow my application to communicate with Bluetooth devices. So why doesn't my application see the Bluetooth accessory sitting next to my iPhone?
A: The External Accessory framework is designed to allow iOS applications to communicate only with hardware accessories that are developed under Apple's MFi licensee program. MFi compliant accessories can be implemented as wired devices, meaning they plug in to the Apple device's 30-pin or Lightning connector, or as wireless devices, whereby they use Bluetooth as the communication channel. Either way, an application that uses the External Accessory framework will not be notified of an accessory's presence unless the accessory identifies itself as being MFi compliant, i.e., it was specifically designed to interface with an iOS application.
First of all, are you sure you can't combine the two apps into one single app? Or, maybe convert APP A into a framework and include that framework in APP B?
There is no way to do what you ask locally. You will have to save your object to a file and then upload that file to a remote server. When APP B is opened, it should contact that server and download the file.

iOS - Screen sharing in Perfecto Mobile

We were exploring various test suites for mobile automated testing and ran into this company called Perfecto Mobile. One of the features that blew me away was they are able to (without jailbreaking) effectively perform a "Remote desktop" on a physical iPad.
So, the iPad's screen is mirrored within a web application, it can register touch / swipe events on the web app and perform them on the device. The only relevant technical detail I have is that all this is being performed using commands sent over the USB cable.
I'm really curious as to how this is implemented and details on relevant Private APIs if any.
Thanks,
Teja
I'm not familiar with PerfectoMobile, but I can give you a few pointers on how this can be accomplished:
For the mirroring, one way would be to look at using AirPlay, the APIs are pretty well documented, but not to do what we're talking about which would require some serious reverse engineering, but it's definitely possible, these guys have done it. A different approach would be to run a background app that would periodically take snapshots of the main screen, and send them over a socket connection to a client. You could do this as a VNC server, and to incorporate the remote view in a web app, you could use noVNC. As far using a USB connection, in the case of the background app talking to a client over TCP, you could to a port forward.
To actually perform on the device the touch events sent from your remote viewer, most people have been using the GSEvent group of functions from the GraphicsServices private framework without needing to jailbreak the device. Again, a background app would receive over a socket an instruction such as "Tap there", instantiate the GSEvent, and inject it so it gets processed in the run loop of the most front app.
These few possibilities, at least, have been implemented successfully in different iOS apps up to iOS 6.1 (iOS7 is a different animal). You won't find any such app in the App Store, since Apple clearly prohibits the use of private frameworks in 3rd party apps, instead people deploy them in-house using Enterprise and ad-hoc provisioning profile. On Android however, there's VMLite available in the Play Store.
If you looking to share screen from ios / android, check out skreen.me. They have sample apps you can try out, also they provide libs for mobile app integration.

What is the simplest way to connect a device to an iPad from an application?

I am working on a major product release for my company. We are designing a new device that we would like to integrate into an iOS app. (FYI, we have recently been accepted into the Apple MFi program so we are past that step.)
What we desire is to create a hardware/software eco-system where our users can start our iPad app (yes, it is specific to the iPad and the not iPhone or iPod Touch devices) and the application will automatically discover and link up with any close-proximity hardware that we've developed.
This means that I will need to implement some form of device connection process on both the iPad and within the hardware.
Is there any way to code automatic connectivity to a Bluetooth device from within an iOS application?
I am aware of the Core Bluetooth Framework which has this capability, however, it only works with the new iPhone 4S. That's not an option.
I've also researched about the External Accessory Framework, which can be used to connect to external devices whether they are connected via the iPod port or Bluetooth. This is an option but, if my understanding is correct, our hardware must already be paired with iPad before the iOS software can connect to it. This is less than preferable because although many of our devices may not be in immediate vicinity at one point in time, our customers could potentially own 100's devices that they may desire to connect to with our software.
What are my reasonable options or alternatives? The end goal is to provide a very easy means for our users to be able to connect to our devices, from within our software, on an iPad.
NOTE: I MUST NOT jailbreak the iPad or break any Apple TOS agreements.
UPDATE (3-7-2012) I saw today that the 'New iPad' (as it is being officially called) will be Bluetooth 4.0 capable. I assume this means that this iPad device will be able to use the Core Bluetooth Framework. This doesn't immediately solve my problem because we do want remain compatible with at least the "last generation" iPad device, but this is worth pointing out for others who may be looking for such an answer.
You cannot connect an iOS device to a bluetooth device without pairing first. It is purposely built that way by Apple to reduce the likelihood that someone could connect a bluetooth device without the user knowing about it. If pairing each device is unacceptable (and it sounds like it is), and you don't want to develop a dongle, the only remaining path I can see is to make your devices capable of relaying data between them like a mesh network. That way the user would only have to pair with a single device, and that paired unit would relay communications between the other devices and the iPad.
One of your alternatives would be going WiFi (AdHoc or Infrastructure) with Bonjour. For example you would be able to detect the device nearby (if it is maintaining it's own AdHoc then by SSID; if it's in infrastructure network then by service being announced). One big drawback would be that you couldn't connect directly (from app) to the device's network - user would have to do it manually.
As for BT: big drawback is lack of a serial protocol (not implemented in iPhone/iPod/iPad).

IPhone Bluetooth Connectivity to Non IOS Devices

I was wondering, if there is a way to use IPhone as an HID device, with some other device like PS3. I checked out the Bluetooth specification and IOS Devices do support HID Profile. So I thought it would be easy to pair my iPhone using passkey mechanism and should be able to start using my iPhone as keyboard or mouse without much hassle. But I found very soon that this assumption is naive and I need to develop custom solution.
I was initially thinking about using GameKit framework, but I think it only works between two compatible IOS Devices. If I want to extend this capability, then I have to use iPhone External Accessory API .In my analysis, I also found that iPhone will only communicate and pair with devices that are licensed by Apple. (Made for iPhone\iPod program). Does it mean that, if I want to use iPhone with another device, I need to get that device approved by Apple. ( Which will not surprise me one bit). Also if someone could point me to more detailed documentation on this, that will also be helpful.( What is an MFI developer board ??)
I do not want a solution that needs me to jailbreak an iPhone. (or any solution that will disqualify my app by Apple).
So to summarize:
1- Please validate my findings, correct them if they are wrong?
2a- How does External Accessory API Work?
b- Can I use this to connect to third party accessories ? (or is this only for accessory developers).
3- Or is there a better solution without using External Accessory API?
Please provide supportive documentation or link if you can. Thank You.
You are unlikely to get on the External accessory program from apple unless you are a big company ( you can try, but I have read this a number of places) . iPhones use a proprietary Bluetooth interface that and hardware must also implement this interface, so not much chance of getting it to connect to any other hardware directly.
Most apps like this (Remote Mouse) for example, connect to your wifi network, and have another application installed on your computer. The iphone can then talk to this application over the wi-fi network, but not bluetooth. I would suggest that the only way I can see this would be possible to to create the server app that you install on a computer on the wi-fi network that then in turn controls the 3rd party device if there is an API that you can use from the desktop app to control the 3rd party device.
This is just what I have found when I researched about this for making an app for iPhone to control a bluetooth watch. I had to jailbreak in the end to replace the bluetooth stack on the iPhone with one that could connect to any hardware device. Not limited by apple.

Resources