The issue is not caused by invalid Image. I debugged the MLRecipeExecutionService, it was found that the problem occurs because it is unable to allocate an IOSurface. This issue only happens when using the V2 Feature Extractor. It is resolved by trying with macOS 14.6.1 and Xcode 15.4.
Post
Replies
Boosts
Views
Activity
If you want to access Persona without using SharePlay or Group Activity, use AVFoundation.
Get Front Camera Capture Device using AVCaptureDeviceDiscoverySession. Front Camera Capture Device will present Persona. Enterprise API is not required.
Configure AVCaptureSession with Front Camera Capture Device and AVCaptureVideoDataOutput.
Get Sample Buffers from AVCaptureVideoDataOutput. Render it using Metal (CAMetalLayer or Compositor Services), or UIImageView (easy, but not recommended).
You can use it right now. See the /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ImagePlayground.framework/Versions/A/Modules/ImagePlayground.swiftmodule/arm64e-apple-macos.swiftinterface file.
Here's my sample project for iOS. https://github.com/pookjw/ImagePlaygroundExample
My solution without using UIKit Presentation style: https://gist.github.com/pookjw/093dfbe43714bb0ceec2e4df1d5a9499
Caution: It's super unsafe.
same
func setDisplayModeButtonVisibilityHidden() {
typealias BlockType = @convention(c) (Any, Selector, UISplitViewController.Style) -> Any
let selector: Selector = #selector(UISplitViewController.init(style:))
let method: Method = class_getInstanceMethod(NSClassFromString("SwiftUI.NotifyingMulticolumnSplitViewController"), selector)!
let originalImp: IMP = method_getImplementation(method)
let original: BlockType = unsafeBitCast(originalImp, to: BlockType.self)
let new: @convention(block) (Any, UISplitViewController.Style) -> Any = { (me, arg0) -> Any in
let object: UISplitViewController = original(me, selector, arg0) as! UISplitViewController
object.displayModeButtonVisibility = .never
return object
}
let newImp: IMP = imp_implementationWithBlock(new)
method_setImplementation(method, newImp)
}
... on your @main App,
@main
struct YourApp: App {
init() {
setDisplayModeButtonVisibilityHidden()
}
/ ** /
}
Did you solve this problem?