iphone: a local server to test my app - iphone

the app that i'm developing, needs to interact with a server, to accomplish some operations: save user's data, retrieve data about other users, services and so on...
before paying to rent some space on a server, i'd like to test my app making it interact with a server located on my computer, simulating a real a LAMP server as a localhost.
did you ever tried to do the same? can you suggest me a LAMP server that i can use locally?
do you suggest any other solution in place of the one i'm seeking?
thanks for help

While the server is running make your requests to your own IP address. I'm fairly confident this will work while you are using the simulator, and likely it will also work from an app.
In terms of finding LAMP server software for the mac... you should check out MAMP which allows you to simulate a server on your mac.

Related

Electron app that opens a server or using sockets over the web

Im making an app that multiple players can connect to, but im brainstorming the best approach.
Im going to be using electron for the interface and then be able to use other computers to log in to website to join the game with multiple players.
I will use sockets to connect to each player, but what i am trying to figure out is whats the best approach for the interface.
Should i use express with electron to somehow connect to the same website the players are on?
Is it possible to make the electron app start up a server and have my website direct to the computer that is running the electron app?
Or my other option was to just continuously upload and download from a database, but I feel like that would not be very efficient.
You're on the right track. I would suggest using a WebSocket based server / client architecture.
The server application is continuously running and handles inter-player communication as well as providing a database. The database could be integrated in the server application as a starting point, and, depending on your needs concerning scalability, be extracted as a standalone service in the long run.
Client applications could then come in many forms (a website, a desktop application, a mobile app). Using electron is a great way to enable cross-platform desktop application development that is adaptable to any of these scenarios, possibly also enabling to extract the contained web application as either a hosted website or even mobile application (using, for example, react-native or nativescript).
Good luck!

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.

Keep StreamSocketListener running in background on Windows Phone 8

I want to run a server on Windows Phone 8. It is important that the server keeps running even if the user opens another app or the screen lock turns on. Relying on an internet connection is not an option. It should work in a local network.
UseCase: The server is needed for a multiplayer game. The idea is that one player starts a local server. After that, all players (including the player who starts the local server) can connect to this server using a webbrowser. The server delivers html and responds to ajax calls.
It seems that PeriodicTask and ResourceIntensiveTask do not fit my needs. Is that correct? How can I run an app in the background that is always listening for incoming tcp connections?
I don't know a clean way. But if you're happy with a hack: You could use the Geolocator. This blog gives a step by step guidance: How to create application which executes in the background on Windows Phone 8?
As most of the hacks, this brings some problems and questions (probably more than I mention here):
If the user turns off the GPS, your server won't be reachable anymore.
I don't know how strict Microsoft is with what you can publish on their store.
No way to do this on Windows Phone.

browsing of local server through iphone app

can anyone help me to make the iphone app which can browse the files of the computer which is available on local network?
In short, you'll have to create a server on the local machine that is accessed from the iphone. On the iphone side, you'll have to create the client that accesses this server. Use google to see if you can find some examples of directory servers and see if you can adapt them to your needs.
This is a huge topic, one which cannot be answered here in 100 (or probably even 1000) words.
Edit
Think something like openLDAP

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.