Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
890ada0
- ARC support
May 30, 2013
4d35d1a
Create README.md
Aug 9, 2013
929173e
CocoaPods support
Nov 25, 2013
1c299b7
[CHANGE] disallowed rotation so demo app can be used sideways
monkeydom Dec 10, 2013
1eda314
[CHANGE] made the start stealing button bigger
monkeydom Dec 10, 2013
b5cb92a
Merge branch 'feature/rotationfix'
monkeydom Dec 10, 2013
11fc6f0
[CHANGE] moved ivars to auto synthesized properties
monkeydom Dec 10, 2013
b65f00c
[ADD] added audio session category AmbientSound to not disable sound …
monkeydom Dec 10, 2013
5802d63
[FIX] fixed flashing of volume overlay on ios by slightly delaying ou…
monkeydom Dec 10, 2013
b08023f
Merge branch 'feature/cleanup'
monkeydom Dec 10, 2013
e193a45
[FIX] fixed volume view being visible
monkeydom Dec 10, 2013
8a7cd1c
Merge pull request #1 from monkeydom/master
Dec 16, 2013
ef3515e
CocoaPods support
Nov 25, 2013
be4d64e
Added fork podspec
Aug 11, 2014
f755d7c
Update demo project with Xcode recommended settings
Aug 11, 2014
f65f8b5
Fix arm64 warnings
Aug 11, 2014
b9a2d61
Merge pull request #1 from bitfinity/master
Aug 12, 2014
68f2631
Merge pull request #2 from PTEz/cocoapods_and_warning_fixes
Aug 12, 2014
56fc70d
Add [email protected]
Aug 12, 2014
948c039
Added better support for custom volume view placement
stevestreza Sep 30, 2014
5848fc7
Fixed volume HUD appearing when app is backgrounded
stevestreza Oct 2, 2014
c1e204a
Add Travis configuration
Dec 11, 2014
bba2078
Share Scheme and ignore checkout file
Dec 11, 2014
2ab2053
`pod lib lint` [email protected] only
Dec 11, 2014
ec1086e
Merge pull request #4 from PTEz/cocoapods
Dec 11, 2014
ac8ab2a
Merge pull request #3 from rocklive/master
Dec 11, 2014
656eabc
Bump version
Dec 11, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ build
xcuserdata
VolumeSnap.xcodeproj/project.xcworkspace/contents.xcworkspacedata


*.xccheckout
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

language: objective-c

before_install:
- gem install cocoapods --pre --quiet
- pod --version
- pod setup --silent
- pod repo update --silent

script:
- pod lib lint [email protected]
- xctool -project 'VolumeSnap.xcodeproj' -scheme 'VolumeSnap' -configuration Release -sdk iphonesimulator -arch i386 build
33 changes: 33 additions & 0 deletions RBVolumeButtons.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

Pod::Spec.new do |s|

s.name = "RBVolumeButtons"
s.version = "0.0.1"
s.summary = "This lets you steal the volume up and volume down buttons on iOS."
s.homepage = "https://github.com/blladnar/RBVolumeButtons"

s.license = { :type => 'Apache License, Version 2.0', :text => <<-LICENSE
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
LICENSE
}
s.author = { "Randall Brown" => "" }

s.platform = :ios
s.requires_arc = false

s.source = { :git => "https://github.com/blladnar/RBVolumeButtons.git", :commit => "5ac61f7ddcdfb35e5a8d6844617c9b9f2011587f" }
s.source_files = 'VolumeSnap/RBVolumeButtons.{h,m}'

s.frameworks = 'AudioToolbox', 'MediaPlayer'

end
33 changes: 33 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

Pod::Spec.new do |s|

s.name = "RBVolumeButtons@PTEz"
s.version = "0.1.1"
s.summary = "This lets you steal the volume up and volume down buttons on iOS."
s.homepage = "https://github.com/PTEz/RBVolumeButtons"

s.license = { :type => 'Apache License, Version 2.0', :text => <<-LICENSE
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
LICENSE
}
s.author = { "Ernesto Rivera" => "[email protected]", "Randall Brown" => "" }

s.platform = :ios
s.requires_arc = true

s.source = { :git => "https://github.com/PTEz/RBVolumeButtons.git", :tag => "#{s.version}" }
s.source_files = 'VolumeSnap/RBVolumeButtons.{h,m}'

s.frameworks = 'AudioToolbox', 'MediaPlayer'

end
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
RBVolumeButtons
===============

This lets you steal the volume up and volume down buttons on iOS.


ARC version
23 changes: 17 additions & 6 deletions VolumeSnap.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
70C2EB311475EF4F00751AE8 = {
isa = PBXGroup;
children = (
70C2EB611475FE4900751AE8 /* MediaPlayer.framework */,
70C2EB5F1475F07400751AE8 /* AudioToolbox.framework */,
70C2EB5D1475F03B00751AE8 /* CoreAudio.framework */,
70C2EB461475EF4F00751AE8 /* VolumeSnap */,
70C2EB3F1475EF4F00751AE8 /* Frameworks */,
70C2EB3D1475EF4F00751AE8 /* Products */,
Expand All @@ -82,6 +79,9 @@
70C2EB3F1475EF4F00751AE8 /* Frameworks */ = {
isa = PBXGroup;
children = (
70C2EB5F1475F07400751AE8 /* AudioToolbox.framework */,
70C2EB611475FE4900751AE8 /* MediaPlayer.framework */,
70C2EB5D1475F03B00751AE8 /* CoreAudio.framework */,
70C2EB401475EF4F00751AE8 /* UIKit.framework */,
70C2EB421475EF4F00751AE8 /* Foundation.framework */,
70C2EB441475EF4F00751AE8 /* CoreGraphics.framework */,
Expand Down Expand Up @@ -142,7 +142,7 @@
70C2EB331475EF4F00751AE8 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0460;
LastUpgradeCheck = 0510;
};
buildConfigurationList = 70C2EB361475EF4F00751AE8 /* Build configuration list for PBXProject "VolumeSnap" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -212,8 +212,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand All @@ -228,11 +229,15 @@
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -241,18 +246,22 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
Expand All @@ -264,6 +273,7 @@
70C2EB5B1475EF4F00751AE8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "VolumeSnap/VolumeSnap-Prefix.pch";
INFOPLIST_FILE = "VolumeSnap/VolumeSnap-Info.plist";
Expand All @@ -275,6 +285,7 @@
70C2EB5C1475EF4F00751AE8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "VolumeSnap/VolumeSnap-Prefix.pch";
INFOPLIST_FILE = "VolumeSnap/VolumeSnap-Info.plist";
Expand Down
86 changes: 86 additions & 0 deletions VolumeSnap.xcodeproj/xcshareddata/xcschemes/VolumeSnap.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "70C2EB3B1475EF4F00751AE8"
BuildableName = "VolumeSnap.app"
BlueprintName = "VolumeSnap"
ReferencedContainer = "container:VolumeSnap.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "70C2EB3B1475EF4F00751AE8"
BuildableName = "VolumeSnap.app"
BlueprintName = "VolumeSnap"
ReferencedContainer = "container:VolumeSnap.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "70C2EB3B1475EF4F00751AE8"
BuildableName = "VolumeSnap.app"
BlueprintName = "VolumeSnap"
ReferencedContainer = "container:VolumeSnap.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "70C2EB3B1475EF4F00751AE8"
BuildableName = "VolumeSnap.app"
BlueprintName = "VolumeSnap"
ReferencedContainer = "container:VolumeSnap.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
5 changes: 0 additions & 5 deletions VolumeSnap/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ @implementation AppDelegate

@synthesize window = _window;

- (void)dealloc
{
[_window release];
[super dealloc];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
Expand Down
13 changes: 3 additions & 10 deletions VolumeSnap/RBVolumeButtons.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@
typedef void (^ButtonBlock)();

@interface RBVolumeButtons : NSObject
{
float launchVolume;
BOOL hadToLowerVolume;
BOOL hadToRaiseVolume;

BOOL _isStealingVolumeButtons;
BOOL _suspended;
UIView *_volumeView;
}
{}

@property (nonatomic, copy) ButtonBlock upBlock;
@property (nonatomic, copy) ButtonBlock downBlock;
@property (readonly) float launchVolume;
@property (nonatomic, readonly) float launchVolume;
@property (nonatomic, readonly, strong) UIView *volumeView;

-(void)startStealingVolumeButtonEvents;
-(void)stopStealingVolumeButtonEvents;
Expand Down
Loading