ios13

NSCocoaErrorDomain Code=257 file couldn’t be opened because you don’t have permission to view it : FileManager attributesOfItem returns nil in iOS13

故事扮演 提交于 2019-12-05 06:26:52
FileManager returns permission error while trying to get the file size, in iOS 13 devices. do { let attr = try FileManager.default.attributesOfItem(atPath: my_file_path) //--> Getting nil fileSize = attr[FileAttributeKey.size] as! UInt64 } catch { print("Error: \(error)") } Error returned: Error Domain=NSCocoaErrorDomain Code=257 "The file “trim.1A9FFC19-EE2C-438A-BF3D-97E05A97EF9E.MOV” couldn’t be opened because you don’t have permission to view it." UserInfo={NSFilePath=/private/var/mobile/Containers/Data/PluginKitPlugin/ADB8684E-12B5-451D-A20F-158B899BB3DD/tmp/trim.1A9FFC19-EE2C-438A-BF3D

Compiler error: Invalid library file - CoreLocation

谁都会走 提交于 2019-12-05 03:34:41
I have one of my application, that is created in Xcode 8. I have used CoreLocation and MapKit in that app. I have update app with latest iOS till now. and it was working fine. Now I am updating application with iOS 1 . So I hvae opened app with Xcode 11.0 and updated all the required code. Also updated setting that is suggested by Xcode "Perform Changes" and all that. Now I run application, but I am getting error like : Compiler error: Invalid library file . I have searched lot, but can't find any solution. Is this a bug in new Xcode or new iOS ? Is there anything I have to do extra changes or

App is getting crashed on app launch in iOS 13 beta version

情到浓时终转凉″ 提交于 2019-12-05 01:02:08
问题 Here is the crash report and the crash is only happening on iOS 13 beta version :- Crashed: com.apple.main-thread 0 libsystem_pthread.dylib 0x1ae056484 pthread_get_qos_class_np + 8 1 Foundation 0x1ae664340 -[NSThread qualityOfService] + 80 2 Foundation 0x1ae626ebc -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 280 3 Foundation 0x1ae628df8 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:] + 116 4

How to set Keyboard type of TextField in SwiftUI?

混江龙づ霸主 提交于 2019-12-05 00:51:15
I can't seem to find any information or figure out how to set the keyboard type on a TextField for SwiftUI. It would also be nice to be able to enable the secure text property, to hide passwords etc. This post shows how to "wrap" a UITextField, but I'd rather not use any UI-controls if I don't have to. How to make TextField become first responder? Anyone have any ideas how this can be done without wrapping an old school UI control? To create a field where you can enter secure text you can use SecureField($password) https://developer.apple.com/documentation/swiftui/securefield If you want to

iOS 13.1 UITextView delegate method shouldInteract called when scrolling on attachment

半城伤御伤魂 提交于 2019-12-04 16:29:47
问题 I'm using the UITextView delegate method to do some custom work like opening a in-app browser when user tapping on URL or attachment: func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool In iOS 13, this delegate method is called even when the user is just scrolling upon the URL, which is not expected. This behavior also applied to image attachment. That deleate method now is called via the interaction. *

Chaining animations in SwiftUI

别说谁变了你拦得住时间么 提交于 2019-12-04 14:21:24
I'm working on a relatively complex animation in SwiftUI and am wondering what's the best / most elegant way to chain the various animation phases. Let's say I have a view that first needs to scale, then wait a few seconds and then fade (and then wait a couple of seconds and start over - indefinitely). If I try to use several withAnimation() blocks on the same view/stack, they end up interfering with each other and messing up the animation. The best I could come up with so far, is call a custom function on the initial views .onAppear() modifier and in that function, have withAnimation() blocks

Sign in with Apple - Different behaviour Simulator VS iPhone

回眸只為那壹抹淺笑 提交于 2019-12-04 13:10:44
I'm trying to setup Sign-in with Apple with Xcode (Beta 11.0 beta 6). Works great on simulator, but when I run it on my iPhone (iOS 13.1), I don't get the same display. On Simulator: On iPhone: This is how I call my "Sign in with Apple": - (IBAction)signInWithApple:(id)sender { if (@available(iOS 13.0, *)) { ASAuthorizationAppleIDProvider *appleIDProvider = [[ASAuthorizationAppleIDProvider alloc] init]; ASAuthorizationAppleIDRequest *request = [appleIDProvider createRequest]; request.requestedScopes = @[ASAuthorizationScopeFullName,ASAuthorizationScopeEmail]; ASAuthorizationController

UISearchBar's set_cancelButtonText: ivar is prohibited

元气小坏坏 提交于 2019-12-04 12:50:17
Previously in iOS 12 the same code was allowed, but now when i try to run the same code on iOS 13 it crashes giving me the same error: Terminating app due to uncaught exception 'NSGenericException', reason: 'Access to UISearchBar's set_cancelButtonText: ivar is prohibited. This is an application bug' Which is related to this line of code: searchController.searchBar.setValue("Cancel".localized, forKey:"_cancelButtonText") Now i know the access of setValue is now prohibited but how is it possible to overcome this crash and change the title of cancel button, since there is no property included in

Native cellular call fails on VoIP incoming call in iOS 13

百般思念 提交于 2019-12-04 12:43:11
I have implemented CallKit for audio and video call with VoIP PushKit in iOS and it is working fine in iOS 12 and prior versions, and also it is working fine normally in iOS 13 and 13.1. But it is failing in 2 scenarios: 1) Our App is in foreground state. When cellular call is running and VoIP push is received, then Call kit incoming call screen is showing for 5 - 10 seconds, and then both Cellular and VOIP calls are failing with Alert "Call Failed". 2) Our App is in Background or Killed state. When cellular call is running and VoIP push is received, then both Cellular and VOIP calls are

touchesBegan is called in iOS 12 but is not called in iOS 13

半城伤御伤魂 提交于 2019-12-04 11:38:56
问题 I have a touchesBegan method in my AppDelegate . I use it to detect taps in the status bar. I've had it there for a long time and it's worked great. Until the iOS 13 betas came out... Ever since using iOS 13 touchesBegan has stopped being called. Nothing else related to gestures has changed in my app, nothing in my AppDelegate has changed. I don't really have much to go on other than touchesBegan is called in iOS 12 and not in iOS 13. No luck so far though so I'm sharing this here in case