Is there any open source web server on iphone? - iphone

I want to make an app. It can launch a web server on iphone to transfer files through wifi.
Is there any open source web server framework available? BTW, I don't want jailbreak my iphone.

You can try mongoose, we used it last time.

Related

iphone as mobile web server

Am writing an application for iphone to run as mobile web server by assigning one IP address to it.How can we deploy mobile web server in iphone without using servers man application?
You can use a framework like Robbie Hanson's CocoaHTTPServer to respond to web requests in an iPhone app. However I think you are trying to ask whether it's possible to to run a web server in the background, without having an app running.
The answer is that it's not possible, unless you have a jailbroken device.

Phonegap: Can iPhone web app access/check for wifi connections

I have tried looking for some answers but could not get anything concrete from the other questions in here.
I am looking for an answer to these two questions:
Using PhoneGap, if I create an iPhone web app, can I use it as
plain web app (i.e. without using iTunes to deploy it)? Just via a
web url?
Using PhoneGap, can an iPhone web app check for wifi
connectivity? i.e. If wifi/3g is available, if wifi is available,
can it scan for ssids.
Thanks for any help in advance.
You can create host the web app on your own server (or local). Then it is accessible via web url. If you want to use it as a normal app (there are differences - phonegap uses few native plugins for better experience), then you must have a developer license from apple and then deploy it to your device. Otherwise you can only use the simulator. You can also use Safari + USB to debug your app using the browser.
It is possible but limited. Only certain functionalities are available. Check out the following plugin for cordova (phonegap):
cordova-plugin-wifi
Good luck!

Client-server web app with both client AND server running on iPhone - is this possible?

I'd like to build a simple native iPhone app with tools traditionally used for web apps.
I would prefer to use something like jQTouch and Rails, but I want it to work offline (not require an internet connection or a server).
Is there a framework that enables simple creation of native iOS aps by encapsulating a lightweight web server and a server-side app framework (Rails or something simpler and more lightweight that can run on a phone), thus allowing you to write the client side code in HTML+JavaScript ?
If there is not such a thing, is there a way to create an app (with HTML+JS) that basically only has a client-side component with persistent data storage?
Thanks.
Have you tried Phonegap?
www.phonegap.com
You write your app in HTML/CSS/JavaScript.
You access the phones APIs through JavaScript - boom!
Also; Appcelerator Titanium would be an option: http://www.appcelerator.com/
-IMO Titanium is more powerful, and offers a more native look.
Why would you want to run a webserver off of the iPhone?
Is it so that you could send back data to the mothership?
Yes, you can included a lightweight http server running in another thread inside your iPhone app, and have your UIWebView connect to it. But unless you are going to do a fancier web server that generates dynamic content, it might be easy to just download your HTML/CSS/Javascript content to a local directory, and then point any URLs to those local files when offline.

Is PhoneGap on iPhone pointed to local proxy possible and allowed?

We are looking on building a project that would run on Android, iPhone and other platforms with Phonegap. The app would be fairly simply, making use of the camera and basic UI features. The first versions would simply point to a web service and load information from there.
Over time, however, we want to improve the speed by:
1.) Downloading content via a separate thread when the app is running and storing the results in a local database,
2.) Hosting a mini webserver in the app*, and
3.) Pointing the PhoneGap UI to the app's mini webserver instead of the service's external webserver.
Two questions:
1.) Is it technically possible to host a mini webserver in iPhone that the app will access?
2.) Would this functionality be rejected by Apple?
Thanks in advance.
*I realize this step probably isn't really necessary. But, if it enables to truly build a "write-once-run-anywhere" UI, it might make sense still.
You're much more likely to want to have the HTML for presentation generated on your actual server, downloaded and stored by your separate thread as an .html file on the iPhone filesystem and served through local URLs using PhoneGap. Essentially, an advanced cache.
This way no web-server is necessary and you only need to write the UI generation code once on the server.

iPhone: How to Share/Move Files from App Directories to Other Devices

I have an app which generates some files in the app directories
I need users to be able to access the files from another device/computer via file sharing over wifi, using a web browser, a ftp client or some similar method.
Can the iPhone act as a http server and ftp server by itself or do I need to do some programing to make the http server and ftp server by myself?
Thanks
interdev
The code examples for Erica Sadun's rather excellent 3.0 edition of the iPhone Developer's Cookbook are downloadable at github. She has two chapters on various modes of networking including an example HTTP server.
The iPhone has no built-in web or ftp server. So if you want this functionality to be part of your application then you will have to include one in your code.
CocoaHTTPServer is an excellent library for this purpose, widely used also in iPhone apps. It has a good documentation and working example projects, even for iPhone.