1

I am trying to embed apps into an app. Basically I want something similar to what divide.com's app does:

enter image description here

, but they build their own mail, calendar apps etc. Is it possible to have these apps within an another app, but they themselves are individual apps? I am a little new to IOS and I have looked up the custom url scheme - but it looks like the controlling app will lose control once the linked app is called.

Ive looked at Launch an app from within another (iPhone) which suggests url scheme like I mentioned but that is not really what I want. What I could also think about , if there was no way to achieve native apps is to install the apps on the ipad, and then link to them from the main app. But is there a native way to put apps into another app.

Community
  • 1
  • 1
ios noob
  • 43
  • 1
  • 4
  • It looks like that image leans towards false advertising. iOS applications do not have inherent knowledge about other apps, and you can not embed one app into another. It looks like divide created their own clever app that does a whole lot. – Mike D Oct 05 '13 at 02:18
  • Thanks for your response, appreciate it. Basically they created a launcher, and then created links to their own mail and calendar code. :) Thats a good way to do it,but I dont want to reinvent the wheel and create my own mail and calendar code .Is it possible to have links to apps that are normally outside on the ipad (like say garage band), provide a link to it with a launcher and then lock access to it other than accesing it wit this launcher ? – ios noob Oct 05 '13 at 02:29
  • @iosnoob no you can't launch garage band. Your app is not even allowed to know whether or not garage band is installed, let alone interact with it. The only exception is the URL protocols, which most apps do not provide. You can only interact with apps (like dropbox) that are specifically designed to be interacted with. – Abhi Beckert Oct 05 '13 at 05:03
  • Sorry, but Apple's security model (to prevent malware) and privacy model (to prevent spyware) and review guidelines (to prevent apps finding a way around the technical barriers) have all been architected from the ground up in a way that makes what you're suggesting impossible. – Abhi Beckert Oct 05 '13 at 05:05

3 Answers3

1

How existing apps do it

Behind the scenes, the apps inside the app cited as an example are actually separate modules within the parent app. Effectively, they are multiple apps integrated into a single app, one single executable.

Several methods have been suggested so far. But each have their own problems.

Embedding another app inside your app bundle

While technically possible, tou cannot actually embed another app inside another app on iOS as this is prohibited by the App Store guidelines and the OS itself.

Launch URLs

As @BlackRider notes, you can launch other apps with launch URLs. However, you cannot prohibit the other apps from being launch from outside your launcher as you have asked for. The user will still be able to launch the other apps from the Springboard and other apps would also be able to use the Launch URL.

App wrapping

I have to admit, I'm not terribly familiar with the mechanics of app wrapping. However, in my reading of how it works, it requires the intervention of corporate IT to enable. While this may work if you intend to sell your app directly to corporations, it will not work if you intend to sell it in the iTunes App Store to the general populace.

BergQuester
  • 6,167
  • 27
  • 39
  • Thanks for the answer. Appreciate it. But is there a possibility for this scenario - 1.) An app say garage band is installed on an ipad, 2.) Links to it are put into another app which is a launcher app 3.) Access to this app is prohibited other than from the launcher. Maybe something in ios 7 that can allow this ? – ios noob Oct 05 '13 at 02:31
  • 1
    @iosnoob Nope, that's not possible – JustSid Oct 05 '13 at 02:43
  • How about app wrapping ? – ios noob Oct 05 '13 at 03:03
  • From what I understand of app wrapping, it may or may not be suitable, I have updated my answer with more detail. – BergQuester Oct 05 '13 at 19:34
1

@BergQuester is correct in saying you can't embed one app into another independent app in iOS. This is prevented by the iOS security model, where apps have extremely limited knowledge of the other apps, and anything outside their own sandbox.

That said, there are apps out there that cleverly work around this by using app launch URLs. This Apple document describes how to do it. For example, you can launch Instagram from your app (provided that Instagram is installed on your phone). Many apps have their own URL schemes that you can use to launch those apps from your own app. In many cases, you can also pass some data to those apps (e.g. an image and some text for Instagram to create a new post).

A good example of an app using this approach is Launch Center Pro.

TotoroTotoro
  • 17,524
  • 4
  • 45
  • 76
  • Thanks! Is there a way I can wrap those apps in a way mentioned here:http://www.networkworld.com/news/tech/2013/050713-app-wrapping-269503.html – ios noob Oct 05 '13 at 08:57
  • Except @iosnoob wants to prohibit launching the app from anything but the launcher app (see his comment on my answer). This is not possible. – BergQuester Oct 05 '13 at 19:15
0

The correct technical approach to this is using NSBundle: https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/Reference/Reference.html

A bundle can do many things, including hold arbitrary code which your app can load and execute. Basically you compile some code, which can do anything, into a bundle, and then you stick that bundle inside your launcher and it gets launched by it.

However, the app store rules strictly prohibit you from doing many things that are technically possible. Your app may or may not be allowed into the App Store.

So you need to study the guidelines, especially section 2. There are other apps that do what you're trying to do, so obviously it can be done - but you are pushing the edge of the guidelines. Maybe your ideas have never been done before because it's not allowed.

Worst of all, the guidelines are subject to change at any time. What's allowed today might not be allowed tomorrow. If you plan to make money off this project... then you're really playing with fire. They might kill your app before it's even released to the public, or maybe a week or six months after you release it, they might change their mind and kill it.

Try looking up examples of how NSBundle works on OS X/Cocoa apps. It's exactly the same on iOS but more commonly used in Mac apps, so there's more example code available.

Abhi Beckert
  • 32,787
  • 12
  • 83
  • 110