First, Thanks for your help - I greatly appreciate it. The core solution I am trying to figure out is how to display content from a CMS inside of an iOS application. The application I am planning is a company intranet / portal used to display news, alerts, and other content to sales associates at our firm. One approach a friend suggested as build the content in HTML and display in a web view, This does not sound like the best solution too me. How do apps like Facebook, Flipboard, etc display server side content inside the applications.
The application / employee portal will consist of news stories, alerts, documents etc in text form accompanied by images, video, audio. The sales associates will use the application to navigate through the content stories, read, review, etc with all of the nice features of ios, the sliding and flipping of pages and content, etc.
The content and user roles would be managed by a CMS (Joomla, SharePoint, Storage Room, If you know of something better please let me know). The app content would also need to be accessible when offline, what is the best approach for this solution? Is there any existing code bases / libraries that I could leverage for this?
I am having trouble understanding the best process for 1) rendering / displaying the CMS content inside the the App (HTML webview or Another approach?) and 2) How do pull the content, images, video, audio down to the device for offline viewing?
Any ideas you might have will help. If you think there is a starting point set of code, or an example model we might be able to use as a starting point, please let me know.
Thanks You! I greatly appreciate any input.
This is all possible for ios app. you have to made web service for your apps. At the starting when an app is start the data are store in local database like used sqlite or core data in your app. so after that if there is no internet you can stil access your data.
A framework/product like TapLynx or Appcelerator might be a good fit for you. Look at the product demos and showcased apps to see whether they support the kind of thing you want to do.
HTML webviews are a good mechanism for displaying rich content on the device. As to whether you'll display HTML which exists in the CMS, or pull down data and format the HTML on the device, it's really up to you.
I'd go about it creating an API on the server. You can download the data as raw XML or json and parse that content into workable objects. As for how to download pictures and other data, just include the URL string for the picture in the XML / json download.
See the iOS downloading programming guide for details on how to do download data from a server.
Also, as hiren said, you can save the downloaded data using core data.
Related
I have created a few small apps for the iPhone so I have some experience. An organization that I'm in asked me if I could program a weekly newsletter app for them. I though it would be a good challenge so I agreed. My question is: how do I get the app to update weekly without the users having to re-download or manually update? Do I connect to a database or a website? Can anyone send me the link to a good tutorial? I wasn't able to find one.
Thank you!
Your question is very general but I could give you some suggestions.
First, you need to connect to a service that provides you news info. This is needed. The service could send you an xml that you can parse and display, for example in a UITableView. XML is not the only solution. You could use also JSON.
For parsing XML I suggest you to read GDataXML, while for JSON JSONKit framework. But there are also other valid framework out there.
Then, to save data it depends on what kind of data you deal with. Here you could find different ways to save your news. Save an XML that contains your news, serialize data and save them in the local filesystem or use Core-Data.
To update your news without user actions, you have to save the last time when the app has downloaded news (for example in NSUserDefaults) and each time time the application is "activated" check for that date and update news if necessary.
Out there there are plenty of tutorials on how to (in parenthesis I inserted classes or framework that you could have a look):
consuming web service on iPhone (ASIHttpRequest - no more supported, NSURLConnection class, AFNetworking)
dealing with XML file/data and theirs parsing (GDataXML, touchXML, etc.)
dealing with JSON messages (JSONKit, etc.)
managing documents (NSFileManager class)
using Core-Data
using Property-List and/or NSUserDefaults
First three cover the first step (download). Other three cover the second one (save). Obviously you have not to use all of them. For example a configuration could be:
NSURLConnection for service, GDataXML for parsing XML data and Property-List for save data.
Hope it helps.
A simpler approach would be to make it a pure web app and update the website weekly.
Your content providers are going to have to do those updates anyway.
Check: Adding Newsstand Support to Your App or Tutorial: How To Make Your App Work With The Newsstand
I have created an iphone app which basically pulls json feeds into my iphone..I have created the JSON file manually and put the jSON file in My FTP Server..as far as updation are concered the client gives me the updation via email or skype which i then update my JSON file that is in the server.what i want to develop is a Backened CMS so that the client is able to handle the maintanenece.i m a noob as far CMS is concerned,which is the best place to start..is wordpress a better..Any advice on how this can be achived would be helpful
Appnx has a pretty neat backend.
iPhone-CMS uses TYPO3 as the backend and can generate native apps.
Please take a look at our JSON-based StorageRoom CMS. We built many mobile apps ourselves and always had the content problem, so one day we created our own CMS.
Can any one please guide me on this . I am new to iphone/ipad programming.I store videos on my webserver (apache/php).I need to write code for an ipad app to get the videos list for a selected user and play those videos on the ipad/iphone using a php webservice.I was not able to get going on this.Please can anybody share any related links or shower your thoughts on this ? Any help would be highly appreciated.
Thanks
your question actually involves a lot to implement, but I'm not sure where you're right now:
Sever-side programming to expose web-service which can be invoked to
get a list of available videos. Have you done this? And what format
your server-side responses, SOAP XML or JSON?
From your iOS client side, you firstly need to establish an HTTP
request to the web-service URL entry. Have you done that? You may
want to use ASIHTTPRequest to save your effort.
Once you've got server response, depending on how the data is
presented, you may need to find a XML parser or a JSON parser to
parse the raw response.
Then you need to either download the video entirely before playback,
or stream the playback. You may again need ASIHTTPRequest for
downloading. You may need MPMoviePlayerViewController or
MPMoviePlayerController(if you want more control over the player layout) to plackback/stream the video, see:
MPMoviePlayerController and HTTP Live Streaming
And don't forget to save the playlist and user viewing history if
you want to provide a smooth user experience. You may use as simple
as NSUserDefaults/plist as the data persistence media, or as complex
as SQLite database or Core Data.
I suggest you to break down your ultimate goal into specific tasks, and tackle them one by one.
Program your web server to return a JSON object with the list of
movies. You can include preview thumbnails etc.
Include one of the JSON frameworks available (just do a quick
search, there are plenty).
Use the data from the JSON feed to display your list.
When the user clicks on an item, launch a view controller with a
UIWebView to display your movies.
If you do not know how to do any of these things, you should consider an objective-C programming tutorial first.
I am looking to build software that has an Iphone application as well as a Wordpress based website. Essentially the user will enter data into the iphone app that will then be relayed to the Wordpress site and displayed in various manners.
Whats the best way to get the iphone database and CMS database to communicate?
Thanks
This might go without saying, but generally speaking I would try to keep your client (iPhone) app as 'dumb' as possible; Your Wordpress DB should really own all of the content, and the data stored on the iPhone should be as temporal as possible. To put it another way, your app should be like a WP theme. A theme doesn't really 'know' about the WP database - it's just responsible for displaying it (and occasionally adding to it with things like comment forms).
Anyway, as for the actual communication I would recommend keeping as much in JSON as possible (I've found it easier than XML). There's a great plug-in for Wordpress that can help you out, that exposes WP functionality in a JSON-based API: http://wordpress.org/extend/plugins/json-api/
As for working with JSON on the phone itself, I highly recommend the json-framework: http://code.google.com/p/json-framework/ . In short, it'll convert a JSON string into an NSDictionary in one method. Incredibly useful.
Good luck!
May be it's too obvious, but usually for database communicaton used XML, CSV, JSON etc.
Is it possible to pull information from a website and display it in an iphone application?
I am looking to pull the current temperature and barometric pressure for an airport from the http://adds.aviationweather.noaa.gov website and display those two pieces of information in an app.
This sounds like a common task that programs do all the time but I'm not sure how it's incorporated into an app.. (what is the process of pulling webdata called?)
What methods or tools are available to do this? I am unfamiliar with handling web data for iphone at this time.
If they have an actual feed for the data, you could access it using NSHTTPRequest and parse the results.
If you need to screen-scrape the data off the page itself, then I would highly suggest creating your own web service to do the parsing and have your iPhone app talk to your web service. The reason being that if they update the page in a way that breaks your screen scraping you would only have to update your web service instead of deploying an update out to who-knows-how-many iPhones.
Just use an NSHTTPRequest and all the related classes to assemble a standard HTTP GET request for the site with the data you need. If there's a data feed (XML, JSON, etc.), you should find out what that URL is and use it instead of parsing the actual HTML of the web page. If not, the method is called "screen scraping" and it basically involves you writing a regular expression to parse the HTML of the web page returned from the server. Again, don't do this unless there is no alternative data feed you can use.
If you need to parse XML, see NSXMLParser. There are open-source solutions for parsing JSON in Objective-C. Just Google around for them.