Tutorial details

Auto playing sound | App Code for Sale | Preview

Auto playing sound | iOS Tutorial

How to auto play sound as soon as the app starts

Overview PAGE TOP

Reference: http://www.geekylemon.com/WEBPROTECT-xcodeautoplaysound.htm

In this tutorial i will be showing you how to auto play sound as soon as the app starts


  • 1 sound file
  • AVFoundation.Framework

This auto audio play simply as soon as the app opens and is used in most apps to create a background noise or even a soundtrack or a welcome greeting to an app

ViewController.h PAGE TOP

@interface ViewController :UIViewController {

ViewController.m PAGE TOP

#import <AVFoundation/AVFoundation.h>
@implementation ViewController
-(void)awakeFromNib {
NSString *path = [[NSBundlemainBundle]
AVAudioPlayer* theAudio = [[AVAudioPlayer alloc]
initWithContentsOfURL:[NSURLfileURLWithPath:path] error:NULL];
[theAudio play];

Reference PAGE TOP


0 Comments Leave a comment

Please login in order to leave a comment.

Newest first

to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.