How to get touch point outside current app - swift

I want to develop one iOS app. Is there any way to get the ui touch point when app in background. Like i want tap randomly in iOS device screen and my app will get correspond touch point accordingly.

Fortunately, this is not possible on iOS.

Related

Do scenes get restarted when changing orientation on mobile devices?

I develop a mobile app on Unity, and I decided to let the user flip the orientation whenever they want (landscape/portrait). But as I remember- when you flip the device on Android- the Activity gets restarted so you need to store the variables and restore after the change. But since I develop everything in Unity- I'm not sure about the steps I have to make in order to allow orientation changes. Do I have to store the variables? What happens after the user rotates their device? What information might I lose besides the objects positions? Also is there any recommended tool for making 3d game objects fit the screen? like the "anchor presets" option that UI elements have?

iPhone app is controlling itself without IBAction

I have a simple application. It is you touch start button, then the display will change, then you shake your iPhone, it shows you some texts. The problem I am having now is first time the app was developed for iOS 3.0. Since then the codes weren't touched. Last week I upgraded my Xcode into version 4.2. Then my app is controlling itself no touches required. It will control itself. When I modified the touchesbegan function, it doesn't change. Neither the accelerometer does. So what could be the problem?

how to detect mic position on iPhone?

iPhone 4 has a mic on bottom-left, iPhone 3GS and earlier had a mic on bottom-right.
How can I detect where is the mic on iPhone? What function does that?
You will have to detect the specific model of device (e.g. "iPhone2,1", etc.) and do a table look-up from information you determine. And to future-proof the result, you may also have to have it look up the position of the mic from your web site, where you can keep a table updated with device types as Apple introduces new ones.
I would not use the method as said in the comment to your post. The minute the new iPad or iPod Touch is released with a front facing camera, your application is off.
Why not just use a method like in this post: Determine device (iPhone, iPod Touch) with iPhone SDK
The code (if you scroll a bit down) shows how to detect which version of iPod/iPhone/etc is running on.

Send touches on iOS device to another UIScreen (external display)

Is there a simple way to send touches on an iOS device (e.g. iPad) to another UIScreen which is rendered on an external display?
For example, the iPad shows a blank screen and the app is shown on the external screen. If I touch down on the iPad approximately where the button (displayed on the other UIScreen) would be, it sends the coordinates to the other UIScreen so that it looks like I'm touching down on it.
This is intended to be a quick way to output what would normally be displayed on an iPad, to an external display, but still retain touch interactivity. It's somewhat an alternative to app mirroring.
This is not possible if you want to submit your app to the App Store as it will rejected by Apple for using private APIs, because there are no public methods to create UITouch objects.
However this can be done with private APIs, there is an article here which shows how to do it.

want to build an alarm app in iphone

I want to build an alarm application for iphone. I want to ignore iphone device state and volume buttons state. I want to play sound anyhow in full volume and also want that user cant modify volume using iphone hardware buttons while sound is played. Does anybody know how to implement it? Please post the code here.......
Thankx in Advance.......
This is not possible (without jailbreaking).
You cannot force the iPhone to change its volume or intercept the hardware buttons. Also you cannot "ignore device state", as you cannot run background apps. So if your app is not running you can't execute any code