iOS: filesharing without iTunes? - ios

I develop an enterprise application for iOS and the user should be able to add files from the desktop to the application.
I implemented this using filesharing, which works great.
Now this company wants to get rid of iTunes from their machines (which is quite understandable, iTunes is a very invasive process).
The question is, is it still possible to somehow use filesharing without iTunes? maybe with another application?
Or what other way is there to send files to the app (preferrably without the need of an internet connection)
//edit: must work on windows 7 and must not require to install iTunes (there are some other tools that allow access to the iPad filesystem, but they go through drivers installed by iTunes)

You could exchange data via the local wireless network (a connection to the internet is not required, just the iOS device and the Windows computer need to be on the same network).
One option:
You can then create a simple TCP/IP connection over sockets between an iOS app and a Windows application and exchange the data you want.
However you probably need to implement a suitable simple Windows application to do this.
An other, maybe simpler, solution:
You could start a webserver in your iOS-App and show it's IP on the screen. By entering this IP in a browser on the desktop computer you can access websites on the iOS device, which can make documents available for download or receive uploads.
For how to do this, have a look at this question.

There are a number of ways to achieve this, ranging from trivial to sophisticated.
Your question says that you would prefer to avoid an internet connection. Simple solutions may require it - if you want to abstract the difficult parts, you're going to have to let somebody do the dirty work, and that's probably going to be someone(thing) on the internet. Midrange solutions may require a network but not internet connection. A sophisticated solution could probably be whatever you want - but one thing I would say, is that trying to tap into the USB connector is either going to result in a hacktastic or very complicated solution to implement.
One method would be to integrate a third party framework that basically does what your looking for. Look at the Dropbox development kit, for example - allowing Windows (or any platform) users to drop files on their desktops into a shared dropbox, and this can then be read by an iOS application which includes the iOS drobox API.
Another method would be to setup a simple WebDAV server in your office. Host it on a windows box, or a cheap linux box. Give users desktop's access to the share via whatever protocol you want (eg, Windows File Sharing). Then you'd implement a WebDAV client in your app (eg, WTClient) to pull files.
Finally, you could build your own transmission system. A sophisticated example might involve Bonjour and TCP/IP, a simpler-but-custom solution may involve a simple JSON web service running off a local (or remote) server.

I have suggestion but that will require the Internet. I would suggest you to use the DropBox API in the windows and iPhone both. It's awesome to use and very simple for file sharing.
Now a days everybody have dropbox account and have files in it to share. So that shouldn't cost anything other than a bit of implementation (this learning can also be used in other file sharing applications).
Here are some guidance:
iOS
REST API

You can add apps and documents to USB-connected devices with the Apple Configurator

You may use a simple Ftp server installed on PC, so you can connect to server from Ios and upload/download files from iOS to PC....
http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/CFFTPTasks/CFFTPTasks.html
All work is done by Pc and your app will use IP (Intranet or Internet) of PC to share all files.
From Ios you can read all files in FTP server and work with them.

I use the FileBrowser app to get access to network shares over WiFi and will allow you to load supported files to the device. The company responsible is creating an API to allow you to do this within your own app: https://twitter.com/#!/Stratospherix/status/193114857271336960

Related

Transfer files from PC into React Native App

Sometimes I see (mostly iOS) apps, that serve their own HTTP content, which can be accessed with browser on local network in order to transfer files, for example certain audio or video players. In Android world, this is not so much an issue, since the user can access device filesystem using USB cable, but this is not possible on iOS.
Is there any tutorial/best practice/other resource providing deeper insight into this topic? I already did some research and tried to discover some tools for this purpose, but I did not find anything describing exactly this use-case.
Could somebody give me a hint, where to get started?

How to debug Android and/or iOS apps on a Windows Desktop Environment

I work with web analytics and have somewhat of a web developer background, BUT I am not a programmer. I need a way to debug the tracking code I request our mobile app team to implement. They are also not Web Analysts so they struggle to be able to verify if it works too.
I need a way to take one of their builds, run it on a desktop environment, and monitor it with a network monitoring tool like Charles Proxy or the network monitoring tools in the developer tools of most browsers.
I want to at least be able to see the information being passed back to our analytics tracking tool via the network connection. That will tell me if what I requested works or not. If there are other tools that a non-programmer can use to achieve this and more I would be grateful to hear about them. The few tools I have seen seem to be more about testing web pages via a mobile device. I need to test apps that you will eventually download from the an app store.
Thanks!
In our company, we found that Charles is perfect for testing all that concerns tracking.
Charles will record all your requests and responses from your computer, SSL traffic included.
(You can also let physical Android/iOS devices use your desktop as a proxy to catch all traffic there, which is even more impressive and useful, but I understand that this is not what you want.)
You can even do fancy stuff like throttling your connection and adding breakpoints, to see what would happen in "real" situations with bad connection...
Hope this helps.

Communication between iOS app installed on different devices on the same LAN

I have just delivered a prototype for a big client, everything was fine but I'm now curious to know if the solution/architecture I've chosen was the right one or there's place for improvement in case the project will keep on.
The task was to build two iOS apps: one running on 5 different iPhones, and another running on 2 iPads. Basically the iPhone applications had to communicate information to the iPads, and occasionally they also had to send information between each other (iPhone to iPhone). All the infos where small JSON objects/chunks whose size was small, really small.
The app was not intended to reach the app store, is a working prototype to test out some ideas in a user testing environment.
I discarded bluetooth because we are talking about a peer-to-peer communication, not a one-to-one.
What I did was to use web sockets thanks to SocketIO, through a small Node.js server that was running on my mac. The server was really simple, just receiving the messages from the clients and broadcasting information to the other ones.
What do you think? Is the solution I've chosen ok, or there are better ones?
For example, this morning I've just found out these thread here on SO, and I've discovered I could have used GameKit. What do you think?
Socket.IO is nice because it is fairly simple to implement but it has the downside of requiring a central server. If you wanted to avoid that, you could use the Multipeer Connectivity framework that was introduced in iOS 7.
It will let you create one-to-one communication channels between devices on either the same WiFi network or Bluetooth. Once the channel is created, you can send whole NSData objects (or create streams but it doesn't seem relevant to your use case).
A good read : http://nshipster.com/multipeer-connectivity/
The WiTap sample from Apple demonstrates peer-to-peer networking over Wi-Fi and Bluetooth. Using Bonjour, the application both advertises itself on the local network and displays a list of other instances on the network. Supports infrastructure networks, peer-to-peer Bluetooth, and peer-to-peer Wi-Fi (on compatible hardware).
I have personally tested it and it works fine and well documented.
I think socket.io is the best choice. It is built on top of engine.io (which in turn is built on the fastest websocket implementation: ws) It has oldest to newest fallbacks, so it starts with long polling and works its way up. This guarantees a quick initial connection instead of needing to poll the device for features. You can read more on this here. Best of all, it handles everything seamlessly. You write your code as if websockets are supported on connecting devices and if not it will use other methods behind the scenes.
This post details many of the websocket libraries you could use with your server. Which websocket library to use with Node.js?
I am convinced Bonjour is the best solution:
Apps can also leverage Bonjour to automatically detect other instances
of the app (or other services) on the network.
However I've never used it myself; perhaps someone who has can comment?

How to make networked software aware of itself?

I have an Android and iOS app that I would like to be accessible through PC software. Currently, the mobile application will display an IP address and the PC user must manually type this number in to create a connection.
I know there is some sort of broadcasting standards, but I'm having trouble figuring out what method make sense in my case.
A solution that works for both Android (native activity, version >= 2.3.3) and iOS would be ideal.
Bonjour by Apple might be what you're looking for. It allows your application to broadcast your service over the local network so that the PC will automatically discover it. You can find more information here.

How to broadcast bluetooth service in ios using corebluetooth?

If I want to have my iOS device act as a "server" and broadcast its bluetooth services to other iOS devices, how would I use the core-bluetooth framework (or any other iOS framework) to implement this? So far, all I've seen from the corebluetooth framework is how to write the client-side of things. (Scanning, connecting to existing bluetooth services)
You can make use of the OSX sample project called DNSSDObjects. The core classes (three of them) work just fine under iOS. The code requires a few small changes to work with Bluetooth (as-is they only work with WiFi). See my answer to another question for the required code changes.
Basically you use whatever code you need to setup your server and begin accepting socket connections. You then use the DNSSDRegistration class to advertise your server via Bonjour.
The other two classes, DNSSDBrowser and DNSSDService can be used by iOS client code to find the server, or any app or program that can find Bonjour services will also be able to find your server.
There are two great WWDC video that show how to act as either the client or the server using an appropriate iOS device. They can be found here, you're looking for sessions 703 and 705.
Downloads of the source that they use can be found here. You'll need a developer account (free works) to login and view/download.

Resources