Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

init

  • Loading branch information...
commit 6de3ee5284497804725a9c56512225a38bfcfa31 0 parents
@vladkorotnev authored
7 Makefile
@@ -0,0 +1,7 @@
+include theos/makefiles/common.mk
+
+TWEAK_NAME = StartupSound
+StartupSound_FILES = Tweak.xm
+StartupSound_FRAMEWORKS = AVFoundation UIKit Foundation
+
+include $(THEOS_MAKE_PATH)/tweak.mk
6 README
@@ -0,0 +1,6 @@
+A simple tweak that allows you to have a startup sound on your iOS Device.
+Place the file in /var/mobile/startup.wav.
+The file may be in mp3, wav or caf format, though it must be named "startup.wav" and reside in /var/mobile.
+A sample startup.wav is attached.
+
+~ Korotnev Vladislav
1  StartupSound.plist
@@ -0,0 +1 @@
+{ Filter = { Bundles = ( "com.apple.springboard" ); }; }
16 Tweak.xm
@@ -0,0 +1,16 @@
+#import <AVFoundation/AVFoundation.h>
+#import <objc/runtime.h>
+
+%hook SpringBoard
+- (void)applicationDidFinishLaunching:(id)x {
+ %orig;
+
+ NSFileManager *fm=[NSFileManager defaultManager];
+ if([fm fileExistsAtPath:@"/var/mobile/startup.wav"]){
+ NSURL *newURL = [[NSURL alloc] initFileURLWithPath:@"/var/mobile/startup.wav"];
+ AVAudioPlayer *player = [[AVAudioPlayer alloc]initWithContentsOfURL:newURL error:nil];
+ [player prepareToPlay];
+ [player play];
+ }
+}
+%end
9 control
@@ -0,0 +1,9 @@
+Package: com.vladkorotnev.startupsound
+Name: StartupSound
+Depends: mobilesubstrate
+Version: 0.0.1
+Architecture: iphoneos-arm
+Description: An awesome MobileSubstrate tweak!
+Maintainer: Vladislav Korotnev
+Author: Vladislav Korotnev
+Section: Tweaks
0  obj/.stamp
No changes.
BIN  obj/StartupSound.dylib
Binary file not shown
BIN  obj/Tweak.xm.o
Binary file not shown
BIN  startup.wav
Binary file not shown
1  theos
Please sign in to comment.
Something went wrong with that request. Please try again.