Can multiple versions of the same iphone or android app use shared code or libraries? - iphone

Let's say I write an app that displays restaurant menus and lets a user order items from them. I'll call it RestaurantMenuApp. I'd like to have this main application be branded under my company name. It would allow users to view multiple different restaurants and place orders on any of them. Purchases are done through API calls to my web service using my company's merchant account.
Now let's say I also want to sell customized versions of this app to individual restaurants. The customized version would be themed just for that restaurant, only show their menus, locations, their promos, and so forth. It would make the restaurant look like they built their own custom app. Purchases are still done through API calls to my web service, but each branded version can use their own merchant account.
I'm wondering if each application (the main RestaurantMenuApp and each individually customized restaurant app) has to contain an entire copy of the entire application. Is it possible to have each app install a shared library that all of the apps use? If any of the apps has already installed this shared library, the others apps don't need to install it as well?
I'm new to mobile app development and searched for answers, but could only find solutions for how to build lite vs. full versions of the same app. It was not clear if these apps could SHARE code to make each install smaller.

For iPhone/iOS App store apps, an OS enforced security sandbox prohibits apps from sharing any code.

For iPhone, the inter-app communication is restricted almost to none. Apple designed the iOS this way for the benefit, arguably, of security and user experience.
On Android, there is much more flexibility in inter-app communication. There are several ways to achieve what you want.
First, you can use service. Service processes on Android are pretty much like service processes on Windows. They are running in the background all the time. There is an code sample.
http://marakana.com/forums/android/examples/60.html
Or you can use intents. Intent receivers register with the Android OS to specify what action and data format that they will handle. For example, an intent filter like below tells the Android OS that the receive will be able to view, edit, and pick any mime type of vnd.android.cursor.dir/vnd.google.note. So you can create a component as intent receivers to take care of a special data format. In another Android app, you then push out your data and the intent receiver will take over from there.
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
</intent-filter>
For more information on intent filter, you can refer to this doc.
http://developer.android.com/guide/topics/intents/intents-filters.html

Related

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 - iPhone / iPad Build Mini Apps (as features) inside 1 main App

I have a requirement to build 1 main App that houses other mini apps as features.
Example, 1 main App called MY HR. Tapping on this, user will see icons like:
Leave Approval, Pay Slip, Overtime Approval and etc.
User authentication is shared accross all the features, meaning to say, when user launch this 'Mega' app, he only needs to key in a PIN number once, then he can access all the other apps.
Each of this feature integrates with SAP backend using Sybase Unwired Platform 2.1.3 technology.
Is there like a framework available, to build like a container app, that houses individual features, and it should be feasable whereby, in future, if I want to add Expense Approval, I can just do development and plug it in the main 'Mega' app easily.
This is similar to the Hybrid Web Container ios app made available by Sybase Inc, but that app houses mini HTML5 / CSS / Javascript apps and not mini ios native apps.
I have read couple of posts here before, some have suggested to add future apps by just adding more classes and xib files, but that would not be a best practise and be very messy. Besides, apple doesnt recommend this too.
What is your view on this requirement?
You should check out the Three20 project. More specifically, its launcher feature. http://three20.info/showcase/launcher

Download additioanal functionality into an app - is it possible?

I'm currently developing an iPhone version of existing Android application.
Customer wants to provide his web services via mobile apps. On Android this is made in a modular way: user installs main app, and then he can download additional modules to it if needed. That way he can install only modules that he needs.
Is there a way to achieve same functionality on iPhone? I read about In-App Purchasing, but I don't know if it will work because additional functionality will not be built-in and unlocked - it needs to be downloaded and added to my app as a new module - so user's space would not be wasted with unneeded modules.
Thank you!
2.7 Apps that download code in any way or form will be rejected
From App Store Review Guidelines
Judging by the question, this is not a world-facing app - it has a specific customer. With Terente's answer in mind, do consider side-loading, AKA in-house distribution. That is - bypass the app store. The prohibition on the downloadable code is an App Store policy, not a limitation of the platform.
The enterprise contract with Apple is $300/year instead of regular $100/year. But you get to install your app on as many devices as you wish, completely bypassing the App Store. Either over the air (by browsing from the phone) or via iTunes.
Under this model, your app can download, store and run custom code all you want. The specifics of the plug-in model are up for you and your customer.
EDIT: so app store is a must. How about this: have a WebView in the project, have it download HTML pages with JavaScript in them, have code hooks for JavaScript to call. To the best of my knowledge, AppStore does not reject apps that display Web pages from the Net, and if the Web page happens to have a script, there's no prohibition on executing that script.
This violates the spirit of the rule while relying on letter and precedent. Technically speaking, JavaScript IS code. And again, technically speaking, WebView is capable of downloading and running it. And App Store is choke full of apps with WebView in them.
How will this fly with your customers, who knows.

Web based Iphone / Android app

I am considering developing an Iphone/Android application but I want the information on it to be live and uniform between platforms... Therefore it seemed logical to me to make it web based. I would however like to be able to achieve certain non web based functions such as adding events to the calendar and gps locations on the the mapping sortware.
My questions are:
Can I make a web based
application that does not visually
show in a browser?
Can I add additional functions that
are not natively available in a
browser e.g <a href="#"
title="adddate:110911"/>Add to
Calendar</a>
Would it be a lot of work to make
such an app as the majority is web
based (I mostly progam in PHP so
coding for Android and Iphone will
take me some time to get my head
around).
All of the questions are for both Iphone and Android.
Thanks
I would recommend using a cross platform solution like phonegap (with UI sencha touch on top of it).
You can have an app that is a thin shell over the system browser, and exposes the non-Web bits of functionality to the contained HTML via JavaScript interfaces. You will still need two different codebases for iPhone and Android, but the essense of the app will be still webby.
There's no way to manage the system calendar from Web apps neither on iPhone nor on Android, AFAIK.

Will a Safari-based app for iPhone be accepted to the iTunes store?

I'm about to begin development of an iPhone app. The app itself is fairly basic, and I want a speedy turnaround time.
I'm a web developer myself, specialising in traditional web technologies such as PHP/MySQL; I have no experience in Objective-C.
My plan was to create a very basic iPhone app that is just a Safari service that passes some basic variables to a URL. That URL is the app built in PHP and housed on my servers, this way I can create the app very quickly without needing to outsource anything.
My question is whether apps of this nature would be accepted into the iTunes store, or would they be out-right rejected? Anyone's experiences or comments are very welcome.
Thanks
It could go either way, but mind bullet 12.3 from the App Store Review Guidelines:
12.3 Apps that are simply web clippings, content aggregators, or a collection of links, may be rejected
In my opinion, a simple UIWebView wrapper around your web site comes close to the definition of a simple web clipping. Your approval may very well hinge on your luck in drawing a sympathetic reviewer.
It really depends upon your application...These kinds of application have been approved in the past but again I am saying that it depends on many factors.
Try to test your app in every possible manner and also keep in mind the memory issues.
Best of luck!!!
Should be fine - its called a web app and there is software out there that will do just this for you.
All you need to do is to make a UIWebView and put your web app into it.
Also look at http://jqtouch.com. That gives you some idea of what you can do web-side. :)
http://www.netbiscuits.com/559
Native Hybrid Apps
Native apps can interface more deeply
with the mobile handset modules and
sensors to create an even richer
mobile user experience. Netbiscuits
provides pre-build native apps
frameworks for all major mobile
operating systems to be easily
customized for the needs of
enterprises.
Get "2in1" by combining the power of
mobile websites and native apps by
wrapping mobile websites into hybrid
apps and list them easily in all major
app stores of providers like Apple,
Nokia, Google or Samsung to open a new
mobile distribution channel. The
benefits of this approach are fast
time to market, minimized development
and maintenance efforts and maximum
mobile cross-platform technology
coverage.
Yes, it will be accepted as long as you stick with HTML, CSS, JS and Obj-C on the client side. You still need to wrap it in an iPhone app. In my experience, the best way to this is to use http://www.phonegap.com/ or a similar framework.
You'll have the option of deploying you app through iTunes or as a regular web app (you users will be able to create a link to your web app right on their springboards)
It SHOULD be accepted, granted you test test test and make it look just like a native application. Also you'll have to make sure that your server is never down, or if the application can't reach it just display an error message. You also have to keep in mind that there are a lot of iPod Touch users, and they don't have access to the internet all the time. Which means that chances are you'll get a BUNCH of 1 star reviews