Post

Replies

Boosts

Views

Activity

Wind Down
How to show app accroding activity like sleepmindfulness ? I used this code but my didn't show in wind down that category let playSoundIntent = INPlayMediaIntent.init(mediaItems: nil, mediaContainer: mediaItem, playShuffled: false,playbackRepeatMode: .none,resumePlayback: false) if #available(iOS 14.0, *) {             playSoundIntent.shortcutAvailability = .sleepMindfulness         } else {                     }         playSoundIntent.suggestedInvocationPhrase = "Play Calm Exercise" if let shortcut = INShortcut(intent: playSoundIntent){          INVoiceShortcutCenter.shared.setShortcutSuggestions([shortcut])         }
2
0
396
Mar ’21
How to convert Mac OSX app appearance from LTR to RTL while using arabic localization without changing system Language?
In my Mac OSX app, I am giving option to change application language(localisation), to user, for which I have changed bundle programatically when user change the language. Now the issue is, when choosing Arabic, the texts get converted to arabic text from English but the app still appears in Left to Right instead of Right to Left. I want my app to change from LTR to RTL, without user changing their system language to Arabic. I have also used NSForceRightToLeftWritingDirection, but I need to relaunch my app twice to see the change in app. [[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"AppleTextDirection"]; [[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"NSForceRightToLeftWritingDirection"]; How can I change app appearance from LTR to RTL, without changing system language and without relaunching app twice? Is there any other way I could use instead of using NSForceRightToLeftWritingDirection?
1
0
564
Aug ’21