Where can I find out about coding a website to my app? - iphone

I just found out that an iPhone can act as a web server to access the app's data. I'm using Xcode. How do I extend my app's capabilities so that users can edit app data using a Mac. Where can I learn about this? Can you give me summary and a website please?
I hope it's using Apache Tomcat. I suppose I have to build a website to process and display the app's data. I wonder if iPhone supports jsp since it's using UNIX. I really don't want to use PHP.
Currently Money Manager has that feature.

Searching for embedded iOS web server returns a few solutions:
Run a webserver on an iOS device
A small, lightweight, embeddable HTTP server for Mac OS X or iOS applications
Lightweight GCD based HTTP server for OS X & iOS
You will be unlikely to fit php or tomcat onto an iOS device; the lack of memory and processing power will be technically challenging.
Apple will also likely take a negative view of the inclusion of a general purpose scripting language in any app your submit to the App Store.

Related

PhoneGap Cordova Browser based and app

Let say were starting a website from the ground up and want to also create apps.
Could you just create the website with a REST API's and have it work on browser and PhoneGap? Would there be a conflict with Cordova plugins you may use?
So the design is responsive and its all HTML, CSS and Javascript and connects to a REST API (log in, reg, messages, db calls, etc) for the browser website and apps.
This way you can use the same code for everything and can still use some of the great Cordova plugins for the app to make it more flexible.
Would this work?
I posted this answer else where but I think it is relevant here.
Unfortunately for your app to pass Apple App store approval it will have to provide some basic functions and display correctly without an internet connection. This means at a minimum, if you plan to generate content on a server you will probably need the Cordova plugin for network information:
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-network-information/
I would make sure you are familiar with the Apple Human Interface Guidelines:
https://developer.apple.com/ios/human-interface-guidelines/overview/design-principles/
You will probably also need to bundle any JavaScript. Apple is very picky about apps that download code (this can include JavaScript).
This is a section from the iOS developer Agreement.
3.3.2 Except as set forth in the next paragraph, an Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exceptions to the foregoing are scripts and code downloaded and run by Apple's built-in WebKit framework or JavascriptCore, provided that such scripts and code do not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store.
Another big concern is performance. How will your app handle a poor 3G or even 2G connection? Do you need to cache the responses from the API and only download them if they have changed on the server?
If a user is browsing your website on a browser they know they need an internet connection, if they are using your app they want it to work when online and offline.
Edit
Apple commonly uses this reason for rejection for website only apps.
We found that the experience your app provides is not sufficiently different from a web browsing experience, as it would be by incorporating native iOS functionality.
While your app content may differ from your web site or other existing sites, the experience it provides does not differ significantly from the general experience of using Safari, as required by the App Store Review Guidelines.

Phonegap for iphone development on Windows questino re native api

I've spent the day googling all the leads on developing iphone apps on Windows and apart from buying a mac the most suitable route seems to be Phonegap. I cannot find out whether Phonegap gives access to all the native functionality. For example I want to access and manipulate the address book contents. I also want to be able to send text messages programatically and intercept and examine incoming text messages. It would be helpful if someone could confirm whether this can be done with Phonegap.
My understanding is that Phonegap is based on webapps but I am assuming that an app developed with it can run offline for operations that dont require internet access.
Even using Phonegap you will still need access to a mac to actually build your iOS application. This is a restriction that Apple has in place, and to my knowledge there is no way around it.
Phonegap uses a UIWebView to display your application built using HTML, CSS, Javascript etc, but this does not mean that an Internet connection is required for the app to run (so offline apps are definitely possible).
With regards to Phonegap's functionality, details of the Phonegap API can be found on their website. Specific to your needs, I believe phonegap provides access to the device's address book through the contacts API:
http://docs.phonegap.com/en/2.3.0/cordova_contacts_contacts.md.html#Contacts
I don't think Phonegap provides the ability to send SMS messages itself, but many people have developed extensions to add extra functionality to their applications through plugins. The majority of Phonegap iOS plugins can found at the following GitHub repo. The plugin I think you require is the SMSComposer:
https://github.com/phonegap/phonegap-plugins/tree/master/iOS/SMSComposer

iOS: Enterprise Server architecture

For iPhone and iPad i.e iOS development
Is there a specific server platform required to setup for
development and deployment enterprise apps?
Is there a specific architecture for this purpose? If so which one
since we are will be calling windows web service.
Is an application development server required or can we use an
ordinary pc?
Thanks in advance
Your server doesn't need anything special to distribute apps, we have it working fine on an ordinary Linux box. All you need is:
a URL to an XML file that describes the app
a URL to a png image for your app icon (for use while the app is being downloaded)
a URL to a .ipa file containing the actual app.
some kind of authentication to ensure these URLs aren't publicly available (this could just be a VERY long random string inside the URL, perhaps one that changes regularly).
All of that can be done on any ordinary HTTP web server, without even any dynamic pages.
Some other enterprise features, such as push notifications, will require a programming language that can do some fairly low level network stuff. We've got that working fine with PHP, I'm not sure what would be the best language to work with on Windows.
I'm not sure if this is what you're asking, but you will need a Mac OS X based workstation for writing and compiling the app(s) you're working on. This cannot be done on windows.
1) No
2) It's up to you. For instance you could feed XML or JSON equally on your windows web service. The way you call your server from the client on the app is your decision. Typically driven by a URL.
3) No, an application development server is not required. You can use an ordinary PC if you wanted. I've done this multiple times for testing sure. But for a large audience of course I would recommend something large like a linux server and not a "home PC".

Iphone App vs. Offline Web App. Which way is the smartest?

I think about starting from scratch building a small application fullfilling two technical requirements:
should be usable on iPhone
should work offline
There are two obvious alternatives here to choose between
A real iPhone application with offline capabilities
A web app using HTML5 offline, Google Gears or similar
Having no iPhone app development experience (I don't own an iPhone), i wonder which way would be the easiest to go?
What are the learning curves for building offline HTML vs building an iPhone app?
Honestly, it depends what your app is going to do.
MobileSafari supports all the HTML5 offline stuff, so you could store data in a clientside SQL database, cache the application clientside, etc... The mobile Gmail app is probably the most notable example of that, giving you full-featured access to your Gmail even when offline. You can also use geolocation through JavaScript APIs that were added in 3.0. Web Clips let your web app share the home screen with native applications too. There is more on using web apps on the iPhone on this Stack Overflow post.
Obviously, doing a Web app will be of interest to people who like dealing with HTML, CSS, and JavaScript (and possibly whatever language is running server-side). It is possible to do really neat stuff with offline Web apps, but its performance won't be as good as that of native apps, especially on pre-3GS devices.
Developing a native application will require you to learn Objective-C (or C# as soon as Mono Touch is available to the masses) and pay a $99 fee to be allowed to test on-device and deploy to App Store. A lot more of the system is exposed to you through the various APIs, such as the camera, compass, multitouch, and so on.
Objective-C is pretty simple to pick up if you're familiar with Java; you only really need to get used to the square bracket syntax and memory management and then it's pretty straight-forward.
Then there are the hybrid systems, like PhoneGap, which expose more of the device's APIs, provided the Web app runs in a special container app. It is also crossplatform, so you could also deploy the app on Android and BlackBerry if you wanted to. This still requires you to pay the App Store fee, but if you're more familiar with Web development, this gives you the best of both worlds.
I can't tell you too much about HTML apps in general, but I can tell you that the API for the UIWebView is extremely minimal, and of course there is much less you can do than in a native iPhone application.
An HTML5 offline app would have security issues as you would have to hard code your oauth secret into code that anyone could see ( by clicking view source, or inspecting in Firebug ). You could simply use http auth, but then you get the ugly "from API" credit with every tweet sent from your app, and also that ugly http auth popup from the browser.

Requirements for web development for iPhone Mac/Windows?

I am planning to make an iPhone web application and I just wanted to know what is required for web development?
Can I do the web development on a windows machine? Does Apple provide any iPhone plugin so that we can develop web application using Windows?
What is required for developing on a Mac?
Regards,
Amit
If you are making a web application, you can download Safari for Windows and view it there.
You can also use Joe Hewitt's iUI framework to make your app look and feel all iPhone-y.
? If you are gonna build a web application, the application runs on the browser. To use your application the user use Safari (on the iPhone). Apple doesn't control web applications.
If you mean, embed your web application, INSIDE a native iPhone application, you need a Mac to build the wrapper, for the core application you can use whatever system you want.
May I suggest to take a look at phonegap (if you are looking to iPhone app).
Check out these three apple sites:
http://developer.apple.com/safari/library/codinghowtos/Mobile/GraphicsMediaAndVisualEffects/index.html
http://developer.apple.com/safari/
http://developer.apple.com/safari/library/navigation/CodingHow-Tos.html
I would check out these pages thoroughly, and also at a minimum, I'd download safari for mac or windows.
Yes, you can develop it on windows. They are just web apps.
For mac or windows, latest safari and a public website is probably all you need. Check out google app engine for a good free development site that supports a database/datastore. www.appspot.com
Also, you can look at the webapps on a regular computer. http://www.apple.com/webapps/travel/staycation.html
http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=25536&cat=94&platform=osx&method=sa/
http://www.apple.com/webapps/games/
I presume you are talking about creating a web application designed to be used from an iphone.
The iphone uses safari as its browser. You can download this for use on windows and it should give you an accurate representation of how your app will look when rendered on an iphone. However in order to test how well your app performs on the phone, and if it really is usable using the touch screen the I think the only way to be really sure is to test using the iPhone.
You can use safari for windows to test the rendering but for your final tests you need to use a real iphone in order to understand how your users will experience it.