How can I combine multiple iPhone applications in to one application? - iphone

At the moment I have 2 completed iPhone applications. Both these applications must be contained in to one application. I can't have multiple apps on the app store and to avoid confusion among people using these apps I must have them contained to a single application that gives the user the capability to launch any application in the wrapper.
How can I go about doing this. Some of the ideas that crossed my mind are:
Building a Framework, or building a library. But Im not even sure if I'm heading in the right direction.

It seems a little strange to me to want to combine two applications into one, but if your individual applications are reasonably well factored, this should be trivial. Figure out the UI presentation you're going to use to switch between the two applications (tabs, or a list view, or whatever), then set up a navigation controller, adding the "main" views of the two applications.
You then provide a way for the user to transition between the two applications. Piece of cake.

Why not just build a plugin architecture as your application, and let the plugins interface with it, creating what you need? There are many applications on the store which take a similar approach.

Have a look at the three20 library. It provides a useful Launcher View which allows you to create a view similar to the standard iphone home screen with pages and icons. To add a new application you just add a new icon and point it at the first view controller for your app

Related

iOS - app containing another app

I would like to hand my application to another developer to assymilate in his iOS app.
The goal is to have, in his app, a shortcut that opens my app directly - not just a link to the appstore.
The problem is my app has to remain compiled, since I don't want to hand over my source-code.
Is this situation, of one compiled iOS app, encapsulated insind another iOS app, even possible?
Thanks in advance.
Your application can register a custom URL handler that will launch it whenever any application will follow that URL. It can be triggered from Safari but it can also be triggered from any other application.
Here's how you enable that feature in your app and handle incomming passed parameters etc.
All code in an app bundle has to be staticly linked, so you would have to rewrite and compile your app as a linkable shared library.
What you're looking to do really isn't possible. Each app has it's own code structure and can't be embedded into another app (MainWindow.xib for example). Each app is also signed by the developers private key, so that's an obstacle there. You can't just hand him a binary of your app.
What you could do is potentially take your .XIBs and view controllers and give them to him to implement. This is easiest if there's no model that also has to be migrated over. Then he can present your views to take advantage of the logic built into your view controllers.
It's not a trivial amount of work and of questionable value. If you're not willing to share source code then none of the above is really going to work for you.
My advice would be as people above have mentioned and use a URL scheme in his app that refers to yours. Yes, your app would need to be installed, but then there's a clear and unambiguous separation between his work and yours...

Approach to developing mobile application that supports a web application

My company built its own project management web application. It's like basecamp on steroids. The core features of this application are:
create task lists
assign tasks to team members
track hours against task items
I am looking to build mobile application(s) as an extension to the web application. The mobile applications(s) must:
reproduce the features mentioned above
connect to the same database as the web application
retain drag drop capabilities
provide a rich user experience equivalent to or better than the web application
work on iphone, droid and blackberry
Given the requirements above, how should I approach the development of this mobile application? There's about 20 smart phone users in my company: 8 iphones, 7 droids and 5 blackberries.
I've heard of development frameworks like Phonegap that allow you to develop in HTML, Javascript and CSS. The software then works cross platform across blackberry, iphone and droid. If I am an average/slightly-above-average programmer, will I be able to build a high quality cross platform mobile application with PhoneGap (or another x platform development framework) that meets the above requirements?
Or should I build each iphone, droid and blackberry application independently?
What's the best approach? What are the trade offs?
John,
Well it sounds like you've got a bit of work ahead of you! When you have an existing web-based application, there are two basic approaches to getting your app available on any particular device: you can (1) write a native app that implements the functionality you want for each device you want to support or you can (2) write a web-based "wrapper" for your existing app and serve the content as HTML/CSS to those same devices.
Option 1: Build a native app for each platform you want to support
As for the first approach, the benefits can be great. By using each device's native frameworks, you have the complete ability and flexibility to take advantage of the best features of each device. Your app's views can also render faster, since all you will be fetching from your server is the data to populate the views with (i.e., you do not have to load images, HTML templates, or CSS files at all).
The drawback with this approach is that it inherently requires each device to have its own application. So if you're supporting a web app, an iPhone app, an Android app, and a Blackberry app this means that you have 4 completely separate codebases to maintain. If you add some sort of new feature to your web app (which you presumably will at some point), you will also have to implement that new feature in the three other separate code bases. Given the fact that these devices can have different interaction models, this could pose a challenge. Another drawback here can be distribution (i.e., you may have to go through a review process for something like the iPhone app store depending on how you want to distribute your app). It also means that the amount you will have to learn is quite a bit greater since each device has its own API set and programming "philosophy".
Option 2: Write a web-based "wrapper" for your app (perhaps using a library)
This approach also has a great deal of benefits. First off, if you use a framework like PhoneGap or Sencha Touch or Rhomobile, the big benefit is that you theoretically write the "mobile app" code once and it works across each of the devices supported by the framework. Compared to writing a native app for three platforms, this is a lot less work.
Downsides here are as follows. This approach runs as a website in the device's browser, so you will not have access to all of the functionality of every device. All of the great stuff in the iOS and Android API's will by definition not be available to you. You are also somewhat limited here with regard to local storage, but this may not be a great concern to you given your web app. Another drawback is that there will be more bandwidth required from your server this way, since you are serving all of the HTML, images, and CSS that you would otherwise not have to with a native app. Depending on the number of users and complexity of the pages, this could be significant to you or not. Another downside here is that you cannot go full-screen (with the iPhone in Mobile Safari for instance there is always a toolbar at the bottom).
General Concerns
One thing that concerned me reading your question was your list of requirements. Reproducing features and connecting to a remote data store are things you can definitely do with both native and web-based mobile apps. But "retain[ing] drag drop capabilities" is not. With an iPhone, for instance, you can use handles in a UITableViewCell to provide a way to reorder lists, but full-on drag-and-drop is not really something that fits with a mobile device's user interaction model. You may have to re-think this one.
The requirement to "provide a rich user experience equivalent to or better than the web application" is also a bit troubling. While phone-based apps can have really streamlined ways to get at and manipulate data, remember that you are designing for a screen that is a few inches square. It is physically impossible to provide the same breadth of information in an organized manner than you can with a 21" HD widescreen monitor.
Remember that you're designing here for mobile, so you want to take advantage of the available platforms but remember that you're dealing with small screens and limited interaction methods (touches, swipes, and gestures).
My recommendation is that if this is your first time at this, you want to support all of these devices, and you already have experience with the web, I would suggest taking Option 2 and using one of the above-mentioned frameworks. It would be the easiest way to start and there wouldn't be any radically different concepts for you to have to learn.
Good luck!
An additionally comment on what Neal L posted above, with Rhomobile you can access the devices native capabilities as well as have drag and drop in your views.
There are several training and example videos here: http://rhomobile.com/webinars/

How to choose between a window , view or a navigation based application while developing for the iphone?

I am a complete newbie(as is already evident) and I can't just figure out when to choose what. I have been through countless googling operations but found no help on the said question, hence had to ask here. It would be great if any of you could explain or even point me to some online resource which does it. Thanks again for your time.
It depends what your app needs. I've made an app which is a series of questions in a survey. For that I used a navigation based app.
However I'm now working on a complicated app which uses a series of navigation controllers within a UITabBarController. So for that I chose to start a window based application because there was going to be a lot of custom programming involved and that was the "cleanest slate" available.
Think about what you need your app to do, and remember the different projects you can start are all basically the same and you can always change them to suit your needs, its just what they all start with included thats different.
I would always recommend to start with Window based application template.
From a window based iPhone app, you can make any kind of iPhone application.
To learn:
I would recommend iPhone Programming: The Big Nerd Ranch Guide
Get the Kindle version for your Mac - Kindle for Mac
alt text http://img408.imageshack.us/img408/3245/bnr.th.jpg

How To Make Multi-view Apps?

I learn x-code first time. X-code is very complicated!
Would you tell me how to make multi-view apps?
(Step by step)
I created a step by step guideline to create a multiview application here: Multiview iPhone.pdf
Michael Tuszynski's vimeo tutorial (http://vimeo.com/8930397) is helpful but has some flaws (like creating view instances whenever switching)
apple does an excellent job with their documentation. There is a TON of reference material that answers your question. they provide step by step guides for building apps with multiple views:
http://developer.apple.com/iphone/library/navigation/index.html?section=Resource+Types&topic=Getting+Started
Personally I don't like Apple's documentation because it almost seems to assume that you already code for cocoa on os x.
The easiest way to create a multi-view app is to start a new Tab Bar Controller based application using the template, then drag however many View Controllers you want onto the tab bar controller icon. You can set set the icons and titles on their navigation items and just design and code the view controllers just like you would if each view controller were the only one, except that you probably want to connect them somehow to some shared resource.
Check out the book Beginning iPhone 3 Development as it has excellent step-by-step tutorials on how to do several kinds of multi-view applications. It's well worth the money especially if you get it from a discount book store online or something.
Apress Beginning iPhone 3 Development Exploring the iPhone SDK Jul.2009, By Dave and Jeff. They have given a wonderful tutorial for many types of applications including multiview apps

Dashcode: How to add custom inspector panel for custom Dashcode Parts?

I like using Dashcode for making quick little web apps, but it specifically targets the iphone version of mobile safari, which is not acceptable for cross-platform development. I've developed a number of laundry-list hacks that I tend semi-manually add to my scripts to facilitate cross platform development (like, say, to the Android or Palm) and to perform useful iPhone tricks, like stopping the 'bounce' associated with web apps on the iphone and I'm turning these into custom Dashcode Parts so that I can drag & drop them into my project. This is mostly working so far, but here my dilemma:
How can I create a custom Inspector component to go along with my custom Dashcode Part? Is it possible? Ever heard of being done? What are the minimum steps?
I see some compiled .nib files, and an existin Dashcode Part's Info.plist has a key CYPartInspectorClass that maps to CYPushButtonInspectorPane and like CYPushButtonInspectorPane and that apparently corresponds to English.lproj/CYPushButtonInspectorPane.nib which is a compile .nib. Does this imply that everything here is semi-hardcoded, and thus impossible to add my Inspector changes?
Any pointers to the above would be helpful.
After a lot of digging, I don't think this is possible, but I'd still be happy to eventually be proven wrong.