ios13

How to stream remote audio in iOS 13? (SwiftUI)

岁酱吖の 提交于 2019-12-20 05:26:16
问题 This code using AVPlayer works only on Playground import AVFoundation var player = AVPlayer() let playerItem = AVPlayerItem(url: URL(string: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3")!) player = AVPlayer(playerItem: playerItem) player.play() When I tried to run it on my SwiftUI App on my physical device, using this code: Button(action:{ var player = AVPlayer() let playerItem = AVPlayerItem(url: URL(string: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3")!

iOS 13 presentation style default

我的梦境 提交于 2019-12-20 03:31:49
问题 In my iOS app I have about 60 present(_:animate:complition) calls from legacy code. iOS 13 just changed the default presentationStyle to Automatic which actually means .formSheet style. Is there a quick way to change the default back to .fullScreen on all the app? maybe like in the infoPlist or some global protocol like UIAppearance Protocol? If there's no way i need to set the presentationStyle manually in 60 places... 回答1: Unfortunately there is no global variable to override to change this

Requesting an In App Purchase in iOS 13 fails

牧云@^-^@ 提交于 2019-12-19 12:24:15
问题 I use SwiftyStoreKit to request In App Purchases and get only this error with iOS 13: Error: Optional(Error Domain=ASDErrorDomain Code=507 "Error decoding object" UserInfo={NSLocalizedDescription=Error decoding object, NSLocalizedFailureReason=Attempted to decode store response}) I cannot request information about the products, nor make purchases with a sand box account. However, it works fine in iOS 12.1 on my device. It does not work with the iPhone 11 simulator or an actual device with iOS

iOS 13: threading violation: expected the main thread

烈酒焚心 提交于 2019-12-19 09:42:22
问题 The app is being crashed when trying to hide the navigation bar for a viewcontroller only for iOS 13 users. I got the crash on Crashlytics of Fabric which titled as below, Fatal Exception: NSInternalInconsistencyException threading violation: expected the main thread The app is being crashed on this line of viewWillAppear method, self.navigationController?.isNavigationBarHidden = true To hide the navigation bar on the viewWillAppear method of UIViewController, I am using below code, override

How to detect iPad and iPad OS version in iOS 13 and Up?

◇◆丶佛笑我妖孽 提交于 2019-12-19 05:18:32
问题 I can detect iOS 13 on iPhone but in iPad OS 13 navigator.platform comes as MacIntel. So it is not possible to get iPad identified using below code, but it works perfectly on iPhone. if (/iP(hone|od|ad)/.test(navigator.platform)) { var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); var version = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; return version; } When we request for mobile website using the browser on iPad navigator.platform returns as iPad and

How to get the status bar height in iOS 13?

北慕城南 提交于 2019-12-18 18:54:28
问题 In iOS 13 UIApplication.shared.statusBarFrame.height warns 'statusBarFrame' was deprecated in iOS 13.0: Use the statusBarManager property of the window scene instead. How do you get the status bar height without using a deprecated API in iOS 13? 回答1: As the warning hints, you can access the statusBarManager which has a statusBarFrame property. This is defined on your UIWindow 's windowScene . let height = view.window?.windowScene?.statusBarManager?.statusBarFrame.height ?? 0 回答2: Try, I have

iOS 13 UISplitView Problems

天大地大妈咪最大 提交于 2019-12-18 16:54:10
问题 On iOS 13 Beta 5, I currently have problems with my UISplitView on iPhones. My app starts with the detailsview off my splitview not with my masterview (look at the picture) Does anyone know how i can fixed this problem under iOS 13? On iOS 12 everything works like a charm ☹️ Thx in advance Sebastian Edit: Sorry for the late answer I was on a short holiday trip without any internet :/ my Class looks like this: class MyClass : UITableViewController, UISplitViewControllerDelegate,

New UINavigationBar appearance in detail pane of UISplitViewController in iOS 13

回眸只為那壹抹淺笑 提交于 2019-12-18 12:57:10
问题 Under iOS 13, if you setup a scrollable root view controller (such as a UITableViewController) in a navigation controller and then put that navigation controller in the detail pane of a UISplitViewController, then the nav bar's background isn't visible when the scrollable content is at the top. You can see this by creating a new iOS project based on the Master/Detail template. Then modify the storyboard to use a UITableViewController inside the detail pane's nav controller. Put the device

Xcode 11 crashing on iPhone 13.1 app running

我的梦境 提交于 2019-12-18 12:55:30
问题 I updated Xcode today (Xcode 11.0), and now it crashes every time I try running any project on my iPhone (iOS 13.1). Already tried: Cleaning derived data Cleaning library cache folder Uninstalling xCode and downloading it again from the store Restarting Mac Restarting iPhone Reconnecting iPhone trough itunes The odd thing is that the Xcode activity doesn't show the "installing app" phase, it goes straight to "Running app on device" and then crashes. Running on the simulator works without a

Navigating Text box on a pdf is not working any more after iOS 13 - seems gestures issue using PDFKIT

天涯浪子 提交于 2019-12-18 09:24:34
问题 I implemented a project I used PDFKIT to do some how adding a floating Textbox on a pdf and it can navigate by users touch on screen using GestureRecognizer to move and put where users decide to. it has worked perfectly before iOS 13, but after it, it does not give you the chance to move the text box and I tried many ways to solve it but all failed. It seems that the problem somehow relates to GestureRecognizer but I am not sure, and also I really do not know how to fix it. I was working on