Options
If I understand correctly, you're wanting to show a UIView on top of another application's window. In the app sandbox, you are only allowed access to your own application's window. Jailbreaking, however, will allow you to do this, but it's not exactly simple.
In order to show a view on top of applications, you have three choices. Which option you choose depends on what you're trying to do.
- Inject your code into third-party applications
- Inject your code into SpringBoard
- Use a combination of methods 1 and 2.
Option 1
If you choose to go with this route, your code will be running inside each third-party application. This allows you to modify the view hierarchy of the application to show your own window or even modify existing ones. Since you're code is running in the application, you can obtain the key window by simply calling:
[[UIApplication sharedApplication] keyWindow]
Option 2
If you choose this option, your code will be running regardless of what application is open. By obtaining the main window, you can show UI over anything, including system alerts. I've posted an example of this to GitHub at rpendleton/tutorials/so-26032688. The example shows an alert anytime the user takes their phone out of silent. The code to retrieve SpringBoard
's window is:
[[NSClassFromString(@"SBUIController") sharedInstance] window]
Option 3
The third option, and the one you'll likely end up using, is a combination of both options 1 and 2. In this scenario, you'll inject your code into third-party applications, and then communicate with SpringBoard to decide what needs to be done. Typically, your application would communicate with SpringBoard, then SpringBoard can relay that information to the desired application. You may be able to communicate directly between your application and a third party application, but I haven't tried that.
Communication
In order to communicate between your application and SpringBoard
/ other third-party applications, you'll need to use a messaging system. An easy way to do this communication is via a open source library called RocketBootstrap.
Screenshots
The screenshot on the left is from the example I posted on GitHub, and the screenshot on the right is from one of my tweaks AppScan. Although I'm presenting an alert in both, you can show whatever view you desire.

springboard
process on a jailbroken device.