最近在研究 push notification 的 hook 。网上找到了一个私有方法可以不过只能 hook 到 title message 。
%hook BBServer
-(void)_publishBulletinRequest:(id)arg1 forSectionID:(id)arg2 forDestinations:(unsigned long long)arg3 alwaysToLockScreen:(BOOL)arg4 {
BBBulletinRequest* request = ((BBBulletinRequest*)arg1);
NSString* appId = (NSString*)arg2;
NSLog(@"NOTIFICATION RECEIVED: %@ - %@, %@, %@, %@", appId, request.title, request.subtitle, request.message, request.summaryArgument);
%orig;
}
%end
不知道老铁们有木有思路。能把 aps 以外到整个 apns 发送到整个 payload 也 hook 到
{
"aps":{
"alert":"哈哈哈 1111234",
"sound":"default",
"badge":1
},
"rc":{
"cType":"PR",
"fId":"2121",
"oName":"RC:TxtMsg",
"tId":"3232",
"id":"5FSClm2gQ9V9BZ-kUZn58B",
"rc-dlt-identifier":"2FSClm2gQ9Q9BZ-kUZn54B"
}
}
1
MAKF 2020-12-14 18:08:53 +08:00
额,你在吹水论坛问这么高端的问题,只能沉帖了。。。
我也不会,我看看有没有别人会 |