当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - Displaying Server Side Content in iOS app - Approach Needed

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: