iPhone Push Notification - How to use default sound - iphone

I have implemented whole push notification service for my application using easyapns.
I have implemented the server part using php and using the default php classes provided by easyapns.
Now, from server (php file), i am passing sound file name like :
$apns->addMessageSound('bingbong.aiff');
And I am including this 'bingbong.aiff' file in iPhone's Resource folder.
But Now I have a query that is it possible to play a default in-built sound of iPhone device instead of specify it externally ?
Thanks in advance....

Normally $apns->addMessageSound('default'); should do the trick.

Related

How to get cutom sound file to play in Apple Push Notification Service?

I want to play a custom sound file to notify the user. I use java apns as the third party library and I have developed a connector to connect java apns in order to send notifications to devices. I only have the file path of the sound file which is saved in a local drive of the server. To build the payload it requires a string input for the sound attribute. Can somebody help me to solve this problem?
The sound attribute is only intended for supplying a file name of a sound file which is already part of your application installed on the device. You can't send a file from your server in the notification.

Install .mobileconfig Programmatically

I am writing an app in order to automate the process of connecting an Apple mobile device to a wifi network and downloading configuration profiles to the device. Since it is being automated (by something such as Native Driver), all of the functions need to be controlled by the app itself, not sent to another app such as Settings or Safari.
I am already using Apple80211 private framework to connect to a wifi network as well as UIWebView in place of a browser in order to navigate to a specific webpage. Once I navigate to this webpage, my server will send the mobile device a .mobileconfig file in order to install a configuration profile. I haven't been able to find a clear answer on how to handle this .mobileconfig file once it is sent by the server. I have read in a few different places that UIWebView cannot handle the .mobileconfig file once it is sent. What would be the best way to handle this file when it is sent?
Also, once it is sent, and granted that something can handle the file, is there a way to install the configuration profile programmatically without the need for user input? i.e. are there any public or private frameworks that I can implement in order to install the configuration profile "behind the scenes?"
This app is only ever going to be used for testing purposes, and will only ever live on a handful of devices. Thanks in advance, any help will be much appreciated.
I tried a similar thing to do.
Unfortunately I didn't get it running with the UIWebView, but with switching to the Safari it worked:
Switch to safari, let the user install the config and send him back to your app. Just register to a custom URL Scheme like "yourapp://" and add a link to this URL in the HTML.

How can I send my app data from one iPhone to another

I built an app which I can add images and texts, what I would like to do is to pack a data from this app (which I can do that by serializing an object to a file) and send it non-synchronically to another app in another IPhone and open it there (without using the mail nor the internet).
for example if I had MMS on IPhone I could do that by sending the file as MMS and set my app to open files with specific post-fix I choose.
Please help, Thanks.
What do you mean by "without using the internet"? You could use NSNetServices to establish connections between devices, and send whatever you want between them. This relies on the TCP/IP protocol though, but does not use HTTP. So if you mean "without going via HTTP", this should be an alternative:
http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/NSNetServiceProgGuide/Articles/ResolvingServices.html#//apple_ref/doc/uid/20001078-SW1
you use an url scheme for small data, or the new UIDocumentInteractionController

A caching solution for iPhone application

What I'm building is simply an application that fetches data over the web and displays them on the iOS views. Data are text and, sometimes, images / music files / movies.
I'd like to use some caching solution for the media. What it needs to do is:
get an url of the file
check if it's alredy downloaded in the cache storage, if it is, serve it
if not, download it
while also checking how much of the storage the current cache uses, and, if it's over the quota, delete oldest files
Best would be to have a simple interface for this - so I can just give an url and get the file of it (while files can change over time and reside on the same URL, so this should be handled too, in a perfect case).
Anyone knows a library to do it, on iPhone/iPad application?
ASIHttpRequest has a DownloadCache option that may work for you. From their documentation:
* You want to have access to the data when there is no internet connection and you can't download it again
* You want to download something only if it has changed since you last downloaded it
* The content you are working with will never change, so you only want to download it once
This is what I used in my iPad app and it works pretty well.
You could try looking at using a UIWebview for the view. If I am understanding this correctly, you will be hosting your content on a web server and would simply like the iOS device to pull the content from the URL. This is what UIWebview is. It is essentially programmable access to Safari.

setting the default applications for a file type in iphone

Hai all,
In my iphone application i want to open a my custom application(available in the iphone) when the user tapes on a particular type file sent by email or MMS ,
for example, if i sent an music file (via email or MMS) with a custom extension (for eg: .muc) i want to open my application (lets say myMusicPlayer) to play that file,
is there any way to do that in iphone ?
thanks in advance
There is currently no way to do this exactly. The only way to open an application is using a URL scheme assigned to your app via the Info.plist file but you wouldn't be able to send the local file system location of your file to it.