Receive Notification for SMS using iPhone - ios

I have been searching for this on Google for a while and maybe I'm not wording it right because I'm not an expert iPhone developer, but what I'm wondering is if there is some kind of notification or system event that my iPhone application I'm developing can "hook into" that will get raised whenever a text message arrives on my phone. I don't need to be able to read the message. I just need to know when a text message has arrive on my phone. If possible, I'd like to be able to get the phone number of the person sending the message. Is this possible in Objective-C/Cocoa?

No, you can't do this with the public iOS APIs.

Related

Is it possible to interact with ios devices even though app killed?

Is it possible to create an app where the message is automatically sent from one device to another when both the devices are in the same geo-location in predefined range or in the wireless points like Bluetooth?
I think there must be some way to do this. Please let me know if you have any idea about the same.
In peer-peer connection, It is not possible. When the user terminates the app everything goes with it.
But if you connect it with server, you could try to implement the behavior you are looking for with a push notification with content available, which gives you some time awake to download content in the background.

Sending notifications to Bluetooth devices (such as Fitbit)

The device in question (Fitbit Surge) currently has no public BLE API exposed, so there is no documented way of interacting with it.
It does however support displaying some mobile device notifications (only incoming calls and text messages AFAIK). My guess is that in case of iOS it uses ANCS.
I'm interested in making the wristband vibrate programmatically from an iOS application. I figured that maybe dispatching system notifications is the way to go.
I saw that for Android there is bitTicker which basically acts as a proxy so that e.g. WhatsApp notifications get passed to Fitbit as text message notifications.
I was wondering if the same is actually possible on iOS as well. I'm considering both private and public iOS API solutions (not planning to release this application to App Store). Is there a way of somehow synthesising incoming call / message notifications so that they are passed to Fitbit? Is there some other way of approaching this problem?
I would appreciate any insights in this matter.

Register for SMS Notification

Can I register for SMS Notification through my application? All I want is to increase counter in my application when user is doing any SMS out of my application.
The sandbox nature of apps on the iOS platform prevents you from seeing what the other apps are doing. You will need to track what you are setting up with your MFMessageComposeViewController as you are helping them prepare to send an SMS message. But you can't tell if they added other recipients or deleted the ones you set up originally.
You can use the delegate to find out if the message was successfully sent, cancelled, or failed.
You get the result in messageComposeViewController:didFinishWithResult:
Nice try NSA!
Seriously though, SMS (text messaging), phone calls and e-mails are all "walled gardens" on the iPhone. This functionality belongs to the OS only, and there is little to no chance that Apple will ever open it up to developers. The other term thrown around is "sandbox" and these system level apps are in it.
Think about the potential consequences if every app could access your text's, e-mails and phone calls (even if it was just the meta-data). What kind of a world would it be when Candy Crush launched an alert the next time you played that said "We noticed you've been getting a lot of messages from Jennifer recently, would you like to invite her to play candy crush too?"

IOS - Possible to receive notification when user receives a text?

Is it possible to receive a notification when a user has received a text within the iOS SDK?
For example if your app is running, and you want to track the number of text messages received while the app is in the foreground.
I know it's not possible, I just wanted some additional confirmation for my higher-ups
Thanks
No. Apple will never do this as it's a huge privacy violation.
You may be able to infer something happened by noticing your app resigned active, but that's a very unreliable measure of anything interesting.
Not in the normal SDK. Probably for jailbroken phones.
No, it’s not possible.
Also, you can’t detect if the user receives an iMessage.
And since you may resign active for any number of reasons (like getting a phone call), you can’t really infer anything.

Disable all notifictions of incomming messages in Symbian S60v3

How do I programmatically disable these notifications when a message is arriving on my symbian S60v3 phone:
Message tone (I think I got that one)
The led flashing
The phone vibration
The screen lights up
The message icon (I think I got that one too)
and what SDK can I use? I prefer to use Python, but I do not think the Python SDK for Symbian is too complete, so I guess I have to be using C++
Any help is greatly appreciated, thanks
I managed to disable all notification by creating a MMsvSessionObserver and doing the following in HandleSessionEventL:
TMsvId* entryId = STATIC_CAST(TMsvId*, aArg2);
CMsvEntry* msvEntry = myMsvSession->GetEntryL(entryId);
TMsvEntry entry = msvEntry->Entry();
entry.SetNew(EFalse);
entry.SetUnread(EFalse);
entry.SetVisible(EFalse);
msvEntry->ChangeL(entry);
The bad news is that you can't rely on using the message centre APIs to watch for messages in order to handle them before user notification occurs. Often you will be able to handle them quickly enough, but on phones with faster processors the user will sometimes see some notification - either a beep, or the screen lights up etc. I used to use this method, then on the N95 the phone still beeped when an SMS arrived.
The good news is that if you are only concerned about SMS messages then there is a more reliable way of intercepting them so that the user never sees any notification. You can use a socket to receive the message before the message centre gets hold of it.
There's a worked example here:
http://symbian.devtricks.mobi/tricks/silent_receiving_of_sms_messages/
I switched my code over to something like this and found it worked much better. As far as I know there is no way to do this from Python.

Resources