How to programmatically set the upper text across all Apps? - ios

I will word this question embarrassingly awkward and primitive as I have spent ten minutes searching for the answer and failed miserably. Please help/nudge to resolve!
Desired IOS Feature
Setting the upper navigation bar over all Apps to a custom color and text value that navigates to a specific App when tapped
Example
The App SleepCycle when it is set to Alarm-Clock mode, and when the User is in any other App other than SleepCycle. The top of the screen then becomes red with the text 'SleepCycle' and when you single-tap it you navigate to SleepCycle
Question
What is this feature called and how do you programmatically implement it?

When I've dabbled with this in the past, the hack(?) I used was to register as a Voice Over IP / audio app in Background Modes. WARNING: I have never tried to ship such an app to the App Store, as it seemed like a dubious approach.

Related

SwiftUI: Accessibility sound feedback for a draggable element

I am making an application that works essentially like a simple Drag-and-Drop Playground with the command blocks on the left and a droppable area on the right. I want to make it fully compatible with VoiceOver and I'm running into trouble with some of the accessibility aspects since this is my first Swift application.
This is what the playground currently looks like: (App Screenshot)
My goal is to provide the users with audio cues/feedback while they are dragging the elements to help them figure out what part of the screen they are currently at. The ideal functionality would be exactly like what one uses when editing an iOS device's Home screen (the arrangement layout of the apps).
When trying to rearrange apps on the home screen with VoiceOver enabled, you hear a row/column alert when you are dragging an app over an open area. I want a similar type of feedback that says "Droppable Area" when you are over the correct area (see scenario 1).
When trying to rearrange apps on the home screen with VoiceOver enabled, you hear a sound when you tap on an area that has no app icon. (This also happens when you are not editing the layout and simply tap on an open area with no app.) I want that noise to be what you hear when you drag a command over an area that is not droppable (see scenario 2).
Any ideas on how this might be possible or good references to look at?

Simulate Braille display

We've received reports from users that our app doesn't work correctly in iOS VoiceOver when using a Braille display. I've tested our app on iOS VoiceOver with sound, and it works correctly.
Is there a way to simulate a Braille display to reproduce this issue?
I noticed you said the radio buttons are the issue. This is sadly an iOS 12.x accessibility issue, and one I reported repeatedly to Apple. ALL radio buttons, checkboxes, text areas, and text fields which do not use external labels in text appear as unlabeled on the braille display.
This issue started at iOS 12.0, and as of yet (iOS 12.1.2) still exists. Note that, as described, when only using voice the issue doesn't exist it's solely braille display. There's no way developers can fix it directly - it's up to Apple.
There's a developer side workaround: Use normal text above the control to label it. Unelegant, I know.
Then there's a user side workaround: 4 times tap with 3 fingers copies last spoken text to clipboard, which will display the correct label for each control, but is obviously tedious.
Lastly, I found that if jumping to bottom of screen and scrolling up, the labels appear on the braille display - but disappear when scrolling back down. The displayed label belongs to the control above it.
Regards - a frustrated deafblind user & developer who can only use braille display and is slowly losing faith in Apple's accessibility.
PS. PLEASE report this to apple using the device feedback or some other way so this issue might get more attention - it's a HUGE accessibility issue for braille display users, so something Apple really should fix...

Dim brightness programmatically below Apple authorization

I'm developing an app where a screen need to be as dark as possible (the app need to run in a room all night long).
I already set a black background and the brightness to 0 using :
UIScreen.main.brightness = (0.0)
But it's still too bright for a good comfort of use.
I've searched around the internet and found
UIScreen.main.wantsSoftwareDimming = true
That I put before my previous code line, but nothing changed.
I've tried the trick with accessibility settings and zoom things, that works well, but that's not a way I'm allowed to use.
So, I'm a bit out of idea and any help would be appreciated.
Is it even still possible to do it?
Is it possible to turn off the backlight? (That would be the best)
It is possible to keep an app running when the screen is off by setting the UIApplicationExitsOnSuspend flag in your Info.plist.
It will only work if your app is in the foreground when the screen is turned off and it will disable any background mode for your app.

Swift adding custom keyboard or numpad in app

What types of restrictions is there when adding a custom keyboard or numpad in an app?
I know that some apps requires you to enable keyboards in your system settings.
I recently saw an app using this keyboard:
The app does not require you to activate the keyboard. So how can I make my own custom numpad like this one?
Feel free to share any tutorials/libraries
thanks,
There's a great swift keyboard/calculator tutorial out there that will serve as a starting point for what you're doing:
http://code.tutsplus.com/tutorials/ios-8-creating-a-custom-keyboard-in-swift--cms-22344
In terms of "restrictions", you can add the keyboard to the parent app without any problems. If you want to make your keyboard available in OTHER apps, then you will need to adhere to the restrictions that Apple lays out on this page: https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html - search for "trust"
Swift and Xcode are both moving targets that are updated more often than a project can be completed! So be ready to deal with constant updates as you go through the learning curve. Sometimes the time it takes for a client to approve something is enough time for the Swift/xCode/iOS paradigm to change enough to require you to "fix" things that already worked before submitting for approval. Just row row gently down the stream.

iOS 8 Interactive notifications not showing buttons by default

I'm working with the new interactive notifications in iOS 8; it fails to get the action buttons (in "banner mode") to show up by default. As it is now I have to slide down on top of the notification to see them.
Is this the default behavior, or is my code rotten?
For the images below I am using XCode 6.1.1 + iOS 8.1 (Simulator)
What I get:
What I want:
This is the default behaviour and no problem with your code.
For more details refer to the below tutorial, result is same as yours.
http://www.thinkandbuild.it/interactive-notifications-with-notification-actions/
Its a default behaviour. Don't worry about this. Apple says:
When a notification is delivered, the system displays a button for each custom action associated with the notification. Tapping a button launches your app (either in the foreground or background) and gives you a chance to perform the indicated action. You use this class to specify the text that is displayed in the button and the information your app needs to perform the corresponding action.
The options are not default behaviour. That can be done via - UIUserNotificationCategory
Refer this WWDC video - https://developer.apple.com/videos/wwdc/2014/?include=713
It's pretty straight forward and easy to implement. Let me know if you face any issues.
Everything is behaving normally. All that needs to be done is to drag down the bottom horizontal bar in the banner and the action buttons would be visible in the banner.
PS - As of iOS8. Once iOS9 comes in in a few more days, no guarantees if this is how it will still be.

Resources