iOS: Home/Power Pressed Event - ios

If an app is being distributed via Enterprise signing then is there any framework that allow me to receive Home or Power pressed events in background?

All events in iOS are UIEvent that it's a wrapper of GSEvent. With a bit of hacking you should be able to add a callback function of some GSEventRef. Here there are the headers of the framework, or just dump it yourself :)

No unfortunately this is not possible, there are no public API's to achieve this, and from my research there doesn't seem to be knowledge of a private API either.

Related

Connecting to Apple Music

So Im trying to connect to Apple Music from an iOS device using a react native application, There is an API present for doing the same but I need to call a function from the storekit framework ? to make personalised requests.
Apple Music API : https://developer.apple.com/documentation/applemusicapi
Function to be called : https://developer.apple.com/documentation/storekit/skcloudservicecontroller/2909079-requestusertoken
Im not sure how to go about this, I'm a beginner at React Native, could you guys help me out
UPDATE:
So I figured I need to make use of something known as React Native Modules ?
More here : https://facebook.github.io/react-native/docs/native-modules-ios#content
still trying things out, please feel free to add or correct me, this is still a work in progress
Okay so i finally figured this out,
I had to create functions on Objective-C and pass them over to React native using the RNBridge, explained more in 'Native Modules'
So i had to create functions for checking authorization and requesting authorization, and a function to get the User Personalized Music Token,
The developer token used was encrypted on my back-end that is running on python

How to catch all push notifications from other apps on iOS using private frameworks?

I'm looking for a method to detect incoming push notifications directed to other apps on iOS. I know there's probably no way this can be done with public frameworks, but since this is for a personal project, I can use private libraries.
I want to contact via bluetooth an external device every time I get a notification, but I can't program the device itself (so no ANCS). I've looked into the SpringBoardServices and the BulletinBoard private frameworks, but I'm not an expert programmer, so I couldn't figure out a way to use them for my needs... Any ideas? Thanks in advance!
Very interesting question!
I have some ideas which may help you.
Private framework SpringboardServices:
SBSPushStore class
SBSPush*
Then, there is the BulletinBoardService. It's the codename for the Notification Center. And because it shows a list of notifications, it must contain notification data somewhere. I'd take a closer look into this framework.
Finally, my last guess, there is an ApplePushService private framework. I think it receives the remote notifications.
Good luck! Keep us updated :)

iOS - Can an app running in the background send touch / gesture events to another app in the foreground?

I have been asked to develop an app that will record and later "play back" touches and gestures onto another app running in the foreground.
From my experience and knowledge, this is not possible unless both apps are setup to send/receive data between them through notifications or other methods. Also, it would be a huge risk for apps and their data to be exposed to anybody.
I am 99% sure this is not possible, but was just curious if anyone else has come across something similar (or documentation that specifically states this is forbidden).
Nope not possible, no way no how, dont even try.
Expanded answer, if this runs on a jailbroken phone.......
Yes.... but good luck,
check Saurik's Veency code for this sort of functionality, it would have to be refactored signifcantly but basically it allows for virtualization of taps.
https://github.com/iceNuts/TouchTest
http://gitweb.saurik.com/veency.git
if you want to access another application in your iPhone ,you can set the url scheme parameter and so on.You can add callback in your url,then you can return back your application.
It's actually possible with facebook's idb:
https://github.com/facebook/idb/
As it stated:
Remote Automation. idb has a “companion” that runs on macOS and a python client and cli that runs anywhere. This enables scenarios such as a “Device Lab” within a Data Center or fanning out commands to large numbers of iOS Simulators.
As facebook stop support on WebDriverAgent, it's the best option we have right now

VoiceService in iOS

I have a question about understanding event changes in iOS when VoiceOver is enabled. I'm developing some app for blind people.
Unfortunately there is not TTS support on iOS, differently from the Mac OS SDK where you can use NSSpeechSynthesizer objects.
I found VoiceService the is not public. So, in conclusione it seems that no API for speak text is available on iOS.
The question is: How can I notify the user about data processing end?
Here is a user case: User push button, the app make some calculus/process, than should return the result. In Mac this is easy you use speakString:#"Result".
But how can I tell VoiceOver to announce the result??
Excuse me if I was too contort :-)
Thank you very much...
You could use this
if (UIAccessibilityIsVoiceOverRunning()) {
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification,
#"Result has been computed.");
}
VSSpeechSynthesizer is available for the iOS - but it is a private API and as such will likely be rejected from the app store. However you can still make apps for private consumption.
http://iphone-dev-kitchan.blogspot.co.uk/2010/08/text-to-speech-using.html
I consider it being a Private API a bug as it makes creating accessible apps for the partially sighted for instance, harder. I have filed Bug ID #: 9451650 Bug Title: VSSpeechSynthesizer is Private
You can use FliteTTS which is free and reasonably simple to integrate, and still working in iOS5+.
https://bitbucket.org/sfoster/iphone-tts
You could also record a generic message 'Results available' as a wav file and play that. If your message is static (or is from a short list of possible results) you do not need TTS.
iOS6 VoiceOver / Accessibility was mentioned in the WWDC2012 keynote.
See previous answers here (which I have reiterated above)
How can I add NSSpeechSynthesizer Class Reference?
Is there an iPhone API that allows me to use VoiceOver directly in my app?

Programmatically reject a call on the BlackBerry

I'm trying to programmatically reject a call on a BlackBerry, with Java + JDE.
I'm intercepting the callIncoming event, and in there I need to do something to reject a call from a specific number.
Does anyone know how to do that?
I couldn't find an API for directly rejecting the call in progress. However, you could explore a hack where you inject a keypress of the Hangup/Disconnect button (see EventInjector).
As to determining the phone number, you could use Phone.getCall(callId).getDisplayPhoneNumber() or Phone.getActiveCall().getDisplayPhoneNumber().
There is no other way than the EventInjector. The "security" layout of the BlackBerry API does not allow to hang up / reject a call. We tried to find a solution for this issue for 2 years.
Using the incoming call listener, and notification APIs you can reject a call programmatically.
There is a topic discussing it on the blackberry developer forums, you can find it here
try this
How to disconnect a call in blackberry

Resources