What is the best way to transfer an object between two iOS devices running the same app? - iphone

I'm trying to give my iOS app the ability to transfer an object to another iOS device running the same app. The object is on the order a few thousand KB of memory. Does anyone have a suggestion as to how to do this? I am considering using FTP, but that seems a little messy. Does anyone have any suggestions on possibly using GameKit? Or something else?

GameKit would probably be your best bet. This link seems to go over it pretty well

As an alternative, I've found the SimpleNetworkStream example that apple gives an exact match as to what I want to do. Simple Peer to Peer file transfer might be the best solution.... It seems that people are having a lot of trouble transferring large data objects with GameKit.

Related

Alternative for Multipeer-connectivity tvOS swift

I have been looking around trying to figure out how crossy road developers and beat sports developers have made their remote controller "add-on." First I thought Multipeer-connectivity, but after trying to test it on the Apple TV realized the framework was not support, why? Makes no sense to me, but anyways. So my question is, does anyone know what cross road developers did?
Thanks in advance.
If you only need to create a software-based game controller, you don't really need peer-to-peer. I've used NSNetService and made my framework available as open source: https://github.com/robreuss/VirtualGameController
Core Bluetooth would also work but will not give you the same performance as WiFi (NSNetService).

How to establish app to app communicaiton using socket on same device in iPhone without any server component?

I want my app to intercommunicate with my service,send and receive data to and from service
Check this:
How can I transfer files from one application to another in the same iOS device?
UIDocumentInteractionController class reference
Hope this might help to achieve your goal
There's plenty of references about that'll help you with what you're trying to achieve, I'd recommend doing a little research and attempting to get something basic working.
To get any help, you'll need to provide a bit more information - what protocol does your service operate on? what is the function of the app? what have you tried?
This place is an invaluable resource to programmers who ask for help, rather than an entire solution. :)
Good Luck!

Fetch from background

I am writing an iPhone app, and I have a remote server that will deliver content. I would like to have my app poll the server once per day to see if there is new content, even if it's not running or in the background. I would also like to do this without setting up an APNS. Any advice?
You can't do that, either when your 'not' running or if you are running in the background. The best you could do is to download once per day when your app is first run / pushed to the foreground.
You could use remote notifications to "prompt" the user to bring the app to the foreground so that it could download something?
With the current apple IOS guidelines, that is about the best you can do.
I read that you are trying to avoid using APNS, but I am wondering if you are trying to avoid it for the right reasons, especially when it is designed to efficiently solve the scenario you are describing. I've seen many developers seek alternative solutions to APNS simply because the technology appeared to be complex to use after looking at Apple's documentation. The online documentation does go into a lot of details, right down to the binary protocol level.
But just to be sure you know, there are open-source libraries whose only purpose is to shield you from all these technical details. Some libraries are more complex than others, but some are remarkably user-friendly. If you have not done so already, you might like to take a look at JavaPNS and other similar projects.

Pull the Wifi history from a iPhone 3GS

I'm using an iPhone 3GS, and for reasons relating to an art project I was wondering if I can pull a list of known wifi's, without specifically going to where the wifi is transmitting of course. Is there a safe way to do this? I assume this is on the SQLite db? Be interested what is know on the topic, or where to being researching anyway!
Check out SpyPhone. It exemplifies similar information which you can pull from an iPhone.
https://github.com/nst/spyphone/
You can easily just download it and run it on your device if you don't need to do it programmatically yourself. If you do, you can easily rip out the code.
Cheers!

reading a file saved by another app in iphone

Is there a way to have an app write a into a file and then have another app read from that file?
I mean writting into the file system of the iPhone.
I want to do this without using an internet connection. So uploading the file and then downloading from the other app is not what i mean.
Thanks!
It appears that there are ways you can, but it won't get approved by Apple if you do.
See http://blogs.oreilly.com/iphone/2008/09/sandbox-think-like-apple.html for more information.
The current sand boxing of applications does not allow this, however it appears that this may be available in future iPhone OS versions. Reference
I'm not sure exactly what circumstances you're in here, but you could register app B as a handler for a particular protocol, and have app A try to open such a link (e.g. appB://yourinfohere). It depends on how much data you want to transfer and many other things, but it might work.