How to make a tvos App capture a swipe on the iPhone Remote App? - uigesturerecognizer

I can now (since dec 2015) use Apple's Remote App, for iOS, as a remote control for apple tv4!
I am developing a tvos App. I can swipe on the Remote App to navigate between controls on my settings screen. So far so good.
But the gesture recognisers on my game screen does not recognise the swipes on the Remote App (but they do recognise swipes on Siri Remote).
Question: What should I do to capture swipes from the iOS Remote App?

You can't.
With tvOS 9.1 and v4.2.3 of the Remote app for iOS, the Control screen on the iOS app works the same as a generic remote (e.g. the Apple Remote that comes with the 3rd-generation Apple TV or a third party IR universal remote). Those remotes only support 4-way directional control, not gesture control. More generally, Remote v4.2.3 can only do with a 4th-gen Apple TV the same things it does with 3rd-gen Apple TV.
The Remote app translates the gestures you make on your iOS device into a 4-way directional command (or select/play/pause, fast-forward, or another of the few commands generic remotes support), then sends that command to the Apple TV. It doesn't pass touch inputs along to the Apple TV the way the Siri Remote does.
However, Apple has been talking to the press about possible future changes.
Directional "button" inputs, whether from an Apple Remote, third-party hardware remote, or the Remote iOS app, are UIPress events, just like the Select, Menu, and Play/Pause buttons on the Siri Remote. As such, you can handle them in pressesBegan:withEvent: or with the allowedPressTypes property of a tap gesture recognizer. You can even set up the latter in Interface Builder:
Note that swipes on the Siri remote don't count as directional button presses, so if you're doing swipe gesture recognizers and want a directional button press to do the same thing, you need to recognize both separately.

Related

Is it possible to add a mobile operator to Xcode iPhone simulator?

So I need to add a mobile operator to Xcode simulator. Currently it looks like this
And i want it to be like this
So my question is if there's a way to do it in the Xcode simulator and if so how?
The status icons you see depends on the model of the iPhone. According to this page, phones that use Face ID do not display the carrier in the status bar, and phones that use Touch ID do.
iPhone models with Face ID
iPhone models with Touch ID
So just go to File -> Open Simulator, and select a different simulator that uses Touch ID, such as iPhone SE.
Also,
If you can't see an icon, check Control Centre by swiping down from the top right-hand corner.
I don't think so that you can achieve exactly same that you posted in question but in iOS we have flexibility to change simulator status bar like battery level, time, WiFi state, cellular state.
this feature is called simctl you can Google more details about it.
to specifically change status bar use simctl status_bar
I dont think u can add mobile cause of similator doesn't have SIM card. operator.Similator can work as a real device as coding, but it does not contain all the features of the real device. Simulator is a program and other device.
If you want to do something for a feature that can only be on a real device try this with a real device like mobile operator operations
It's similar to taking a photo from the phone and uploading it to the app. The simulator does not have a camera feature, so if you try to open the camera in the simulator, the application will crash. You need to test this on a real device

Detect headset button press in swift 5 Xcode

I want a single view application which detect button click of iPhone headphone for below situations:
original iPhone headset
AirPods Pro via Bluetooth
I tested several code in stack overflow but they didn’t help me. may I should active permission as well

Key bindings in nativescript

I am building android app using nativescript,
My apk will be installed on Android TV
How do I configure my nativescript app to be navigatable by remote/fly air mouse keys?
For example I have remote for my android tv like this one
I want to bind UI actions with UP, DOWN, LEFT, RIGHT & OK keys
Also want app to take input by numeric keys 0 to 9,
just like we navigate to a channel on regular tv.

Xcode Simulator and Magic Trackpad

I just would like to know whether Xcode Simulator enable Force Touch functionality, adding the new Apple Magic Trackpad 2 to an iMac (my mac is a middle 2011 model). I need to simulate this feature, saving the money to buy a new MacBook that has it embedded.
Yes. Magic Trackpads can be used to send force levels to iOS want watchOS simulator devices.

Pass NSWindow from Apple script to Cocoa

In my Cocoa app, I need to refer to another window. After searching about it a bit, it looks like that I need to use Apple scripts to do that. My question is that can I return the window of another app as a NSWindow from the Apple script to my Mac app. I've seen some Apple script samples, but not sure how to pass a value from the Apple script to the Cocoa app.
(We have a Mac touchscreen bought recently and there, in order for the touches to get detected in my unity app (through the SDK given for the Touch screen), I need to get that Unity Window and pass it to the touchscreen methods. I'm totally new to Mac development, so I can't figure out how I can pass another Window as a NSWindow to the touchscreen SDK)

Resources