ios13

SwiftUI @State and .sheet() ios13 vs ios14

[亡魂溺海] 提交于 2021-02-03 12:44:10
问题 Hello I am running into a problem here and I do not have a consistent behavior between my .sheet() view when running on ios13 or ios14 I got a view like this : @State private var label: String = "" @State private var sheetDisplayed = false ///Some code var body: some View { VStack { Button(action: { self.label = "A label" self.isDisplayed = true }) { Text("test") } }.sheet(isPresented: $sheetDisplayed, onDismiss: { self.label = "" }) { Text(self.label) } } On ios 13 this work as expected btn

Action from local notification not working in iOS 13

核能气质少年 提交于 2021-01-29 19:34:12
问题 I am using local notification using the UserNotifications framework in which I have two action buttons. Now I want to perform one task upon selecting that action button. My query is whether I need to run this task in the background? As I am sending this local notification based on geofence triggering when my application is not even running and in a killed state. Configure User Notification Center localCenter.delegate = self localCenter.requestAuthorization(options: [.alert, .badge, .sound]) {

How to access goBack and goForward via UIViewRepresentable

泪湿孤枕 提交于 2021-01-29 11:31:45
问题 I have added a WKwebview in SwiftUI via UIVewRepresentable. I am having difficulties getting some buttons to make the web view go back and go forward. Below is the two classes I have made but I am not even getting print to work ( maybe a bug? ). import SwiftUI import WebKit struct Webview : UIViewRepresentable { let request: URLRequest func makeUIView(context: Context) -> WKWebView { return WKWebView() } func updateUIView(_ uiView: WKWebView, context: Context) { uiView.load(request) } func

Getting SSID of the connected wifi network in Xamarin.iOS, iOS 13

本小妞迷上赌 提交于 2021-01-29 08:44:43
问题 After passing from iOS 12 to 13 I am no more able to get the SSID of the connected wifi network. I tried the solution for iOS 13 proposed in this question but with no result. My previous successful code for iOS 12 (moreover 'CaptiveNetwork' is deprecated now): if (CaptiveNetwork.TryGetSupportedInterfaces(out string[] supportedInterfaces) == StatusCode.OK) { foreach (var item in supportedInterfaces) { if (CaptiveNetwork.TryCopyCurrentNetworkInfo(item, out NSDictionary info) == StatusCode.OK) {

iOS 13 reason: 'Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push callback.'

北战南征 提交于 2021-01-29 06:02:15
问题 From many days I am stuck at this problem... AnyHashable("aps"): { alert = { action = test; body = "{\"action\":\"connect\",\"meetingId\":\"mdkdkkydjgedjhd\",\"from\":\"sender\",\"fromToken\":\"9d739e878521cf770d9e5136161cf7611c242ef2a8b53c83c81b6b6021a7b31b\",\"to\":\"receiver\",\"toToken\":\"e65bf5e3d6a3e440eb364fb620539de4f4c2c1bf98be5f753f5abfbe7fecea74\",\"callUUID\":\"9EB823F3-F857-490B-BCFC-373D05E56933\"}"; title = Call; }; }] This is the payload which I am receiving and raising an

Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2.4 compiler

萝らか妹 提交于 2021-01-28 23:44:41
问题 After updating to Xcode 11.5, I cannot import My Universal framework. Basically, I have created one framework and also generated the universal framework. The framework was compiled in the lower version of Swift (Swift 5.1). It worked fine previously. While importing the same framework in the same project in XCode 11.5 (Swift 5.2), it throws the following error. Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2.4 compiler I have already marked the Build Libraries for

Removing scheduled local notification

别等时光非礼了梦想. 提交于 2021-01-28 23:41:26
问题 I know there are plenty of similar questions and answers, and I reviewed them all, but still cannot find the solution. Despite of removing a scheduled notification from UNUserNotificationCenter it still gets triggered. I create local notification as follows: let aDF = DateFormatter() aDF.dateFormat = "yyyy-MM-dd HH:mm:ss" var identifierST = "" if update == true { identifierST = myCoreDataEntity.notificationUID! } else { identifierST = aDF.string(from: Date()) } let notif =

Removing scheduled local notification

人盡茶涼 提交于 2021-01-28 22:38:08
问题 I know there are plenty of similar questions and answers, and I reviewed them all, but still cannot find the solution. Despite of removing a scheduled notification from UNUserNotificationCenter it still gets triggered. I create local notification as follows: let aDF = DateFormatter() aDF.dateFormat = "yyyy-MM-dd HH:mm:ss" var identifierST = "" if update == true { identifierST = myCoreDataEntity.notificationUID! } else { identifierST = aDF.string(from: Date()) } let notif =

Xcode 11 Firebase auth for Mac app has error An error occurred when accessing the keychain

雨燕双飞 提交于 2021-01-28 09:14:24
问题 I am turning iOS app to Mac app, when I run Xcode for My Mac , I was trying to login my app on Mac, when I press button login, below Error shows: An error occurred when accessing the keychain. The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo dictionary will contain more information about the error encountered MacOS: 10.15.1 Xcode: 11.2.1 It works totally fine on iPhone simulator or real iPhone, it only occurs when I try to run on Mac I think this is a issue that

UIImageJPEGRepresentation and UIImagePNGRepresentation returns nil in iOS 13

馋奶兔 提交于 2021-01-28 07:31:47
问题 In my app I'm using the image picker to select an image on an iPhone. After the image was selected, I do: data = UIImageJPEGRepresentation(image, 1.0); On iOS 12.4.1 and below, everything works fine, if I pick either PNG or JPEG image. On iOS 13, JPG works fine, but PNG does not. If I pick a JPG: data = UIImageJPEGRepresentation(image, 1.0); // works data = UIImagePNGRepresentation(image); // works But if I pick a PNG: data = UIImageJPEGRepresentation(image, 1.0); // data is nil data =