rails 3 and phone apps - ruby-on-rails

Hoping someone can help me out. If I'm developing a Rails 3 app, but later would like have a mobile version later down the line, whether is iphone/bberry or anything else. Does this mean that the mobile apps will be developed from scratch or will they utilize the existing infrastructure somehow?
Does anyone have experience with this?
Thank you!

It depends on what type of mobile app you're talking about. You can create either:
A phone friendly version of your web app
A native app on the platform of your choice (iphone, bberry, etc)
If you go with #1 all you need to do is create phone friendly versions of your views. But your users will need to use the web browser on their phone to view your site. An example of this is www.engadget.com versus m.engadget.com. The latter is just the engadget website optimized for viewing on your phone.
If you go with #2, at the very least you'll need to create a native client app on the platform you select. However, if you design things right you can leverage much of the functionality that's already in your website.
Take twitter as an example. You can use the twitter website to use features of twitter or you can use a native iphone app like twitterific. The iphone app (probably) uses some twitter API to access functionality that's the same as when you use their website.

You will just need new views for mobile version.

You will need to probably output the data in the form of json or xmls if it is a native app so you will need to modify your active controllers. If it is web app or web page then you will need to modify your views to make them mobile browser friendly.

Related

How to create an USSD Mobile Application

I want to create a mobile app that can communicate with USSD. We have lot of services we buy using USSD code, I was thinking about building an app to help solve that problem. An app that use to download and use to do their transactions. For example if someone want to buy something using Mobile Money they would use the USSD code which is *144#. If there is a way to create an app that will be able to do the transaction that will be great.
I am thinking of building this app using NativeScript. If there is any other framework that would make me easier I would really appreciate it.
My team and I developed a platform called AutoUssd which allows u to do this. Kindly check it out at https://autoussd.com to see if it fits your needs...

Mobile App With Web Admin Panel

I have to build an iOS mobile app which has a web based admin panel.
Can you give me some tips on where to start?
I know OOP programming and the fundamentals of Swift (I have to use this language.)
The app I would like to build is kind of a reporting app. Users can log in to their dashboards and can send reports to the "office" which means they fill out a specific form. In the office managers can check the reports in a custom made web based admin panel (such as www.domain.com/reports-admin) where they can log in and view,filter,delete,save these reports.
Can I do something like this with Parse.com or I have to build my own backend from scratch?
Thanks for the help.
According to the backend, it doesn't matter if you are delivering the content to an iOS app or a Web interface. So yes your users can access it from the web or their iOS device. Parse.com can be easily used for the backend as they support many languages. The parse.com documentation is a good place to start.

Clarification on Apple App Store Guidelines - Use of WebUIView

I'm new to mobile programming. Recently my company has looked into creating a specific application for tablets (Android and iOS). So it was assigned to me to develop a thin-client based around using HTML5 for what we need to do.
Essentially the application allows a user to fill in a custom-designed form (which the user can build themselves, or pull down a predefined template from our server). This form is built using HTML5, Javascript, JQuery, etc. Some additional functionality is planned, such as being able to take a picture using the native device and attach it to the form that we send back to our server for storage (once we figure out how to do it in iOS. We've already done it in Android.)
However, I noticed the following on Apple's App Store Guidelines, under the Functionality section. Item 2.12:
Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected
Can someone explain, or at least direct me to clarification of this when using the UIWebView construct? This application at its core is pretty much just HTML5. While it might have some additional bells and whistles, does this mean that if we try to submit this (when its completed) to Apple, that they will simply reject it out of hand? Implementing the majority of it in HTML5 was done purposely so we wouldn't have to re-code everything from device to device (and we will also embed it in one of our products, so if they want to fill it out on the desktop while in our system, they can.)
Any guidance would be appreciated, or even suggestions of where this question should be asked if SO is not the proper forum for it. Thanks again.
The key in the Appstore guideline is the word "simply":
Apps that are not very useful, unique, are simply web sites bundled as
Apps
If you keep a balance between locally stored and remote HTML content for your webviews Apple would not look at the app as a hollow shell pulling in remote content.

How to share a link from the app using other applications

I want to share a link from my app using other applications installed on my iPhone such as Gmail, Facebook, DropBox, WhatsApp etc. In android there is a straight way to do so, just fire an intent and it automatically shows the installed apps through which we can share whatever we want. Is there any such way in iPhone ?
Thanks!
On iOS , app is more separated from each other. The only way to pass data from one app to other is using the URL mechanism. As one example, an app register url scheme "open-me://",you invoked openURL with "open-me://my-link" then that app will launched. That app will define the detail of the URL so it could understand the content.Continue with the example we are using, the text you passed could be either "open-me://A?data=my-link" or "open-me://A?message=my-link". So there are no general solution for all apps.Typically third party app will provide a SDK to make these things easy.
If you don't mind using a kind of large third party library, ShareKit is a good choice. It supports quite some apps.
If you want to know more about this topic,for example sharing files between app. You could start from reading the class reference of UIDocumentInteractionController.This UI component will show a list of app installed on your device which support the URL scheme.

How does the Facebook app for iPhone work?

I will soon be writing a native iPhone app for my web site. The web site is already mobile optimised so could potentially just sit in a UIWebView. How does the Facebook app work? Does it do something similar?
If I did use a UIWebView then how would I store user credentials so they don't have to log in every time and how would they upload photos? These are my two main requirements.
The facebook app is going to be a native app. It is different from the mobile website.
There are two things you can do here. If you're going to make your native app just a UIWebView then don't bother! You can have an apple icon embedded in your website which will show if a user bookmarks your website on their home screen. To use this use the <link rel="apple-itouch-icon" href="/apple-touch-icon.png" /> code to do it.
The second is make a fully native app. I know the benefits of a UIWebView app, but the negatives are plain to see. UIWebView apps are tacky, nonfunctional and terrible to use. A mobile website is not an app (unless done very well). You will have links to click, pinch and zoom, awful bounce effects on the web view, links that may possibly allow users to navigate away from your mobile website but within your app. Again, unless done cleverly, you will have to provide browser controls on your app which will make it look like a tacky web browser.
My suggestion would be either stick with your website, optimise it for touch based input, make it a really good mobile website, or create a fully functional native application. Remember not all websites need to have an app to go with it. If your app isn't necessary then its merely counter productive to make an app for it. I don't know about anyone else, but I spend more time in my web browser than I do in apps.
With regards to uploading and auth then a) auth should be done already in your website. A UIWebView is just an instance of safari working within your app, so it will be able to get and store cookies and all sorts. I believe these degrade at the end of the app session, however its easy to pass to the objective c and store in an stored preference. b) uploads not going to work even if you put your site in a web view. You will have to (at some point) hand off to an upload screen in your app which is running natively.
I would suggest that you start off with a simple native app. Let the users log in, upload stuff and do other basic stuff - whatever they can't currently do on your mobile website. Then move on to other things as people ask for them, or as you have the time to make them. You don't have to launch your app with a fully functioning version of you website (in fact this would be silly because the only thing they cannot do on your mobile website on their phone is upload stuff). I'm sure people will request features as your product evolves.
I would take a look at PhoneGap, you can get access to native device features through javascript http://phonegap.com/

Resources