is it possible to send push notification with video/audio IOS? - ios

I am working on an application which uses apple push-notification. I implemented this feature and working fine, now client is asking about sending push-notification with Audio/video file.
Can you please tell me whether apple allows this type of notifications, if YES any suggestion to implement.
Thanks.

Well yes and no is the answer. You can't really include the audio/video in the push notification.
What you could do is, in the payload of the push notification, add an URL to an audio/video file. Once your user select to view the push notification you can pick up the URL and load the audio/video.

I was searching for this and found this thread. I would like to update it by saying that with iOs 10+ now images, video and audio are now supported with little limitations which are:
Devices WITH force touch support video, images and audio.
Devices WITHOUT force touch only support images.
(not sure if audio is supported too, but videos definitely are not supported)
take a look at https://developer.apple.com/documentation/usernotifications/unnotificationattachment

push notification is simply a message, and it has a very limited length (256 characters, including service, or more). It can add a number on the icon, or play sound by it name (sound should be in the folder of application) and actually show a message. You can pass additional data - number, link or resourceId, but the resources need to pass in other ways

Related

iOS App to Ping Users Like Find My iphone "Play a Sound"

I have an idea for an app and have the design created but unsure how to go about doing it programatically. The idea is simple... ping a silent phone the way "Find My Phone" can make a silent phone make a sound. The idea is to have the app read an incoming text message with a command embedded in the text from an "authorized" user.
Example: #URGENT from my wife would make my phone sound even if it was on silent but #URGENT from my friend would not cause any action because he is not "Authorized" in my app.
From what I have found online, reading text messages in iOS is prohibited unless you build your own API/SKD (BMW reads the text from the notification center for their iDrive function) which will then get rejected by the app store. Is this correct or is there a way to do this?
My questions:
Can an app trigger an event by reading text messages with embedded commands like on Android?
In iOS is there any way to make a silent phone create a sound at full volume?
I've found that this is possible for Android, but I want to see if it is possible for iOS.
Unfortunately, the answer is no.
In order:
An iOS app has no access to the text messages of the user at all, so there's no way to trigger anything that way.
Not as a notification sound, but it's possible that by using a background audio session you could play a sound on a phone that is silenced, but still has the media volume up. However, Apple might not like this (you'd be using media playback APIs for alert noises, Apple doesn't want anyone circumventing the users decision to silence the phone).

How to prevent recording of iOS screen using quicktime

So with iOS 8, we can now record the screen of iOS devices. I've searched extensively and cannot find a way to detect, let alone prevent, this recording. The app I'm working on deals with some potentially sensitive information and images and would like to prevent this if at all possible.
Thank you in advance for your responses and insights!
Anthony
Apparently, there is some way to detect whether a display or QuickTime streaming is connected, because the Netflix app will show an error when that is the case (which also means you can't just use an iOS device and stream to your computer to watch it in big). The app works perfectly if QuickTime streaming is off with the cable is plugged in.
Maybe it just detects whether an external display is connected, and screen recording behaves like that, so basically you might have some success with these APIs and notifications.
Also, you could use an encrypted HTTP Live Stream according to Apple which would be blacked out in the stream / the recording.

How can i mute incoming text on ios

I know there is no way to read call/sms record in iOS
But i want to mute incoming text sounds with in my app. This setting seems in ringtone so there may be a solution
Let me know is it possible or not
I found another link but no answer
How can I mute incoming iPhone text messages programmatically?
Using public APIs, it is not possible.
The link you found is using private APIs, which aren't documented or guaranteed to work the way you'd expect. If you tried to release an App Store app that called a private API, it would be automatically rejected.

Pedometer in the Background

I know this has been asked 1 million times but it has been just impossible to figure it out for me.
So I need to build a pedometer app and have it continuing counting steps event if they send the app to de background for more than 10 minutes.
The client wants not use use GPS at all, an also not play a silent audio because Apple may reject it.
Does anyone one have and idea on how to do this?
The client is taking Runtastic Pedometer app as Reference and I have been analysing it and it doesn't use nor Location, nor music and runs in the background for more than 10 minutes.
Any clue? is it really imposible to do it this way? could be possible that Runtastic people made an agree with apple to use some secret API to have it running in the background?
I looked at Runtastic Pedometer and it has the following in its Info.plist file:
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>external-accessory</string>
</array>
So basically, they do the audio trick, and they claim some tie-in with an external accessory.
I hate to state the obvious, but your question appears to be "These are the rules, but I don't want to follow them. How do I get around them?" The answer appears to be: "Add features to your app until you meet one of the criteria." From the docs:
In iOS, only specific app types are allowed to run in the background:
Apps that play audible content to the user while in the background,
such as a music player app
Apps that keep users informed of their
location at all times, such as a navigation app
Apps that support
Voice over Internet Protocol (VoIP)
Newsstand apps that need to download and process new content
Apps that receive regular updates from external accessories
So add one of those features to your app. Add a setting to play a congratulatory noise after every mile walked. Leave it off by default. That should qualify you for the audio-playing exemption. Have an option to capture location data to mark where the user was when they crossed 1,000 miles walked. Leave the feature off by default. That should qualify for the location criteria. Add a feature to download inspirational Haiku from an RSS feed, or headlines from runnersworld.com. That might get you in on the new-content reason. It's not hard. Just come up with some trivial, ten-lines-of-code feature that gets you in the door. Use your imagination.
You can check the Apple docs about Declaring Your App’s Supported Background Tasks. You can also check this tutorial about using the background modes.
If you have a server side you can avoid running your app in the background by itself, by sending a silent push and waking up your app just for reporting the steps count.
You can register for silent pushes without having the user to confirm getting push messages since they don't see them.

Possible to use Apple system sounds in my iOS app?

Can you use the system sounds in your iOS app? I'm looking to have the same list that is used in the default timer app (Marimba, Alarm, Doorbell etc).
Reason i'm asking is that in Apple's own Multimedia docs it says:
Note: System-supplied alert sounds and system-supplied user-interface sound effects are not available to your application. For example, using the kSystemSoundID_UserPreferredAlert constant as a parameter to the AudioServicesPlayAlertSound function will not play anything.
Then i've come across this list of system sound ID's.
So can you use access and use these sounds in your own apps which will pass Apple's review process? If not are similar sounds available open source?
Actually if you use AudioToolbox/AudioToolbox.h framework and import it in your header file for the view controller, you can play Apple system sounds without jailbreaking. For example, putting
AudioServicesPlaySystemSound(0x450);
under an IBAction will play the Apple 'click' sound on the execution of the action.
Also, to hear the system sounds referenced earlier, there is a great app available on github that works on your iPhone (not the iOS simulator) that has the sounds for you to click and hear, as the documentation references them, but you cannot hear them. The app is nice to listen to and then find the corresponding reference number.
No, you are not able to access this sounds, until jailbreak, after jail break you can access this sounds like below.
AudioServicesPlaySystemSound(1000);
i hope this files are copyrighted.

Resources