ios13

SKStoreKitReviewController and Darkmode

旧巷老猫 提交于 2020-02-21 09:56:26
问题 Is there any way to alter the colors/tint of an SKStoreKitReviewController? When I am modifying my apps to support DarkMode, when in dark mode, the presented viewController does not look good. 回答1: This issue was resolved in iOS 13.2. The blur effect is dark, just like other system alerts when Dark Mode is enabled. 来源: https://stackoverflow.com/questions/57763132/skstorekitreviewcontroller-and-darkmode

SwiftUI @Binding Initialize

回眸只為那壹抹淺笑 提交于 2020-02-14 03:11:27
问题 Been playing around with SwiftUI and understood the concept of BindableObjects etc so far (at least I hope I do). I bumped into a stupid problem I can't seem to find an answer for: How do you initialize a @Binding variable? I have the following code: struct LoggedInView : View { @Binding var dismissView: Bool var body: some View { VStack { Text("Hello World") } } } In my preview code, I want to pass that parameter of type Binding<Bool> : #if DEBUG struct LoggedInView_Previews :

NSItemProvider loadItem method returns _NSItemProviderSandboxedResource instead of URL

女生的网名这么多〃 提交于 2020-02-03 07:33:53
问题 In one of the apps I develop, I use a share extension to import Wallet passes (PKPass). On iOS 13 (including the latest beta 8), when calling the share extension from within the iOS Mail app, the extension is not receiving the data in the expected format (URL). This is the relevant snippet from the share extension’s ShareViewController: if let inputItems = self.extensionContext?.inputItems, let inputItem = inputItems.first as? NSExtensionItem, let attachments = inputItem.attachments, let

NSItemProvider loadItem method returns _NSItemProviderSandboxedResource instead of URL

安稳与你 提交于 2020-02-03 07:33:46
问题 In one of the apps I develop, I use a share extension to import Wallet passes (PKPass). On iOS 13 (including the latest beta 8), when calling the share extension from within the iOS Mail app, the extension is not receiving the data in the expected format (URL). This is the relevant snippet from the share extension’s ShareViewController: if let inputItems = self.extensionContext?.inputItems, let inputItem = inputItems.first as? NSExtensionItem, let attachments = inputItem.attachments, let

iOS 13 update broke my app's keyboard on its first display

随声附和 提交于 2020-01-30 11:25:29
问题 I'm updating an app developed for iOS 8 (kinda old), but I'm having issues on the first time the keyboard is being displayed after recent iOS 13 update: Keyboard appears as an effect of calling [textfield becomeFirstResponder], regardless if it's being called explicitly in the code (into the viewDidLoad method) or implicitly when the field is tapped, but only occurs the first time it appears after the view itself appears. I'm "solving" it calling [textfield becomeFirstResponder] and

Will “Sign in With Apple” allow apps to be backward compatible with iOS 12 and lower?

我们两清 提交于 2020-01-30 05:01:52
问题 Does implementing the new Sign in With Apple feature make an app incompatible with iOS 12 and below, similar to SwiftUI? Will it be possible to compile an app which has to import AuthenticationServices on something like XCode 10 ? 回答1: Sign in With Apple itself doesn't make the whole app incompatible with iOS 12 and lower (the same is for SwiftUI). But when you need to support this kind of feature (which available on iOS 13 only) you'll need to use @available(iOS 13.0, *) attribute and if

Read UID from NFC mifare tag iOS 13

蹲街弑〆低调 提交于 2020-01-25 08:14:39
问题 I'm trying to read the UID for a mifare tag. Looking at examples, I see the following method a lot: func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { if case let NFCTag.miFare(tag) = tags.first! { print(tag.identifier as NSData) } } However when putting that into my project, the method is not called. I also noticed xCode giving a warning that this nearly matches an optional protocol which is the same except it uses NFCNDEFTag instead of NFCTag .. When I try

Registering Bluetooth BR/EDR (Classic) connection in iOS13

蓝咒 提交于 2020-01-25 06:59:44
问题 From iOS 13 it should be possibile to register for connection events of BR/EDR Bluetooth (Classic) devices. I have followed the instructions provided in the WWDC keynote, in particular I init my CBCentralManager in this way: func initCentralManager() { if self.centralManager == nil{ self.centralManager = CBCentralManager.init(delegate: self, queue: nil, options:[CBCentralManagerOptionRestoreIdentifierKey:"myCentralManagerIdentifier"]); if #available(iOS 13.0, *) { let matchingOptions =

Can I retain a socket connection in the background for longer than 30 seconds?

人走茶凉 提交于 2020-01-25 06:53:05
问题 I am experiencing a difficulty with background socket connections under iOS 13. I have been using UIApplication.shared.beginBackgroundTask{ ... } to make sure my socket connection survives app's transitioning to background[1]. Up to iOS 12 this gave me a few minutes of background activity, which worked just fine. As of iOS 13 this is no longer the case. Under iOS 13 the old API gives me only a 30-second background task, while I need up to 2 minutes of uninterrupted socket connectivity. I have

Can I retain a socket connection in the background for longer than 30 seconds?

拟墨画扇 提交于 2020-01-25 06:51:04
问题 I am experiencing a difficulty with background socket connections under iOS 13. I have been using UIApplication.shared.beginBackgroundTask{ ... } to make sure my socket connection survives app's transitioning to background[1]. Up to iOS 12 this gave me a few minutes of background activity, which worked just fine. As of iOS 13 this is no longer the case. Under iOS 13 the old API gives me only a 30-second background task, while I need up to 2 minutes of uninterrupted socket connectivity. I have