ios13

Is it possible to opt-out of dark mode on iOS 13?

核能气质少年 提交于 2019-12-17 03:47:11
问题 A large part of my app consists of web views to provide functionality not yet available through native implementations. The web team has no plans to implement a dark theme for the website. As such, my app will look a bit half/half with Dark Mode support on iOS 13. Is it possible to opt out of Dark Mode support such that our app always shows light mode to match the website theme? 回答1: First, here is Apple's entry related to opting out of dark mode. The content at this link is written for Xcode

didRegisterForRemoteNotificationsWithDeviceToken not called in ios8, but didRegister…Settings is

空扰寡人 提交于 2019-12-17 03:41:27
问题 I followed this thread, but the method didRegisterForRemoteNotificationsWithDeviceToken is still not called : the documentation says : After you call the registerForRemoteNotifications method of the UIApplication object, the app calls this method when device registration completes successfully didRegisterUser appears well, but not did register notif . Here is my code in the AppDelegate (the app version is 8.1) : - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:

iOS 13 | Xcode 11 | NSData

会有一股神秘感。 提交于 2019-12-13 20:24:52
问题 I am in confusing in iOS 13 with keychain access. CFDataRef passwordData = NULL; OSStatus keychainError = noErr; keychainError = SecItemCopyMatching((__bridge CFDictionaryRef)returnDictionary, (void *)&passwordData); NSString *password = [[NSString alloc] initWithBytes:[(__bridge_transfer NSData *)passwordData bytes] length:[(__bridge NSData *)passwordData length] encoding:NSUTF8StringEncoding]; after execute above code segment, password variable value is {length=32,bytes

iOS13 Provisional Location Permission

谁都会走 提交于 2019-12-13 11:22:10
问题 Since apple has deferred the "Always Allow" permission and only OS can and will ask for that permission based on its own convenience, it is hard to understand what all the scenarios are. If you see the WWDC video: https://developer.apple.com/videos/play/wwdc2019/705/ The guy clearly says at 04:14, "you ask for requestAlwaysAuthorization, apple provides you with the max option of "While In Use", but at the same time the delegate callback says, the app has "Always Allow permission"". This works

How to prevent overlays on the map from disappearing when zoom scale changes in swift?

随声附和 提交于 2019-12-13 04:18:55
问题 I am trying to render an overlay (polygon) on the map using swift MapKit. I can render successfully but when I zoom out too much then zoom in again, all the rendered polygons get disappear. How can I prevent that from happening and force the rendered polygons to stay on the map at all zoom scales? I am using MapKit and MKPolygonRenderer. I add the polygons to the map using the following method in my viewController: // function to add polygon overlay to the map private func addPolygonsToMap()

RXSwift: Modifying URLRequest if request fails in `retryWhen`

强颜欢笑 提交于 2019-12-13 03:37:20
问题 I need to modify the headers of the request when the request fails but the request doesn't change when I modify the request in retryWhen Here is my implementation: func makeRequest(serviceRequest: URLRequest) { let maxRetry = 2 var localRequest = serviceRequest request(request: localRequest).retryWhen { errors in return errors.enumerated().flatMap { (arg) -> Observable<Int64> in localRequest.setValue("someValue", forHTTPHeaderField: "someKey") let (index, error) = arg return index <= maxRetry

Xcode 11 GM Seed 2 freezes while building workspace/project

拥有回忆 提交于 2019-12-13 03:18:19
问题 I have recently downloaded new Xcode 11 GM Seed 2 so that i can update my project to support Dark mode. (I am already on MacOS Catalina latest beta version-19A558d). I have my project(workspace with pods) working 100% fine with Xcode 10.2. When I have started building same project with newly installed Xcode 11 GM Seed 2 , It randomly freeze while building with title Building X of Y tasks . It randomly stops building any file at anytime. As per my different observations, It stops building

Can't open app on Simulator MacOS Catalina

自古美人都是妖i 提交于 2019-12-13 01:06:07
问题 I can't install app on my simulator after update to MacOS Catalina , it was fine on earlier versions. But Now when I try to run the app installed in the simulator I get this popup. I have changed system Security & Privacy setting using this command in the terminal sudo spctl --master-disable and now my it looks like this. But even after this I can't run the app, any idea, suggestion ? My Xcode version is 11.1 & target iOS version is 13.1 , app runs smoothly when ran using xcode, but exported

iOS 13 Modals - Calling swipe dismissal programmatically

≡放荡痞女 提交于 2019-12-12 10:16:59
问题 I'd like to detect a modal dismissal in the view controller that's presenting the modal. This method works amazing for detecting the new iOS 13 swipe dismissal on the new card modals: override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "MyIdentifier" { segue.destination.presentationController?.delegate = self } } extension MyController: UIAdaptivePresentationControllerDelegate { func presentationControllerDidDismiss(_ presentationController:

TextField always on keyboard top with SwiftUI

五迷三道 提交于 2019-12-12 10:15:34
问题 i have this struct ContentView: View { var body: some View { ZStack(alignment: Alignment.bottom) { List { Text("Default text").foregroundColor(Color.red) } TextField("Placeholder", text: .constant("")) .frame(minHeight: 30) .cornerRadius(8.0) .padding(10) .background(Color.blue) } } } Actually, when i focus on the TextField, keyboard hide this textfield. Is there a simple solution in SwiftUI to keep the textfield always on keyboard's top ? 回答1: Here is a snippet that observes