Posts

Post not yet marked as solved
0 Replies
871 Views
I have a killer app idea, but I need to know if it's possible to watch a TV or PC monitor whilst wearing Vision Pro without any latency. i.e. Imagine playing a console game or PC game but having custom app overlays in 3D spatial world that you can still look at and interact with whilst still watching/playing the game on the 'real' monitor/tv.
Posted Last updated
.
Post not yet marked as solved
0 Replies
2.8k Views
I am playing videos that are in my app bundle.They are playing correctly.However, when I call to dismiss the AVPlayerViewController, it visibly is removed from the view hierarchy but, if I turn off the iOS device and turn it back on again, on the lock screen there is a media control showing that video and a 'play' button.If you touch play you only get the audio and no video.My problem is I don't understand why the 'dismiss' is not completely 'killing' the player when I'm done with it.NOTE: The follow code works perfectly in iOS 13 devices, however any device running previous iOS versions, the error appears as stated. This is blocking me from submitting my app, please can someone advise on how to solve this? Here is the presentation code: internal func play(FileName filename: String, FileType type: String) { if self.isAlreadyPlaying == YES { killVideoPlayer() DispatchQueue.main.asyncAfter(deadline: .now() + 1.5, execute: { self.play(FileName: filename, FileType: type) }) return } let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setCategory(AVAudioSession.Category.playback, mode: .moviePlayback, options: [.allowAirPlay, .allowBluetooth, .allowBluetoothA2DP]) try audioSession.setActive(true) } catch { print("Audio session failed") } let path = Bundle.main.path(forResource: filename, ofType: type) let url = NSURL(fileURLWithPath: path!) let player = AVPlayer(url: url as URL) NotificationCenter.default.addObserver(self, selector: #selector(PBFMenuSystemFloatingButtonsViewController.didFinishPlaying(notification:)), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: player.currentItem) self.playerController = AVPlayerViewController() self.menuWindow.videoPlayer = self.playerController self.playerController?.player = player self.playerController?.allowsPictureInPicturePlayback = true self.playerController?.showsPlaybackControls = YES self.playerController?.delegate = self self.playerController?.exitsFullScreenWhenPlaybackEnds = YES self.isAlreadyPlaying = YES self.present(self.playerController!, animated: true, completion : { self.playerController?.player?.play() }) } Here is the dismissal code: private func killVideoPlayer() { self.isAlreadyPlaying = NO self.playerController?.player?.pause() self.playerController?.player = nil let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setActive(false, options: .notifyOthersOnDeactivation) try audioSession.setCategory(.soloAmbient) } catch { print("Audio session failed") } self.playerController?.dismiss(animated: YES, completion: { self.playerController = nil }) } And here's what's remaining in the systemwide media player that is shown on the lock screen / control centre:
Posted Last updated
.
Post marked as solved
6 Replies
4.7k Views
Hi I have an iOS app that is in the App Store. I've just downloaded Xcode 12 and iOS 14 Beta 1, which I've installed on my Ipad Pro 12.9" Gen 1. In both the Simulator and on the real device, on iOS 14 the launch screen is just black. However, the EXACT same code, run in Xcode 11.5 in the iOS 13 simulator (and the app in the App Store) show the launch screen storyboard just fine. The same code is being opened in both versions of Xcode and no changes are made. I can go back and forth between Xcode versions and the same code works on iOS 13 simulator and breaks on iOS 14 simulator / iPad. There are no errors. No build problems. No warnings. Everything is the same release code that is working in the store, but when ran in Xcode 12 and on iOS 14 Beta 1, the launch screen is totally black. Any help please? I need to ensure compatibility. Thanks
Posted Last updated
.
Post not yet marked as solved
0 Replies
1k Views
I have a UITableViewController instantiated from the Storyboard. I'm presenting it in a UIPopoverViewController.Depending on orientation I either have a side missing or the top missing and the content of the UITableView scrolls 'through' the arrow.The UITVC was created in IB, not changed (no safe area or margin changes from the default). The protype cell has it's 4 sides set to the 'safe area'. I'm not doing anything in code about insets or anything... but this is the result on iOS 13 devices, when it's perfect on pre-iOS 13 devices:These are when it's on the top, but if it presents on the side then the whole side 26EVl.pngI am fully aware that in the 'patch notes' - but not in the documentation, that iOS 13 changed the way the tables are set out with safe areas and the such, but I've not changed anything and I don't know why this isn't working. Please would someone walk me through this new change and how to make my code compliant?Stack post: https://stackoverflow.com/questions/58149863/ios13-uipopoverviewcontroller-showing-uitableviewcontroller-safe-area-problems
Posted Last updated
.