iOS Download Custom Push Notification Sounds - ios

So I've implemented push notifications with custom sounds in my app.
And my app plays those with the push notification with no problem.
My question is is it possible to download custom sounds after the app has been installed and play them with the custom push notification system?
Since they should be present in the main bundle and that's read only - is there another way to accomplish this?
Thanks.

I don't believe this is possible.
As far as my reading of the documentation goes, the sound files must be inside the read-only main bundle, like you said.

Related

Using push notifications on Heroku

I am looking for the simplest way to use push notifications to users from a Parse-Server app on Heroku. Just in case, this is for an iOS app.
Any tip or suggestion would be appreciated.
I used have code working on parse.com. But it does not seem to be working any more.
Have a look on this hope it works Traversy media PUSH Notification
He shows on pc i think this might work on mobile also ,if not the library he is using must have your solution

Can't get rid of scheduled push notifications - iOS

I have a very silly problem, which I unfortunately don't really understand how to solve.
I'm trying to implement push notification to my iOS app (Swift). I did succeed to create scheduled push notifications, where I send a notification every minute, for test purposes. Now I don't seem to be able to remove this, even though I have removed the code related to it, and reinstalled the app on the device. The only thing working is to disable push notifications in Xcode, which I do not want to do. It seems like I have missed something fundamental about the concept.
I did use an APN Tester at first to send messages to the device, but I don't think that has to do with anything.
Silly question, but I hope someone could help me.
Thanks!
Use this to remove all local notification:
UIApplication.sharedApplication().cancelAllLocalNotifications()
Updating Lumialxk to be current as of Swift 4.0 using UNUserNotificationCenter
UNUserNotificationCenter.current().removeAllPendingNotificationRequests()

A workaround for custom and "dynamic" notification sounds

From the apple documentation, we can read
For remote notifications in iOS, you can specify a custom sound that
iOS plays when it presents a local or remote notification for an app.
The sound files must be in the main bundle of the client app.
My app evolves around notifications, like many other apps, and I would really like to have the ability to add sounds later on, or at least to have some kind of control over them. The best scenario would be :
On launch, my app checks the sound database online and downloads any updates.
But obviously if all the sounds have to be in the bundle, this can't be done.
I have over 400Mb of sounds, and as obvious as this sounds, this is also too much for the app store, and that's why I'd need some control from the user, to not download all the sounds.
Is there any possible workaround so that I can play sounds written on disk and not in bundle? Or any other possibility you might think of so I can play a custom push notification sound?
If that is of any help, my app works 100% online, so if there is a solution, it can be server-related.
I understand that I'm most probably get a "No" as the best answer, but I need to make sure.
Thank in advance.
You can place custom sounds in the Library/Sounds folder.
Preparing Custom Alert Sounds
If your app wants to be in App Store, then you should follow the apple documentation. That is to say, we can only play the sound from the main bundle.
And we also could not modify the main bundle dynamically. Because it's encrypted.
So I'm afraid you could not go this way. But I suggest to upload the whole app to App Store if you could sacrifice the sound file dynamically update feature.

Option to play a notification sound iOS

I wrote an Android application and it had options to choose what system notification sound the user wanted to play for each of the different types of notifications, three in total.
Now I want to write the same application for iOS, but is it possible to do this in iOS, I Googled about this but didn't really find a way on how to do it. Seeing as though iOS 7 is out, have Apple made any changes?
Or is it still restricted, like a million other things?
Choose custom sound for local notifications
This link provides the answer. You can find more detail in the apple doc. "In iOS, an application can specify a sound file along with an alert message or badge number.".
Specifically:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW1
Ok, I have downloaded the standard iOS 7 alert sounds, and will put them in my bundle, and play them from there. Why does Apple make things so hard?

What's solution to make task background in iOS same service in Android?

I'm newbie iOS. I have been develop Phonegap for Android and iOS. My App is update data from server every 1hour. In Android, i use service to do that. My app in Android working very good. Now, i want to develop version for iOS, and i have problem when update data from server every 1hour. I was research but not find anyway for my app.I don't know what's solution to replace for service in Android. Can you help me, what's solution. This have been kill me. Thank you so much.
Short answer is NO as Apple has restriction on background task running especially cases like yours.
But if you are downloading small amount of content, you do have some other options. From IOS 4.0 or above, you can declare your app to run in background when you fall under the following categories:
Audio
Location updates
Voice over IP
Newsstand downloads
External accessory communication
Bluetooth networking
Bluetooth data sharing
Background fetch (IOS 7)
Remote notifications (IOS 7)
In order to do so, you need to flag your app in the info.plist for Required Background Modes option. Apple will review your app specific in this area once you declared the option.
For your case to download the data, the possible option is to use the new feature in IOS 7 that's the background fetch or remote notification above. The suggestion from DOM was not asking you to download the content through push notification. But instead to use push notification to wake up your application and start downloading new content.
If you don't want to use push notification, the only way to go is register for background fetch. However, no matter which option you want to use, each download will only last for 30 seconds. And after that, your app will put into suspension mode again.
you can have a look on the link here:
Declaring Your App’s Supported Background Tasks
I think your best bet would be to use the push services instead of having your app go get data. Making your app do it is unreliable with phonegap apps because you cant create a service interface and you can not guarantee that your app will be running. With push service though, if your app isn't running, it will be woken up in a manner of speaking.
Take a look at this great how-to article that also discusses what push provides you.

Resources