Merge two applications (Apps) into one on the iPhone

Source: Internet
Author: User
Document directory
  • Jan 27,201 0 pm

This time, I need to merge two iPhone games. I have no clue at the beginning, so I went to the Forum to ask for help.

 

Review the practices of other platforms:

BREW Platform: multiple applications can be combined. Each app has a unique classid. You can start other apps through the startapplet provided by the system, including running in the background and exiting yourself, it is easier.

 

J2-based platform: I remember that a MIDlet suit contains multiple MIDlet and can be started separately. I remember that a collection I made was implemented by switching the canvas.

 

Last to iPhone: according to the official answers on the Forum (PS: It seems that iPhone customers can also. When I went to the brew forum to ask questions, the official technical staff will also go home, I haven't tried it since I have a lot of Chinese materials .), The iPhone can only run one application at a time, so this idea is not feasible,

 

Therefore, it is impossible to synthesize two apps on the iPhone. The original method must be adopted as follows:

 

1. Create a new project and use your own view to display the selected app on the page,

 

2. Merge the code and resources of the two apps into the new project, but they can use their respective folders.

 

3. Here it is not completely merged. Every app still has its own view. messages are transmitted from the main project,

The main framework is responsible for switching between three views. When switching to each app, the message is passed over.

 

Retained the following information:
Author (author): smilelance
Time 2010.01
Source (from): http://blog.csdn.net/smilelance



Paste the post I asked on the official website to prevent further searching:

 

How to bundle two app in one package?
Jan 27,201 0 pm

I want to do like this:

 

We have two game, A and B, they are all independent application.

 

I want to bundle them in one package, named as a new game, name c

 

We I opend C, display a screen, select A or B, each selection Exit C and swich to app A or B.

 

 

 

Official reply:

 

You're
Not going to solve this problem as you 've stated it. iPhone OS
Applications are not allowed to load code, so there's no way that C can
Launch a (or B ).

 

Probably
The best solution wocould be to take a and B, factor out their guts, and
Roll them together with C as a wrapper around und them. You have a single
Application cab which contains all of the Code, and at launch you use
Thin UI to choose which section of the application to run.

 

If
You do this, make sure you do it at the View Controller level. Don't
Try and have each application create its own uiapplication object; that
Way lies madness. Rather, extract the relevant view controllers from
A, B and C and host them all within a single uiapplication object.

 

Share and enjoy

--

Apple developer relations, developer technical support, core OS/hardware

 

<
Http://www.apple.com/developer/
>

<
Http://www.lists.apple.com/macnetworkprog/
>

<
Http://www.lists.apple.com/mailman/listinfo/filesystem-dev
>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.