What are the pitfalls when implementing a web page like app? - iphone

I'm planning to implement some app that performs similar functions as some website does. An app should be able to post, get and view some data. Most viewing data is available only after login. Payments. The webservices are .NET asmx XML services.
So, I'm planning to use UIKit, drag and drop some text fiels. For posting the data, I will do some manual input validation, assemble input into a string, post it to the server. Also, some parsing will be done after getting info form a webserver. Now, I haven't done any website app before, so I'm just curious what are the potencial problems that I might run into.

I guess you are asking about potential technical issues. The ones I faced recently working on an app of this type and workarounds are:
Maintaining your session with the server if you are combining native UI screens together with UIWebView's of your website.
XML Parsing can be hairy at times, so JSON is the best option depending on your preference. The other solution is to output XML in the PLIST format which is easier to code against. On the server side PHP has some PLIST generating libraries. Am not aware of what is available on .NET.
On the iOS side the ASIHTTP library helps make it easier to post to websites, particularly when you are using binaries etc.
Depending on your use case you may also consider a pure web based UI version which resides inside a UI webview. If you are planning on going this route JQueryMobile is a pretty good solution for rendering iOS like UIs. This saves you quite a lot of effort on the communicating with the webservice and parsing etc.
Thats all I can think of for now.

Biggest problem might be getting it approved by Apple if they think it should be just a website and not an app. They might cite: "Limited Functionality". see : https://developer.apple.com/appstore/resources/approval/guidelines.html
I can also reccomend www.sudzc.com

Your UI will certainly not be as responsive as a native app.
Your users won't be able to use your app without an Internet connection/flaky connection
You'll have to rebuild all native controllers yourself if you wan't your app to look like a native iPhone app.
You'll have to rely on libraries like PhoneGap to use most of the hardware/non HTML supported functions (like geolocation, camera, etc.)
Etc.

Related

Database driven ios app - first steps

I'm about to start work on my first app which will be an internal release to gather customer information at a trade show.
I'm hopefully looking into using air for ios or maybe one of the various html/js frameworks to develop this app as an alternative to learning C.
ideally I would do it with some server based php > sql to store and share gathered information between a fleet of iPads, unfortunately due to the population of this trade show there will be no guarantee that i can maintain a wireless connection so need to prepare for these apps all being local access only.
in which case, how would you recommend going about the saving/reading of the stored data, and also how to sync it up with a sql server and then back to the iPads each night.
Did you try PhoneGap? It is an HTML5 app platform that allows you to author native applications with web technologies, in other words it will let you make an iphone app without having to learn C.
People have written tutorials and plugins for storing data locally.
PhoneGap basically wraps a web app hence you can use AJAX for sync with server as and when needed. This article might help.
We explored PhoneGap and found it very useful. and easy too. hope this helps you.

Website Forms to iphone app

I've been researching for ages and still cannot find an easy solution that perfectly. So i stopped and figured i was going about this project the wrong way. All i need is an easy solution.
My project requires me to make a website that has forms (fields include images, text, urls, colors). When the user submits this form, somehow (THIS IS THE KEY QUESTION), gets sent to Xcode so that it can be used in and iPhone app.
My questions: What is an easy to use program to make a website that can do what i said? How does my website connect to Xcode (supply it with the data)? Is it possible for my app to check for newly submitted info?
Keep in mind that i don't have much coding knowledge as far as websites and i only a little about making iPhone apps (Yes, i have made some but not as advanced as this)
Thank you in advance!
It sounds like you want to build an IOS app that can retrieve user submitted data from the server.
Your form will have to post the data to the server where it is stored in your database. Images will have to be uploaded to the server as well.
You can then build a server-side api that returns data to the IOS device upon request. You can have your IOS app regularly request data from the server, receive the response and store what you need on the device.
There is a lot more to it of course, but from what I can gather from your post, this is what you're looking to do.
The workflow you describe doesn't make any sense.
It starts out easily enough: you have a website that has a form with a submit button. No problem there. Hitting submit likely does a POST to a server somewhere. Again, no problem.
Then you say the form data has to ultimately end up in Xcode. This is where things are really muddled. Xcode is a programming IDE for Mac OS X. I'm not sure how or what it has to do with handling data from a Web form. The two things are, for all intents and purposes, completely independent technologies.
Please describe in much more detail exactly why you think you need to "send data to Xcode". Otherwise, your question, as written, is unanswerable.

Native app for iPhone!

I want to develop a native universal app(i.e for iPhone and iPad) for my orgaization.I want to include some of the essential features of the organiztion website into my native app.For obvious reasons i cant store this huge data into iPhone itself.so data will be fetched from the server but application would be a native app.so are there any APIs available to do this?
I always find it's easier to start using sample code, and lucky for you Apple provides a lot of this. Here is the reference library for all kinds of goodies to learn off of and hack your way through: http://developer.apple.com/iphone/library/navigation/index.html#section=Resource%20Types&topic=Sample%20Code
A few noted ones... (I left out some advanced ones like BonjourWeb Reachability and AdvancedURLConnections but look at those once you gain a little more understanding)
URL Cache: http://developer.apple.com/iphone/library/samplecode/URLCache/Introduction/Intro.html
RSS Feed Parser: http://developer.apple.com/iphone/library/samplecode/SeismicXML/Introduction/Intro.html
MailComposer: http://developer.apple.com/iphone/library/samplecode/MailComposer/Introduction/Intro.html
Also, a couple books you should get to start your journey on iOS (these are two of the best and easy to understand IMO):
http://apress.com/book/view/9781430224594
http://apress.com/book/view/9781430225058
UIWebView will show any web page you point it to.
Maybe do a mixed approach with some stuff built right into the app, and the bigger or frequently changing parts load from the web.
You can use the UIWebView to access your organization's website from inside a native application...
While I agree that you may need to do your research first, the IPhone/Ipad SDK includes a very easy to use XML parser (NSXMLParser). I would suggest you devise a XML web service for retrieving the data from your company's servers and parse it on the ipad/iphone to the presentation you require.
Best of luck, i've found objective-c very rewarding/challenging.

Application of 3rd party API to my iPhone App, specifically SOAP

Firstly i'm not a programmer but I am managing to work my way through developing my own iphone app for my photography business. I store all of my photographs with a 3rd party who make their API available for public use. I want to implement this API into my app.
I've spoken with the 3rd party and they have written all of the code on a windows based system and although they say its not tied to a windows platform i'm struggling to see or recognise any Objective-C commands within the API and so don't know where to start. They've also told me that its a SOAP based web service.
I'm wondering if anyone can tell me if I should be using the NSURLConnection method? My main desire would be to generate a UITable view of the photo categories I hold with the 3rd party as is the case with their own iphone app, which i should probably say is for members only so wouldn't suit my needs here.
I would really appreciate some assistance with this as i'd hate to have to result to paying a developer to build the app after falling at the last hurdle.
Many thanks
Steve
At a very basic level, SOAP APIs are just a standard HTTP requests against specific webserver that return XML responses. That third party may have a Windows-specific client-side library to speed up the development for some clients, but since you are developing iPhone app, you can't use that library.
You have two options:
- use NSURLConnection and NSXMLParser and directly talk to their webservers and parse the response yourself;
- look for an iPhone SOAP library you can reuse. Since SOAP is an industry standard, there's nothing that prevents anyone from building iPhone-specific libraries. However, I personally am not aware of particular ones.
Hope that helps. It's not the best answer, but at least it might give you an idea what to look for around.
Update: Quick search for "iPhone SOAP library" revealed the wsdl2objc project, though that one is rather old (not updated since 2009). There are other alternatives, listed in the How to access SOAP services from iPhone SO question.
Apple also has a Web Services Core Framework, but there's not much documentation on using it with iPhone.
Look at a sample app code which has soap specific files here:
http://mtgr8-a3.svn.sourceforge.net/viewvc/mtgr8-a3/trunk/nvObjects/soap-specific/
In your posting you have mentioned that the 3rd party provided public APIs. If so, can you provide the wsdl? I can covert it to ObjC with SOAP support for you. I am not using wsdl2objC, but something lot better. If it is public API, you don't have to pay me.

iPhone Frameworks

What is a strong iPhone framework to start out developing with, besides the SDK from Apple? Are there any that exist to speed up development time?
The biggest framework of this kind is Three20. Facebook and many other companies use this. Three20 is geared towards apps that pull data from the web. It helps with common patterns like a photo viewer or table view backed by web data. Another neat feature is that it has stylesheets, similar in concept to CSS.
Having said all that, some people like it and some do not. There was a brief period where apps using it were rejected from the App Store. Overall, the project looks to have improved since then.
ASIHTTPRequest
Excerpt
It is suitable performing basic HTTP
requests and interacting with
REST-based services (GET / POST / PUT
/ DELETE). The included
ASIFormDataRequest subclass makes it
easy to submit POST data and files
using multipart/form-data.
Also,
skpsmtpmessage
Excerpt
This code implements a quick class for
sending one off messages via SMTP on
the iPhone
EDIT:
A quick google search gave me this link
There is Mono Touch which enables you to develop using C#.