ios11

Include an extension for a class only if iOS11 is available

无人久伴 提交于 2019-11-30 09:41:19
I am trying to extend a class written in Obj-C and include an extension written in Swift that makes it conform to the UIDropInteractionDelegate , like so: @available(iOS 11.0, *) extension NoteEditViewController: UIDropInteractionDelegate { @available(iOS 11.0, *) public func dropInteraction(_ interaction: UIDropInteraction, sessionDidUpdate session: UIDropSession) -> UIDropProposal { let operation: UIDropOperation if session.localDragSession == nil { operation = .forbidden } else { // If a local drag session exists, we only want to move an // existing item in the pin board to a different

How to resolve iOS 11 Safari getUserMedia “Invalid constraint” issue

北城余情 提交于 2019-11-30 08:36:54
I'm attempting to run the following code in Safari in iOS 11. It should prompt the user to give access to their devices camera and then display it in my <video autoplay id="video"></video> element. However, when running in iOS 11, it results in an OverconstrainedError to be thrown: {message: "Invalid constraint", constraint: ""} The code runs fine in Android and successfully opens the camera. I've attempted multiple valid configurations with no luck. I know iOS 11 just came out so it may be a bug, but any thoughts? Has anyone else run into this? Code: var video = document.getElementById('video

IOS11 UIContextualAction Place the image color text

非 Y 不嫁゛ 提交于 2019-11-30 07:10:54
问题 To prevent the picture How to restore the real color I now place the image are white - (UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath API_AVAILABLE(ios(11.0)) { UIContextualAction *deleteRowAction = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleNormal title:nil handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull

iOS11 ARKit: Can ARKit also capture the Texture of the user's face?

ⅰ亾dé卋堺 提交于 2019-11-30 05:29:39
I read the whole documentation on all ARKit classes up and down. I don't see any place that describes ability to actually get the user face's Texture. ARFaceAnchor contains the ARFaceGeometry (topology and geometry comprised of vertices) and the BlendShapeLocation array (coordinates allowing manipulations of individual facial traits by manipulating geometric math on the user face's vertices). But where can I get the actual Texture of the user's face. For example: the actual skin tone / color / texture, facial hair, other unique traits, such as scars or birth marks? Or is this not possible at

Warning from iOS “Do not add subviews directly to the visual effect view itself”

一笑奈何 提交于 2019-11-30 04:49:34
问题 I have a function below and when I link with the iOS 11 SDK, I get an error: Do not add subviews directly to the visual effect view itself, instead add them to the -contentView. The problem can be solved by changing let effectView = UIVisualEffectView(effect: UIBlurEffect(style: .dark))" to effectView = UIView() but the effect is not present that way. How can I keep using UIVisualEffectView instead of UIView ? I want to keep the effect. let imagePicker = UIImagePickerController() let

WKWebView page height issue on iPhone X

牧云@^-^@ 提交于 2019-11-30 03:58:06
I find that if I use WKWebView with viewport-fit=cover and body :{height:100%} the height of html body still can not reach the bottom of iPhone X and is equal to the height of safeArea, However, the background-color can cover the fullscreen. https://ue.qzone.qq.com/touch/proj-qzone-app/test.html I load this page in a fullscreen WKWebView to reproduce the problem. I was able to fix the issue with (ObjC / Swift): if (@available(iOS 11.0, *)) { webView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } or if #available(iOS 11.0, *) { webView.scrollView

Continuously train CoreML model after shipping

匆匆过客 提交于 2019-11-30 03:43:14
In looking over the new CoreML API, I don't see any way to continue training the model after generating the .mlmodel and bundling it in your app. This makes me think that I won't be able to perform machine learning on my user's content or actions because the model must be entirely trained beforehand. Is there any way to add training data to my trained model after shipping? EDIT: I just noticed you could initialize a generated model class from a URL, so perhaps I can post new training data to my server, re-generate the trained model and download it into the app? Seems like it would work, but

Xcode 9: Provisioning profile is Xcode managed, but signing settings require a manually managed profile

萝らか妹 提交于 2019-11-30 03:03:23
I need to archive my app for submission to iTunes Connect. It was OK with Xcode 8.3.3: It's NOT OK with Xcode 9.0: When archiving, I get: Code Signing Error: Provisioning profile "XC iOS: *" is Xcode managed, but signing settings require a manually managed profile. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.0' The two screenshots are taken from the same computer, same workspace. I can't use "Automatic" because it would change the provisioning profile to a different one, then after uploading to iTunes Connect I would get: Potential Loss of

dyld: dyld_sim not compatible mach-o

梦想的初衷 提交于 2019-11-30 01:24:59
I installed Xcode 9 and trying to run my app on ios simulator 11.0. As soon as it launches the app its crashing giving this error. What does this error mean? If my app is not compatible with ios11.0, how can I check for the compatibily? EDIT - Uploaded my valid Architectures You need to make these changes in build setting ... it works for me I had the same problem and found out that the architectures and valid architectures settings for my targets (and pods) were set wrong. iOS 11 doesn't support 32bit applications anymore, so I guess that took part in my problem.., I've deleted my

iOS 11 - Is in app purchase testing using a sandbox user keeps asking to sign in for anyone else too? Forever loop?

痞子三分冷 提交于 2019-11-30 01:20:50
I am testing a non-consumable IAP on an iPhone 6s running iOS 11 GM. Whenever I tap my "Buy" button, it asks me to sign in. I tap "Sign in with existing apple ID" and enter my sandbox user details (which worked fine as of a few days ago on iOS 10). After entering, it just goes back to the same "Sign in" screen. I tried entering a few more times and it just goes back to the same screen again. Keeps looping forever. Is this down for anyone else? The same thing happens for me, for three separate sandbox users which were created before iOS 11 release. (The problem seems prevalent on iOS 11, there