Deleted
Post
Replies
Boosts
Views
Activity
I was also stuck on this for ages. The new contacts prompt has a brand new separate process so you need to access its elements through XCUIApplication(bundleIdentifier: "com.apple.ContactsUI.LimitedAccessPromptView")
I have the same issue.
Still seems like it's a problem in Xcode 14.2
Asset Catalog Creator is able to apply the macOS 11 style to a square image for you automatically. You can just give it your existing iOS icon. https://apps.apple.com/us/app/asset-catalog-creator/id866571115?mt=12
I've somewhat figured this out. I can get skip to work but I still haven't managed to get play/pause from the keyboard to work.
The thing that I was missing is on macOS you need to update the playing state on MPNowPlayingInfoCenter. It can't just infer it from the AVAudioSession like it does on other platforms.
.i.e.
MPNowPlayingInfoCenter.default().playbackState = .playing
Since I started doing that my app shows up in 'Now Playing' and all the controls work fine there. I just can't figure out why play/pause on the keyboard still doesn't work.
When your audio session is active it steals the playPause press. If when you're done you set your session as inactive you get the playPause back
try AVAudioSession.sharedInstance().setActive(false, options: [])
It is mentioned at the bottom of this page. It doesn't give much detail on how it works from a user's perspective though.
https://developer.apple.com/app-store/app-bundles/