How can I test an iOS App I am creating and simulate a Chinese user? - iphone

I am developing an app that will be used world-wide and have a co-worker who lives in China. He claims it takes a very long time to reach our server here in the US and I want to be able to use the app on my phone but through a VPN and proxy on my iPhone so it appears that I am in China. Is that possible?

Here you can find a list of Chinese web proxies.
You should also change your app so that it goes to through the proxy. This depends on how you are dealing with HTTP communication but if you google it, you will find many posts.
Keep in mind that a proxy will add a further delay in communication.
If you want to setup a VPN, have a look at this tutorial for setting up a VPN on your Mac and then connect the iPhone to it.

Related

Is it possible to build a VPN without an actual server?

After searching online most places have stated that it is required to have a server to build a VPN, but I was wondering if it is possible to do it and have mobile devices connect to a dummy server? Without actually having something constantly running on a server.
I am currently developing an app that will make users connect to a VPN that blocks access to all sites.
Define "server". If you are worried about cost of hardware/power, bear in mind that a server is just a computer that hosts applications or data for clients to access and interact with. I currently have a Dell latitude e6400 running as an owncloud server in my basement. If you need something for testing you could simply utilize whatever old hardware you have laying around to set up the server side for your app to connect to, and turn it on whenever you are testing the app.

Bonjour - one server multiple clients - ios iPhone

Im developing an app where one iOS device act as "server", and other devices are acting like clients.
Im getting hard time with understanding if I can make this using Bonjour
If I make an example:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
All devices have same app installed. All users are connected to the same WIFI.
User must login into app, and when it does, chat rooms are populated from CMS (web server) from internet.
All of them see e.g. all "chat rooms". But at the beginning chat rooms are all read only. Anyone can browse these, but nobody can write into them.
When administrator (user with admin privileges) opens one of the chat rooms; all clients are now able to write into "open" chat rooms.
Of course when one user writes something down, the other users see the newest comment from him.
Administrator should see all clients in chat room but clients cannot see each other.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
All samples which I have found (WiTap, videos from WWDC,...) are using two devices only. I've installed WiTap on 4 devices. And I can establish connection and working "sample" game with two devices.
Can Bonjour service be used in such way that multiple cients are connected to one "server"?
Any hints are very welcome!
Yes, Bonjour can be used like that: for example Apache on Mac OS X has mod_bonjour so that web browsers can find a web server on the local network. That can mean having one server but multiple browsers: exactly the situation you describe.
One limitation is that the way Bonjour is configured in iOS means that the server and clients need to be on the same local network. It doesn't sound like the situation you describe is compatible with using Bonjour in that way, but then I also don't think you need to. You can use the DNS name of your chat server in the app, so any app can discover the server. The server can also be responsible for discovering which clients are connected and allowing people to find each other (indeed, I guess that's what the chat rooms are for).
This is a good place to start. http://mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/ I have build the same Server and client with the help of chatty. But you will face one problem in iOS5 only, when the iphone will go to sleep mode, the socket connection lost. I am not able to solve this problem. So, looking for help. :)

Prevent from specific app using internet connection

I have a client claims that my app can't connect to internet despite of he has WiFi connection and Safari application, for example, works fine. Is there any way to setup for specific app NOT to connect to the internet? I use in my app simple ASIHTTTPRequest library to make a connections. Maybe it influenced by jailbroken device? Regards!
No, there is no way to do this in via an iOS setting.
However I've had a problem like this with a client, where to Webservice the app connecting to was blocked by there firewall/proxy.
Later the black was lifted but all calls to the webservice where is cached by the proxy give really weird results.

iphone app communication without using webservices

I want to send some Text plus a image from one iphone application to other iphone app but restriction is I should not use a web server in between communication,Is there any way to fulfill it ?
Details: There are two independent devices and could be far enough say out of network. My requirement one app adds some text with a image and sends it to another iphone which can be at any long distance , and the app installed in another iphone will read that info and image into itself.
Actually there is a solution that meets your needs — and that fits to bbums answer:
Create a HTTP-Server on the iPhone, using cocoahttpserver. than you will ask some webservice like whatismyip.com for your public ip. with this your iPhone can be connected worldwide.
But very likely ur wifi-network is not forwarding your port to the iPhone. Ash.
And even if: Now it gets difficult. How to publish your ip from one phone to the other? hmmm... — I got it: I will exchange the information in a centralized space! In the web!
... wait — that would be a Webserver.
You see: Without any kind of server in the Web the users would need to exchange ip manually and have full admin power and knowledge about the local network.
So IMHO bbums answer is the only way to go.
PS: I am working with http server running on iPhones. In local network that works great, especially with bonjour. And you can use them over distance network — but only with reconfiguration of your router — something you shouldn't force your user to do
There is far from enough information to provide a specific answer.
two apps on two different devices?
are the two devices on the same network?
are the two devices both on WiFi?
do you need the user to receive a notification or something if the app isn't running?
If on same device, you can define a custom URL handler in the destination app and then openURL: in the source app to pass the data over. Encode your image and text into the URL, but be careful of size limitations.
If on different devices, there are many possible solutions, but answering the above questions will be critical to actually knowing what solution is appropriate.
Given your comment -- two apps, different devices, arbitrary networks -- then you are going to have to have some kind of server in between. Note that the recently added Game Center does have the ability to rendezvous two users, but it has a very particular user experience that may not be appropriate to your needs.
I would suggest that you investigate using push notifications to notify the receiving user of the availability of content. As for moving the content between, no direct connection is possible and you will have to have some kind of store-and-forward server in between. And, yes, a web server is going to be the easiest possible solution simply because HTTP is ubiquitous these days.
If there's no network of any kind available, but both parties have amateur radio licenses, then hooking the two devices up to HF packet radios might work.
THIS is super EASY.
I would code up some software that can turn data into modem signal, like the good old dial up modem. The device would actually make those annoying buzzing sounds.
You get the phone number for your friends nearest landline and call him.
He places his iPhone near the phones receiver in listen mode and you connect to his phone using your audible modem.
Bingo, via the power of sounds you have sent data which is decoded on his device and all for the very cheap price of a phone call, there are pretty cheap these days especially if you use Skype.
Easy Way (relatively speaking)
A way two apps on different networks can communicate without setting up a web server of some sort is as follows.
Use an existing third party storage system like DropBox.
Each app would need the login and password for your DropBox. Then both apps can read and write files that the other app can see.
An existing app that does this is a shopping list app called ShopShop.
The app on my phone and my wife's phone both link to the same DropBox account and the app keeps the shopping list synced up when one of us adds something to the list.

How do I write a desktop application that syncs with the iPhone?

For example, how would I write a program like senuti? Are there any libraries I can use for this? It would be ideal if I could do this in Python or .Net, but I'm open to other things as well.
There are three things you can do:
Add some code to your iPhone application which acts as some kind of server (http, SMB, etc). Then your mac/windows full client application can connect to this server over wifi. This is safe and reliable, but unfortunately the app will have to be running on the iPhone at the time of sync.
Sync to the "cloud". EG: Have your iPhone app save some data to a web server on the internet (you could use amazon EC2, windows Azure, or even just a PHP script running on a cheap hosting account), and then have your windows/mac client also connect to this web server to retrieve the data. This is the most user-friendly, but it requires you to pay for the hosting of the web server, and will be unsuitable for large amounts of data
Violate the EULA and try to reverse engineer the way iTunes communicates with the iPhone.
This is how senuti works, but I wouldn't recommend it, as they're constantly having to play catchup with apple changing the format underneath them, and they are probably exposed to some kind of legal action, if apple ever bothered to sue them.
i believe Version 3.0 will resolve this as it allows you to program apps to the USB interface. check out some of the documentation for that in the External Accessory framework.
it would still require the app to be open, so essentially would mean two syncs (or more if you have multiple apps)
There is no legal / official way of doing this. Creating a program that would sync with an iPhone would violate the EULA you agree to when using the iPhone and iTunes.
Not only is it illegal, but it's also impossible to do this reliably. Apple could break the method at any time without any notice, and it would pretty much be a cat-and-mouse game.
I only know of one application that something of the kind, and it is the iToner application which synchronizes ringtones.