NSSharingService warning: SHKRemoteView determined it was necessary to configure SHKRemoteViewContainerWindow to support remote view vibrancy

I am trying to use NSSharingService to share a CloudKit record as follow:


I found this code in WWDC 2016, Session 226 Whats new with CloudKit.


let itemProvider = NSItemProvider()
itemProvider.registerCloudKitShare { (prepareCompletionHandler : (CKShare?, CKContainer?, NSError?) -> Void) in
      // Save the share and root record
}

let sharingService = NSSharingService(named: NSSharingServiceNameCloudSharing)!
sharingService.delegate = self
sharingService.perform(withItems: [itemProvider])


I get this warning in console:


warning: <SHKRemoteView: 0x102b47080> determined it was necessary to configure <SHKRemoteViewContainerWindow: 0x6080001e0800> to support remote view vibrancy


How could I fix it?

Replies

Using XC9 on macOS 12.12.6


I see this warning in console.. The service functions correclty but the warning is disconcerting..

Is this something I can remedy?

Is this an issue for the Mac App Store?



    self.mailSharingService = [NSSharingService sharingServiceNamed:NSSharingServiceNameComposeEmail];
    [self.mailSharingService performWithItems:@"Hello World"];



2017-09-24 00:50:10.083501-0700 Enact[12490:9156508] warning: illegal subclass SHKRemoteView instantiating; client should use only NSRemoteView (
  0   ViewBridge                          0x00007fffaf4eb434 -[NSRemoteView _preSuperInit] + 195
  1   ViewBridge                          0x00007fffaf4eb793 -[NSRemoteView initWithFrame:] + 25
  2   ShareKit                            0x00007fffad5b7a61 -[SHKRemoteView initWithOptionsDictionary:] + 159
  3   ShareKit                            0x00007fffad591c2d __38-[SHKSharingService performWithItems:]_block_invoke_4 + 1384
  4   libdispatch.dylib                   0x000000010071ecfe _dispatch_call_block_and_release + 12
  5   libdispatch.dylib                   0x000000010071578c _dispatch_client_callout + 8
  6   libdispatch.dylib                   0x0000000100723ac4 _dispatch_main_queue_callback_4CF + 362
  7   CoreFoundation                      0x00007fff9bc3ebc9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
  8   CoreFoundation                      0x00007fff9bbffc0d __CFRunLoopRun + 2205
  9   CoreFoundation                      0x00007fff9bbff114 CFRunLoopRunSpecific + 420
  10  HIToolbox                           0x00007fff9b15febc RunCurrentEventLoopInMode + 240
  11  HIToolbox                           0x00007fff9b15fcf1 ReceiveNextEventCommon + 432
  12  HIToolbox                           0x00007fff9b15fb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
  13  AppKit                              0x00007fff996f8a54 _DPSNextEvent + 1120
  14  AppKit                              0x00007fff99e747ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
  15  AppKit                              0x00007fff996ed3db -[NSApplication run] + 926
  16  AppKit                              0x00007fff996b7e0e NSApplicationMain + 1237
  17  Enact                               0x00000001001c7c55 main + 581
  18  libdyld.dylib                       0x00007fffb1387235 start + 1
  19  ???                                 0x0000000000000003 0x0 + 3
)
2017-09-24 00:50:10.118488-0700 Enact[12490:9156508] warning: <SHKRemoteView: 0x1009ae750> determined it was necessary to configure <SHKRemoteViewContainerWindow: 0x6000001ebc00> to support remote view vibrancy

I installed macOS High Sierra Verison 10.13, and now the error is:


warning: illegal subclass SHKRemoteView instantiating; client should use only NSRemoteView

Did you ever find a fix for this? I'm running into the same issue.

Seeing the same issue running Xcode 10.0 on Mojave 10.14


Have you received any feedback received as to what causes this?


2018-10-20 22:52:11.242547-0700 XYZ [9140:3538806] warning: illegal subclass SHKRemoteView instantiating; client should use only NSRemoteView (
  0   ViewBridge                          0x00007fff557bb9da -[NSRemoteView _preSuperInit] + 192
  1   ViewBridge                          0x00007fff557bbd6a -[NSRemoteView initWithFrame:] + 25
  2   ShareKit                            0x00007fff5172f03a -[SHKRemoteView initWithOptionsDictionary:] + 143
  3   ShareKit                            0x00007fff517119d1 __38-[SHKSharingService performWithItems:]_block_invoke_2.1105 + 1376
  4   libdispatch.dylib                   0x000000010060d71b _dispatch_call_block_and_release + 12
  5   libdispatch.dylib                   0x000000010060e7f3 _dispatch_client_callout + 8
  6   libdispatch.dylib                   0x000000010061d3c0 _dispatch_main_queue_callback_4CF + 1909
  7   CoreFoundation                      0x00007fff2c6d4147 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
  8   CoreFoundation                      0x00007fff2c6d3856 __CFRunLoopRun + 2335
  9   CoreFoundation                      0x00007fff2c6d2ce4 CFRunLoopRunSpecific + 463
  10  HIToolbox                           0x00007fff2b96c895 RunCurrentEventLoopInMode + 293
  11  HIToolbox                           0x00007fff2b96c5cb ReceiveNextEventCommon + 618
  12  HIToolbox                           0x00007fff2b96c348 _BlockUntilNextEventMatchingListInModeWithFilter + 64
  13  AppKit                              0x00007fff29c2995b _DPSNextEvent + 997
  14  AppKit                              0x00007fff29c286fa -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1362
  15  AppKit                              0x00007fff29c2275d -[NSApplication run] + 699
  16  AppKit                              0x00007fff29c11e97 NSApplicationMain + 780
  17  XYZ                              0x000000010013be25 main + 597
  18  libdyld.dylib                       0x00007fff5976c085 start + 1

No, I still do not know why is this happening.