Joke Collection Website - Public benefit messages - How to realize the scanning interception of short messages in Iphone jailbreak development?
How to realize the scanning interception of short messages in Iphone jailbreak development?
1. First is the callback function.
static electricity
Void callback (CFNotificationCenterRef center, void * observer,
CFStringRef name, const void *object, CFDictionaryRef userInfo)
{
if([(ns string *)name is equal tostring:kCTMessageReceivedNotification]){
uialertview * alert =[[uialertviewalloc]init with title:@ \ \ \ " Prompt \ \ \ "
Message: @ \ \ \ "You have a new message, please check it! \ \ \ "Principal: zero
CancelButtonTitle:@ \ \ \ \ " OK \ \ \ \ \ " otherButtonTitles:nil]];
[Alarm display];
[Alarm release];
}
}
2. Registration of notices
cttelephonycentraddobserver(CTTelephonyCenterGetDefault()、NULL、callBack、NULL、NULL、cfnotificationsuspensionbehaviorsdrop);
3. Run the code and try to send a short message.
- Related articles
- [Design of enterprise SMS application platform] The mobile phone can't receive SMS verification code.
- Online booking passport replacement process
- How to cancel the secret SMS password of red rice mobile phone?
- Who is the heroine in Pan Binlong Cui Zhijia's essay "Crossing"?
- Will there be a SMS reminder for small withdrawals from CCB credit cards within half a year?
- 139 how to send a text message?
- Zhang Dandan: At this moment, we are all storytellers from Wenchuan.
- Why do you want to send a text message when you log in to vivo account with one click on your mobile phone number?
- Playboy practices the brain, cheats on the heart, picks up girls to resist mourning for the old, flirts to solve troubles, secretly loves the old, and lovesickness is less sleepy. It is often said tha
- What about the visa to Britain?