On IOS using Objective-C and/or React Native how can you get a notification in your app when someone set an Accessibility feature? - ios

I would like to know when a user sets an Accessibility feature to on. Currently there's only a check during startup but if it's set to on/off after the application starts then there's no knowledge of the change in the application.
Is there an event or callback for IOS that'll let the application know when the setting changes?
This application also uses React Native, C++, and Objective-C.

Related

How can you use iOS 16's UIPasteControl with React Native?

iOS 16 introduces UIPasteControl as a way of avoiding the paste permission dialog appearing when an app programmatically accesses the clipboard contents.
To enable UIPasteControl, its target needs to be set to an object that conforms to UIPasteConfigurationSupporting, so typically a UIResponder like UIViewController or UIView. Then you would ensure the object's pasteConfiguration is set to allow the types you want to paste.
I've got a React Native app so there are no native iOS UIView etc. type objects being used directly.
If, for example, a paste button was to be added to a React Native view, then how can that be hooked up so that its using UIPasteControl?
If we consider the latest version of react native, there might we not see the functionality for UIPasteControl as per new iOS versions.
for this, I guess we should create our implementation and export the functionality to react-native to accomplish this requirement.
If you have hands-on experience with iOS native development and custom native UI views implementation in React Native then you can check out the following blog about the UIPasteControl implementation in native, to implement it natively and export it to React Native.
UIPasteControl(Native) demo : https://blog.kylelanchman.com/how-to-use-uipastecontrol-in-ios-16/

Is their an equivalent of react natives "Hot Reloading" for native iOS Simulator development?

I'm wondering if there is a way to see UI changes in an iOS application without having to restart the device or simulator. I know in react native since they use Javascript you're able to make a change to the background colour of a view and the background would reflect that change without having to restart the simulator. So I'm thinking since react native just converts javascript into native app code this might be possible in Native Development? Yes no maybe?
Doing normal native iOS development in the typical way -- no.
But, if you reproduce what ReactNative is doing (defining a data format for UI, loading it, and then wiring it up dynamically), then you can re-create it.
You might want to look into SwiftUI, which gives you a way to preview in Xcode without running the entire app.
Without that, if you use modules for all your UI code, you could incorporate a playground and see live changes as you code as well.

Allow user to change App Icon in React Native

Apple specifies that users can change their icon to give a more personalised experience. See docs here:
https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/#user-selectable-app-icons
My question is regarding using this functionality in React Native. Building an app in React Native is it possible to access this setAlternateIconName method and provide the user with alternate app icons? Does React Native provide a nice way to interact with this IOS method?
I am currently trying to build this out. This package seems designed to do what we both are looking for, but I haven't tried on anything that I have actually deployed yet.
https://github.com/skb1129/react-native-change-icon
use can use this module react-native-alternate-icons, it allows to access to setAlternateIconName method

How to dismiss or suppress permission issue automatically related to Contacts, Camera, Microphone in iOS Application

I have been working on a project wherein i made a framework where i automatically test the SDK my company is developing.
I have created my dummy sample application for all the platforms(iOS, Android, OSX, Windows) which makes use of this SDK and i thereby test this SDK, call the SDK API's do my work.
Now my question is for iOS i get permission alerts for Contacts, Camera and Microphone first time whenever i use the API's of my SDK which internally is invoking something in iOS framework. Is there a way i can automatically give this permission to my application ?? i know it's iOS own Security concern and it's correct. But how do i bypass it.
I see there is Apple's XCUITest framework but i don't want to open my application via it.
Right now i handle this alert manually but i need to implement Continuous Integration(using ios-deploy), i have done everything but i can't handle these alerts automatically.
Can someone please help me.. Thanks!!

Open Siri using private API's in iOS 8

I want to make an app that won't be released on the App Store. I want this app to open siri through private API's, basically inject a home button press and hold into the events queue. I have tried using GSEvent(GSSendEvent - Inject Touch Event iOS), but it no longer works(it silently fails) after iOS 7. I believe it is possible through SBUIController but I can't figure how to use SBUIController in iOS 8. To be clear, I want to do this on a non-jailbroken phone.
How can I go about doing this in iOS 8?
Thanks
You should check out the runtime headers of all the private/public apis here.
I found a method hidden in accessibility, which could possibly work in your case. Have a look at it here: http://git.io/frK6Sw . The method is named -(void)openSiri, which suggest that it might open Siri, I haven't tried though.

Resources