![]() |
||
[CoreTelephony]CTTelephonyCenterRemoveObserver
|
||
![]() |
|
|
Thread Tools | Search this Thread |
|
#11
|
||||||
|
||||||
|
Hi everyone,
Since you guy seems to know quite a lot about intercepting and process sms (mms) on the iPhone and I'm stuck, I would like to ask for some help. I'm trying to build a "Map-application" for tracking pets with GSM/GPS collars and I manage to send the request to the collar with: Code:
BOOL success = [[CTMessageCenter sharedMessageCenter] sendSMSWithText:@"POSREQ" serviceCenter:nil toAddress:@"NUMBER"]; In the callback I catch the "kCTMessageReceivedNotification" but I can't extract the parts that I need (phonenumber and textpart). I also have problems with ""-MSHookMessage", referenced from" when trying to use the HOOK method mentioned earlier, but it's not so important right now.
__________________
|
|
#13
|
||||||
|
||||||
|
Thanks that gave me a little help, but I don't get any information about the SMS.
The "result" from "CFNumberGetValue" is a negative value and after that the "incMsg" is "0x0", and subsequently everything after that fails. Shouldn't the "result" value be positive? By the way, I'm trying to use Xcode with private frameworks only, no Mobile Substrate or similar. Thanks again. |
|
Sponsored Links
|
|
|
|
#14
|
|||||||
|
|||||||
|
this code was tested in command-line utility (hence, no MobileSubstrate - just added an observer for kCTMessageReceivedNotification) and it was working fine...
|
|
#15
|
||||||
|
||||||
|
Do you mind sharing the util and code? It would be very helpful :-).
|
|
#17
|
||||||
|
||||||
|
>>MadCoke
your app must be present in folder Application on your device try load your app not via xCode |
|
#18
|
||||||
|
||||||
|
Thanks for all you help, I got it to work.
Actually I think it has work quite a while now but when using the debugger and breakpoints to check for the info I wanted, the messagedata has already been removed by the regular SMS-application. So by putting the breakpoint after the message has been processed I got what I wanted. Thanks again :-) |
|
#19
|
||||||
|
||||||
|
>>MadCoke
Did You add HOOk of message for your project via xCode? I can't remove system notification in XCode
|
|
#20
|
||||||
|
||||||
|
No, I didn't get the HOOK working, I got "_MSHookMessage", referenced from" error when try to use it. I have to live with the "SMS alert" for the moment, anyway I want to give the user a alert when a new position comes. If I understand the HOOK method you have to use Mobile substrate?
|
![]() |
| Thread Tools | Search this Thread |
|
|