Objective c PasteBoardAPI更改:从SDK MacOSX 10.11移植到10.12

Objective c PasteBoardAPI更改:从SDK MacOSX 10.11移植到10.12,objective-c,macos,Objective C,Macos,将代码从MacOSX10.11 SDK移植到MacOSX10.12 SDK后,出现以下错误: 传递给需要非Null参数的被调用方的Null 在这里: 这里,kPasteBoardResolveAllPromissions为NULL,这意味着将解析此应用程序当前拥有的所有全局粘贴板资源上的所有承诺 然而,苹果改变了这个API,让它需要传递非空参数 您可以查看文档 有趣的是,Apple din没有更新该功能的文档,文档中仍然说: #define kPasteboardResolveAllPromis

将代码从MacOSX10.11 SDK移植到MacOSX10.12 SDK后,出现以下错误:

传递给需要非Null参数的被调用方的Null

在这里:

这里,kPasteBoardResolveAllPromissions为NULL,这意味着将解析此应用程序当前拥有的所有全局粘贴板资源上的所有承诺

然而,苹果改变了这个API,让它需要传递非空参数

您可以查看文档

有趣的是,Apple din没有更新该功能的文档,文档中仍然说:

#define kPasteboardResolveAllPromises           (PasteboardRef)NULL
/*
 *  PasteboardResolvePromises()
 *  
 *  Summary:
 *    Resolves promises on the provided local pasteboard reference. If
 *    multiple local pasteboard references to the same global
 *    pasteboard resource exist, only those promises made through the
 *    provided reference are resolved.
 *  
 *  Mac OS X threading:
 *    Not thread safe
 *  
 *  Parameters:
 *    
 *    inPasteboard:
 *      The local pasteboard reference for which promises will be
 *      resolved. Passing kPasteboardResolveAllPromises, or NULL, will
 *      cause all promises on all global pasteboard resources currently
 *      owned by this application to be resolved.
 *  
 *  Result:
 *    An operating system result code.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
 *    Non-Carbon CFM:   not available
 */
extern OSStatus 
PasteboardResolvePromises(PasteboardRef inPasteboard)         AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
我的问题是:我如何做与

#define kPasteboardResolveAllPromises           (PasteboardRef)NULL
/*
 *  PasteboardResolvePromises()
 *  
 *  Summary:
 *    Resolves promises on the provided local pasteboard reference. If
 *    multiple local pasteboard references to the same global
 *    pasteboard resource exist, only those promises made through the
 *    provided reference are resolved.
 *  
 *  Mac OS X threading:
 *    Not thread safe
 *  
 *  Parameters:
 *    
 *    inPasteboard:
 *      The local pasteboard reference for which promises will be
 *      resolved. Passing kPasteboardResolveAllPromises, or NULL, will
 *      cause all promises on all global pasteboard resources currently
 *      owned by this application to be resolved.
 *  
 *  Result:
 *    An operating system result code.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.3 and later in ApplicationServices.framework
 *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
 *    Non-Carbon CFM:   not available
 */
extern OSStatus 
PasteboardResolvePromises(PasteboardRef inPasteboard)         AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
PasteboardResolvePromises(kPasteboardResolveAllPromises)