These are part of Apple's Vision Framework.
You can read more about the Vision Framework in their developer documentation: Vision Framework.
Developers using the Vision Framework can incorporate these features into their apps. As you will note in the Vision Framework documentation, the framework has been available since:
iOS 11.0+
iPadOS 11.0+
macOS 10.13+
Mac Catalyst 13.0+
tvOS 11.0+
visionOS 1.0+
So, nothing new.
Apple provides many of the frameworks that developers can use in their system library so the framework doesn't need to be packaged with each app that uses it. This makes apps smaller and sometimes allows apps to take advantage of fixes to frameworks without having to recompile. When Apple updates the system framework, all apps that rely on the system framework may benefit.
Of course, Apple uses such frameworks too—for example, allowing you to search for photos of your dog.
It is always good to be concerned about data privacy and where your information goes. So, it's always good to ask questions. However, I don't think there is anything nefarious going on here.
Hope this helps provide some context for your concerns.
Post
Replies
Boosts
Views
Activity
This may be related to this post: https://developer.apple.com/forums/thread/738726 where the appearance of text magnification loupe, text selection pop ups or autocorrect suggestions cause the error.
Report filed via Feedback Assistant: FB13276843
Please file reports too - so that we can can some action on this. :)
I can create a workaround to the issue by preventing the default long press and autocorrection behaviours (which will cause magnifiers or correction suggestions).
For me at least, this stops the warning (but - obviously - prevents text selection and autocorrection).
struct ContentView: View {
@State private var text: String = ""
@FocusState private var textfieldFocused: Bool
var body: some View {
TextField("Placeholder", text: $text)
.focused($textfieldFocused)
.onLongPressGesture(minimumDuration: 0.0) {
textfieldFocused = true
}
.autocorrectionDisabled()
}
}
On staring at the backtrace, and seeing continuousRoundedRectBezierPath:withRoundedCorner and UITextMagnifiedLoupeView makes me think the error occurs whenever the new "pill shaped" text selection magnifier appears (long pressing is one case in which this text selection magnifier appears).
I think this is a bug on Apple's side. But surprised there is not more comments on the forums / StackOverflow, etc about this.
Adding CG_NUMERICS_SHOW_BACKTRACE to Environment Variables as the error suggests, provides the following backtrace. I don't find it very informative - but perhaps it can provide some clues to other more intelligent individuals:
Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.
Backtrace:
<CGPathMoveToPoint+84>
<+[UIBezierPath _continuousRoundedRectBezierPath:withRoundedCorners:cornerRadii:segments:smoothPillShapes:]+1120>
<+[UIBezierPath _continuousRoundedRectBezierPath:withRoundedCorners:cornerRadius:segments:]+180>
<+[UIBezierPath _roundedRectBezierPath:withRoundedCorners:cornerRadius:segments:legacyCorners:]+340>
<-[_UITextChoiceAccelerationBubble backgroundImageView]+156>
<-[_UITextChoiceAccelerationBubble anchorToTextIfNeeded]+500>
<-[_UITextChoiceAccelerationBubble updateTextAnchorForParentView:]+156>
<-[_UITextChoiceAccelerationBubble updateTextBoxHighlightForRect:inTextView:parentView:highlightColor:]+88>
<-[_UITextChoiceAccelerationAssistant updateActivePromptForCandidate:displayRects:highlightOnly:]+352>
<-[UIKeyboardImpl updateAutocorrectPrompt:correctionRects:]+492>
<-[UIKeyboardImpl updateAutocorrectPrompt:executionContext:]+608>
<__45-[UIKeyboardImpl touchAutocorrectPromptTimer]_block_invoke+112>
<__56-[UIKeyboardScheduledTask handleDeferredTimerFiredEvent]_block_invoke+184>
<-[UIKeyboardTaskEntry execute:]+200>
<-[UIKeyboardTaskQueue continueExecutionOnMainThread]+304>
<-[UIKeyboardTaskQueue addTask:]+92>
<-[UIKeyboardScheduledTask handleDeferredTimerFiredEvent]+216>
<__invoking___+144>
<-[NSInvocation invoke]+276>
<-[_UIActionWhenIdle invoke]+52>
<__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__+32>
<__CFRunLoopDoObservers+528>
<__CFRunLoopRun+968>
<CFRunLoopRunSpecific+572>
<GSEventRunModal+160>
<-[UIApplication _run]+868>
<UIApplicationMain+124>
<OUTLINED_FUNCTION_70+500>
<OUTLINED_FUNCTION_70+148>
<OUTLINED_FUNCTION_2+92>
<$s16FurtherIsolation0aB3AppV5$mainyyFZ+40>
<main+12>
104d81558
104e62058 3125800000000000
I have the same issue .. however .. while it does occur on a long press, it also occurs anytime I type in the textfield. Occurs with minimal code example, in simulator and on device - using both on-screen keyboard and hardware keyboard.
Driving me insane!!
SwiftUi previews works for me using images in a XCAssets folder within my package - provided I reference the bundle appropriately within the module.
In the package, consider using something like:
public struct MyStruct {
	 ...
	 public var image: Image {
		return Image(imageName, bundle: Bundle.module)
	 }
}
where imageName is the String name of the image in the XCAssets folder.
Note the use of
Bundle.module
Then in the project:
import SwiftUI
import MyPackage
let data: MyStruct
...
var body: some View {
VStack {
...
data.image
.resizable()
.cornerRadius(8)
....
...
		}
}
Did you get this working? Or figure out a work around?
Same issue after updating to 12.3 on Big Sur 11.1 (Mac Mini M1).
Update: it appears that the conversion to the latest settings for the project somehow changed the Signing Certificate from Development to Sign To Run Locally on my MacOS target. Once switched back, previews started working again.
May not be the issue others are having, but worth having a look as solved for me.