ios 后台进程弹窗
// http://iphonedevwiki.net/index.php/CFUserNotification
// https://kunnan.github.io/2018/05/14/com.apple.storeservices/
#include <CoreFoundation/CFUserNotification.h>
const void* keys[] = {
kCFUserNotificationAlertTopMostKey,
kCFUserNotificationAlertHeaderKey,
kCFUserNotificationAlertMessageKey
};
const void* values[] = {
kCFBooleanTrue,
CFSTR("Title"),
CFSTR("Message")
};
CFDictionaryRef dict = CFDictionaryCreate(NULL, keys, values,
sizeof(keys)/sizeof(*keys),
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
SInt32 err = 0;
CFUserNotificationRef notif = CFUserNotificationCreate(0,
0, kCFUserNotificationPlainAlertLevel, &err, dict);
if (notif) CFRelease(notif);
CFRelease(dict);
posted on 2019-09-16 17:41 lichao890427 阅读(443) 评论(0) 收藏 举报
浙公网安备 33010602011771号