ios13

PHImageResultIsDegradedKey/PHImageFileURLKey is not found

…衆ロ難τιáo~ 提交于 2019-12-03 14:47:43
iOS 13 beta4 no longer gives 1) PHImageFileURLKey 2) PHImageResultIsDegradedKey in image result info keys. Anyone knows a way to find the fileurl of the PHAsset? You have to use this function from PHAsset object: - (PHContentEditingInputRequestID)requestContentEditingInputWithOptions:(nullable PHContentEditingInputRequestOptions *)options completionHandler:(void (^)(PHContentEditingInput *__nullable contentEditingInput, NSDictionary *info))completionHandler; Then you can retrieve URL this way: NSURL *url = contentEditingInput.fullSizeImageURL; Some example Objective-C code for anyone else

UIDocumentBrowserViewController error “Cannot create urlWrapper for url” on iOS13 simulator

家住魔仙堡 提交于 2019-12-03 12:55:07
问题 I have a very strange problem with UIDocumentBrowserViewController when testing on iOS 13. The importHandler(newDocumentURL, .move) seems to crash without any reason : [DocumentManager] Cannot create urlWrapper for url file:///.../tmp/23720D22-BC1D-4E7B-A7AE-A1C8B0293F9E.txt. error Error Domain=NSPOSIXErrorDomain Code=22 "couldn't issue sandbox extension com.apple.app-sandbox.read-write for '/.../tmp/23720D22-BC1D-4E7B-A7AE-A1C8B0293F9E.txt': Invalid argument" UserInfo={NSDescription=couldn't

iOS13: how to detect a status bar click event?

為{幸葍}努か 提交于 2019-12-03 09:40:53
问题 In my appDelegate, I override touchesBegan to detect when the status bar is clicked: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; CGPoint location = [[[event allTouches] anyObject] locationInView:kWindow]; CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; if (CGRectContainsPoint(statusBarFrame, location)) { ///do something } } Before iOS 13, this worked; on iOS 13, it does not. The method is never

Xcode fails to Build on real iOS device running iOS 13

天大地大妈咪最大 提交于 2019-12-03 09:28:06
问题 I'm currently updated my iPhone XS Max to iOS 13.0.17A5492t Beta version. My mac running on Mac OS Catalina and Xcode is on latest stable version not beta >> Version 10.2.1 (10E1001) . When i try to build my apps on my real device i get this compile error: This iPhone XS Max is running iOS 13.0 (17A5492t), which may not be supported by this version of Xcode. What i've done Download iOS 13.0 Developer Disk Image from repo. Pasted in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS

didFinishPickingMediaWithInfo returns different URL in iOS 13

感情迁移 提交于 2019-12-03 09:08:40
- (void)videoPickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<UIImagePickerControllerInfoKey,id> *)info returns different URLs in iOS 13 and the other iOSs. Any idea why this might be happening? iOS 13: file:///private/var/mobile/Containers/Data/PluginKitPlugin/0849234B-837C-43ED-BEDD-DE4F79E7CE96/tmp/trim.B8AB021D-F4B6-4E50-A93C-8B7F7FB40A1C.MOV < iOS 13: file:///private/var/mobile/Containers/Data/Application/5AE52A95-6A2F-49A5-8210-D70E022E9A05/tmp/5A8D81B5-FC42-4228-9514-CD998A4E7FA9.MOV This caused me to have an error since I don’t have

iPadOS: Network connected via NEHotspotConfiguration disconnects after a while

你离开我真会死。 提交于 2019-12-03 08:50:11
问题 My app uses NEHotspotConfigurationManager to connect itself to a certain device using a Wi-Fi. The device acts as an WPA2 access point. In older iOS versions (iOS 12 and lower) everything worked fine, but in iPadOS/iOS 13 the device is being disconnected after a while every single time. How to keep a connection on without storing NEHotspotConfiguration permanently? I suspect that it has something to do with a new feature - Multiple Windows (which is not supported by my app). The reason is

SwiftUI ScrollView: How to modify .content.offset aka Paging?

拈花ヽ惹草 提交于 2019-12-03 07:30:33
问题 Problem How can I modify the scroll target of a scrollView? I am looking for kind of a replacement for the "classic" scrollView delegate method override func scrollViewWillEndDragging(scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) ...where we can modfify the targeted scrollView.contentOffset via targetContentOffset.pointee for instance to create a custom paging behaviour. Or in other words: I do want to create a paging effect in a

SwiftUI - Half modal?

≯℡__Kan透↙ 提交于 2019-12-03 05:56:53
问题 I'm trying to recreate a Modal just like Safari in iOS13 in SwiftUI: Here's what it looks like: Does anyone know if this is possible in SwiftUI ? I want to show a small half modal, with the option to drag to fullscreen, just like the sharing sheet. Any advice is much appreciated! 回答1: As of Beta 2 Beta 3 you can't present a modal View as .fullScreen . It presents as .automatic -> .pageSheet . Even once that's fixed, though, I highly doubt they will give you the drag capability there for free.

How to detect device name in Safari on iOS 13 while it doesn't show the correct user agent?

末鹿安然 提交于 2019-12-03 05:37:53
问题 After Apple's iOS 13 reales, I realized window.navigator.userAgent in Safari on iPad iOS 13 is same as on MacOS. Something like this: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 As you see, it's a wrong user-agent for iPad and even there is no way to detect if the current device is an iDevice. After an initial research, I found a work around for it: Go to Settings -> Safari -> Request Desktop Website -> All websites. You

UIWindow not showing over content in iOS 13

*爱你&永不变心* 提交于 2019-12-03 05:08:41
问题 I am upgrading my app to use the new UIScene patterns as defined in iOS 13, however a critical part of the app has stopped working. I have been using a UIWindow to cover the current content on the screen and present new information to the user, but in the current beta I am working with (iOS + XCode beta 3) the window will appear, but then disappear straight away. Here is the code I was using, that now does not work: let window = UIWindow(frame: UIScreen.main.bounds) let viewController =