xcode project with apps in app - iphone

I am somehow new to objective-c and iOS.
My question is as follows:
I have created 5 iphone apps until now. What I need now it to create a new project that will include all other applications in it. So the user would by 1 application and then from a uiviewcontroller he could launch the individual apps bundled in the application. Like an application bundle for the iphone. I have seen lots of this on the app store especially with games.
I have been searching for an answer for a week now. The only thing closely related that I found is related to targets, but how am I supposed to launch the individual targets from within the main app (if this is even possible).
Can someone please point me to the correct direction? A tutorial or an example would be great.
Thank you all in advance.
Cheers!

Check for any duplication in naming classes and resources in all your projects. Since you want all your projects in one project, you have to eliminate duplication.
Copy the classes and resources to your new project (please keep things organised by using folders for your classes and resources).
Identify the root view controller of each app (where the app starts) call it from your new root view controller.

You need to keep every mini app separate, get rid of all of the app delegates when you copy them in. Each mini app needs its own way of launching, most probably through present modal view controller.
Just have the main app handle all the loading and app delegate stuff.

Related

Creation of custom xib view size in Xcode

We are creating an application which uses one view multiple times inside another view.
I have accomplished this by manipulating the default xib view size to look like the one in the picture below and then importing multiple instances of it inside my main view:
Everything seems to work fine inside the simulator, I'm just scared apple will reject the application when submitting it to the app store.
Is this an acceptible way of accomplishing the task or would apple reject the application?
note, I havn't tested this on an actual iPhone, only in the simulator.
Regards
No apple is not going to reject your application. I always make custom views this way. And reuse them. So Don't worry about it. I have done this thing in lots of apps and all are on app store. You can check this link for apple rejection criteria if you have any doubts.
Reasons for rejecting iPhone application by Apple store Happy Coding!

Can I have an app inside another app?

I am having an issue integrating iPhone apps. In one of my previous posts, I asked about creating a static library from an Xcode project..
As an alternative, I am searching for a way to put an app inside another app. Because both are large apps containing lot of classes, images, sound files etc. Most of the class names and resources names of the both apps are same. So the static library concept will lead to name conflicts, which is very very tedious for me to fix. So I am trying to switch to this app-inside-app concept.
Consider I am having an app. I want to put my second app inside the app by putting the ".app" file of my second app inside my first app's ".ipa" file or somewhere inside the first app. Now I want to call my second app from my first app to run independent of the first app.
My concept is, both my first and second apps are seperate apps. I want to put them in a single ipa file. Only one app (ie., my first app) is shown when I install the ipa file. My second app is also gets installed but its not shown, because it is inside my first app. So that I can call my second app only from my first app.
This is what I need to do..
Any suggestions..
Thanks..
You can't do this. The method of putting apps on an iphone is fairly strict about how it works. And you cannot put 2 apps in a single bundle on the app store. You would have to ship 2 apps, instruct the user to install both, and then one app could launch the other app via a registered url protocol. And that sounds lame for this case.
And as you found, ObjC's lack of proper namespacing makes merging this code sort of hard. Perhaps you could simply prefix all of the libraries classes. A simple find and replace should be able to do that. This is the general approach for sort of fake namespacing code in a C dialect that doesn't support real namespacing.
Instead of Person and Person, you would have Person in your main app code, and MLPerson in your lib where ML is a cool 2 letter prefix for your library (I abbreviated MyLib to get ML).

iOS - iphone/ipad versioning

I currently have an iphone app that I want to make an ipad version of. I don't want it to be "universal" though. I want to sell the ipad version for a different price than the iphone version.
My question - what is the best way to go about this in Xcode? Do I just copy the project and then maintain two separate projects, and do the ipad build from the new project? Seems this is the only way to go, but will be a pain to make updates to both. Suggestions? Advice? Thanks.
In almost the same way that you would make an app universal, you can make a separate iPad version. Disclaimer: I haven't actually done this before, I went the universal route. Now what you need to do is first right click on your target and click "Upgrade Current Target for iPad..." Then click "Two device-specific applications" and "OK." Good luck.
I went through something similar with my apps. I had a working iPhone version of an app that I wanted to port to the iPad. I created an iPad-specific project and added the share-able code to this. Fortunately for me, I had a pretty clean separation of the data and UI code and was able to share most of the data code; in the new iPad project, the only thing I had to write new code for was the UI stuff.
I'm totally open to changing the way I handle this separation. In theory, it would seem that you could specify different bundle identifiers and turn on/off settings to enable iPad or iPhone versions. But I had decided that it'd just be simpler to separate out my iPad/iPhone projects.
Hope this helps!
Instead of using two projects, add an iPad app target to your iPhone project. This way, whenever you change shared code, it is updated for both apps.

2 iPhone apps messed up when deploy to iPhone

I have 2 iPhone apps and want to deploy to iphone and somehow the second app rewrote the first app on my iPhone.
The second app project was copied from the first app and I made some changes including renaming the app name etc.
I believe there might be some files messed up due to the shared path. Can anyone shed some light on this issue?
You need to make sure that the two application's bundle identifiers are different, otherwise they will be treated as different versions of the same app.
Look for the CFBundleIdentifier (Bundle Identifier) key in your application's Info plist. Make sure this is different for each application.

How do I make iPhone SpringBoard show two or more icons for one application bundle?

It seems like Info.plist file has an ability to declare different roles for the same application bundle through the UIRoleInfo key. SpringBoard can recognize these roles after installing an app and may display separate icons for each application role.
For instance, iPhone shows MobileSlideShow.app as 2 different programs: Photos and Camera.
Unfortunately, there is no official Apple documentation about the subject at the moment. Would anybody advise how to organize the same behavior in a custom app?
This feature is going to be used in the Enterprise product for ad hoc distribution.
This isn't a supported feature, so if you do this you might have a hard time getting your app through the approval process. I wouldn't recommend using it.
Have you tried it to see if it works? If it doesn't work, you could create a second app that does nothing but launch the first one, with a custom URL scheme. The first app can recognize when it is being launched with that URL. This is not ideal as you will see the second app launch & quit (though it should be really fast).