diff --git a/.gitignore b/.gitignore index e0a28ab..63c16c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,101 @@ -.DS_Store + +# Created by https://www.gitignore.io/api/xcode,objective-c +# Edit at https://www.gitignore.io/?templates=xcode,objective-c + +### Objective-C ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated build/ +DerivedData/ -## Xcode Files: +## Various settings *.pbxuser +!default.pbxuser *.mode1v3 +!default.mode1v3 *.mode2v3 -*.perspective +!default.mode2v3 *.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ +# +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Code Injection +# +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +### Objective-C Patch ### + +### Xcode ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno +**/xcshareddata/WorkspaceSettings.xcsettings + +project.xcworkspace/ +xcuserdata/ + +.DS_STORE +Noisy.xcodeproj/project.xcworkspace/xcuserdata/joehoper.xcuserdatad/UserInterfaceState.xcuserstate +Noisy.xcodeproj/project.xcworkspace/xcuserdata/* + +# End of https://www.gitignore.io/api/xcode,objective-c diff --git a/Noisy.xcodeproj/project.pbxproj b/Noisy.xcodeproj/project.pbxproj index 3ba6410..f7b9406 100644 --- a/Noisy.xcodeproj/project.pbxproj +++ b/Noisy.xcodeproj/project.pbxproj @@ -8,6 +8,14 @@ /* Begin PBXBuildFile section */ 0408DF68185E843C00F402CF /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0408DF67185E843C00F402CF /* AudioToolbox.framework */; }; + 2C00303721ED3C7000597473 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C00303621ED3C7000597473 /* AppDelegate.m */; }; + 2C00303A21ED3C7000597473 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C00303921ED3C7000597473 /* ViewController.m */; }; + 2C00303D21ED3C7000597473 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C00303B21ED3C7000597473 /* Main.storyboard */; }; + 2C00303F21ED3C7000597473 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2C00303E21ED3C7000597473 /* Assets.xcassets */; }; + 2C00304221ED3C7000597473 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2C00304021ED3C7000597473 /* LaunchScreen.storyboard */; }; + 2C00304521ED3C7000597473 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C00304421ED3C7000597473 /* main.m */; }; + 2C483C4621ED406900E1C872 /* NoiseGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 552C294E0E04A2CC0048FF6B /* NoiseGenerator.m */; }; + 2CA6FC2921EDD66900C36E92 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CA6FC2821EDD66800C36E92 /* AboutViewController.m */; }; 552C29520E04A2CC0048FF6B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 552C294C0E04A2CC0048FF6B /* main.m */; }; 552C29530E04A2CC0048FF6B /* NoiseGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 552C294E0E04A2CC0048FF6B /* NoiseGenerator.m */; }; 552C29540E04A2CC0048FF6B /* NoisyApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 552C29510E04A2CC0048FF6B /* NoisyApp.m */; }; @@ -37,6 +45,18 @@ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 2C00303321ED3C7000597473 /* NoisyMobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NoisyMobile.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2C00303521ED3C7000597473 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 2C00303621ED3C7000597473 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 2C00303821ED3C7000597473 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 2C00303921ED3C7000597473 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 2C00303C21ED3C7000597473 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 2C00303E21ED3C7000597473 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2C00304121ED3C7000597473 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 2C00304321ED3C7000597473 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2C00304421ED3C7000597473 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 2CA6FC2721EDD66800C36E92 /* AboutViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = ""; }; + 2CA6FC2821EDD66800C36E92 /* AboutViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = ""; }; 550C200D1171C44E0098F573 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 552C294C0E04A2CC0048FF6B /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Source/main.m; sourceTree = ""; }; 552C294D0E04A2CC0048FF6B /* NoiseGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoiseGenerator.h; path = Source/NoiseGenerator.h; sourceTree = ""; }; @@ -54,6 +74,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 2C00303021ED3C7000597473 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8D11072E0486CEB800E47090 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -102,6 +129,7 @@ children = ( 8D1107320486CEB800E47090 /* Noisy.app */, 55C932170E57F13500AE58E3 /* Create Zip */, + 2C00303321ED3C7000597473 /* NoisyMobile.app */, ); name = Products; sourceTree = ""; @@ -112,6 +140,7 @@ 0408DF69185E848600F402CF /* Noisy.entitlements */, 080E96DDFE201D6D7F000001 /* Source */, 29B97317FDCFA39411CA2CEA /* Resources */, + 2C00303421ED3C7000597473 /* NoisyMobile */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); @@ -142,9 +171,44 @@ name = Frameworks; sourceTree = ""; }; + 2C00303421ED3C7000597473 /* NoisyMobile */ = { + isa = PBXGroup; + children = ( + 2C00303521ED3C7000597473 /* AppDelegate.h */, + 2C00303621ED3C7000597473 /* AppDelegate.m */, + 2C00303821ED3C7000597473 /* ViewController.h */, + 2C00303921ED3C7000597473 /* ViewController.m */, + 2C00303B21ED3C7000597473 /* Main.storyboard */, + 2C00303E21ED3C7000597473 /* Assets.xcassets */, + 2C00304021ED3C7000597473 /* LaunchScreen.storyboard */, + 2C00304321ED3C7000597473 /* Info.plist */, + 2C00304421ED3C7000597473 /* main.m */, + 2CA6FC2721EDD66800C36E92 /* AboutViewController.h */, + 2CA6FC2821EDD66800C36E92 /* AboutViewController.m */, + ); + path = NoisyMobile; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 2C00303221ED3C7000597473 /* NoisyMobile */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2C00305C21ED3C7100597473 /* Build configuration list for PBXNativeTarget "NoisyMobile" */; + buildPhases = ( + 2C00302F21ED3C7000597473 /* Sources */, + 2C00303021ED3C7000597473 /* Frameworks */, + 2C00303121ED3C7000597473 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = NoisyMobile; + productName = NoisyMobile; + productReference = 2C00303321ED3C7000597473 /* NoisyMobile.app */; + productType = "com.apple.product-type.application"; + }; 556725530E57EBB300327D19 /* Create Zip */ = { isa = PBXNativeTarget; buildConfigurationList = 556725610E57EC0000327D19 /* Build configuration list for PBXNativeTarget "Create Zip" */; @@ -186,7 +250,16 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { + LastUpgradeCheck = 1010; TargetAttributes = { + 2C00303221ED3C7000597473 = { + CreatedOnToolsVersion = 10.1; + SystemCapabilities = { + com.apple.BackgroundModes = { + enabled = 1; + }; + }; + }; 8D1107260486CEB800E47090 = { SystemCapabilities = { com.apple.Sandbox = { @@ -202,6 +275,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, + Base, ); mainGroup = 29B97314FDCFA39411CA2CEA /* Noise2 */; projectDirPath = ""; @@ -209,11 +283,22 @@ targets = ( 8D1107260486CEB800E47090 /* Noisy */, 556725530E57EBB300327D19 /* Create Zip */, + 2C00303221ED3C7000597473 /* NoisyMobile */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 2C00303121ED3C7000597473 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C00304221ED3C7000597473 /* LaunchScreen.storyboard in Resources */, + 2C00303F21ED3C7000597473 /* Assets.xcassets in Resources */, + 2C00303D21ED3C7000597473 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8D1107290486CEB800E47090 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -259,6 +344,18 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 2C00302F21ED3C7000597473 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C483C4621ED406900E1C872 /* NoiseGenerator.m in Sources */, + 2CA6FC2921EDD66900C36E92 /* AboutViewController.m in Sources */, + 2C00303A21ED3C7000597473 /* ViewController.m in Sources */, + 2C00304521ED3C7000597473 /* main.m in Sources */, + 2C00303721ED3C7000597473 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 8D11072C0486CEB800E47090 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -288,6 +385,22 @@ name = InfoPlist.strings; sourceTree = ""; }; + 2C00303B21ED3C7000597473 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2C00303C21ED3C7000597473 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 2C00304021ED3C7000597473 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2C00304121ED3C7000597473 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; 8D7FC7931213A76F00EB152C /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( @@ -299,13 +412,107 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 2C00305D21ED3C7100597473 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + arm64, + arm64e, + armv7, + armv7s, + x86_64, + ); + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = NoisyMobile/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.github.jonshea.noisy; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "arm64 arm64e armv7 armv7s x86_64"; + }; + name = Debug; + }; + 2C00305E21ED3C7100597473 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + arm64, + arm64e, + armv7, + armv7s, + x86_64, + ); + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = NoisyMobile/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.github.jonshea.noisy; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VALID_ARCHS = "arm64 arm64e armv7 armv7s x86_64"; + }; + name = Release; + }; 556725560E57EBB400327D19 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -317,7 +524,6 @@ "-framework", AppKit, ); - PREBINDING = NO; PRODUCT_NAME = ""; }; name = Debug; @@ -326,9 +532,9 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; @@ -339,7 +545,6 @@ "-framework", AppKit, ); - PREBINDING = NO; PRODUCT_NAME = "Create Zip"; ZERO_LINK = NO; }; @@ -348,12 +553,11 @@ C01FCF4B08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_ENTITLEMENTS = Noisy.entitlements; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -361,6 +565,7 @@ INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "$(HOME)/Applications"; ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.rathertremendous.noisy; PRODUCT_NAME = Noisy; SDKROOT = macosx; VALID_ARCHS = "ppc i386 x86_64"; @@ -372,7 +577,7 @@ C01FCF4C08A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_ENTITLEMENTS = Noisy.entitlements; CODE_SIGN_IDENTITY = "-"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -381,6 +586,7 @@ GCC_PREFIX_HEADER = Source/Noisy.pch; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_BUNDLE_IDENTIFIER = com.rathertremendous.noisy; PRODUCT_NAME = Noisy; SDKROOT = macosx; VALID_ARCHS = "ppc i386 x86_64"; @@ -391,30 +597,87 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = 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; - PREBINDING = NO; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + VALID_ARCHS = ""; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - ppc, - i386, - ); + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = 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; - PREBINDING = NO; + MACOSX_DEPLOYMENT_TARGET = 10.7; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + VALID_ARCHS = ""; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 2C00305C21ED3C7100597473 /* Build configuration list for PBXNativeTarget "NoisyMobile" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2C00305D21ED3C7100597473 /* Debug */, + 2C00305E21ED3C7100597473 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 556725610E57EC0000327D19 /* Build configuration list for PBXNativeTarget "Create Zip" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Noisy.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Noisy.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Noisy.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Noisy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Noisy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Noisy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/NoisyMobile/AboutViewController.h b/NoisyMobile/AboutViewController.h new file mode 100644 index 0000000..199c933 --- /dev/null +++ b/NoisyMobile/AboutViewController.h @@ -0,0 +1,14 @@ +// +// AboutViewController.h +// NoisyMobile +// +// Created by Joe Hoper on 15/01/2019. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@interface AboutViewController : UIViewController + +@end +NS_ASSUME_NONNULL_END diff --git a/NoisyMobile/AboutViewController.m b/NoisyMobile/AboutViewController.m new file mode 100644 index 0000000..26b76ac --- /dev/null +++ b/NoisyMobile/AboutViewController.m @@ -0,0 +1,30 @@ +// +// AboutViewController.m +// NoisyMobile +// +// Created by Joe Hoper on 15/01/2019. +// + +#import "AboutViewController.h" +#import "../Source/NoiseGenerator.h" + +@implementation AboutViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +- (IBAction)viewOnGitHubTapped:(id)sender { + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:GITHUB_URL] options:@{} completionHandler:nil]; +} + +- (IBAction)viewOnWikipediaTapped:(id)sender { + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:WIKIPEDIA_URL] options:@{} completionHandler:nil]; +} + +- (IBAction)backButtonTapped:(id)sender { + [self dismissViewControllerAnimated:YES completion:nil]; +} + +@end diff --git a/NoisyMobile/AppDelegate.h b/NoisyMobile/AppDelegate.h new file mode 100644 index 0000000..b1244e3 --- /dev/null +++ b/NoisyMobile/AppDelegate.h @@ -0,0 +1,16 @@ +// +// AppDelegate.h +// NoisyMobile +// +// Created by Joe Hoper on 14/01/2019. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/NoisyMobile/AppDelegate.m b/NoisyMobile/AppDelegate.m new file mode 100644 index 0000000..6459513 --- /dev/null +++ b/NoisyMobile/AppDelegate.m @@ -0,0 +1,50 @@ +// +// AppDelegate.m +// NoisyMobile +// +// Created by Joe Hoper on 14/01/2019. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/Contents.json b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..0238d02 --- /dev/null +++ b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,116 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "noisy-20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "noisy-20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "noisy-29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "noisy-29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "noisy-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "noisy-40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "noisy-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "noisy-60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "noisy-20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "noisy-20@2x-1.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "noisy-29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "noisy-29@2x-1.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "noisy-40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "noisy-40@2x-1.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "noisy-76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "noisy-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "noisy-83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "noisy-1024.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-1024.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-1024.png new file mode 100644 index 0000000..c4cb870 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-1024.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@1x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@1x.png new file mode 100644 index 0000000..92cb4d9 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@1x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@2x-1.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@2x-1.png new file mode 100644 index 0000000..c6597c2 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@2x-1.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@2x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@2x.png new file mode 100644 index 0000000..c6597c2 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@2x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@3x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@3x.png new file mode 100644 index 0000000..3a77839 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-20@3x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@1x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@1x.png new file mode 100644 index 0000000..ab9c0b2 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@1x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@2x-1.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@2x-1.png new file mode 100644 index 0000000..886c239 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@2x-1.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@2x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@2x.png new file mode 100644 index 0000000..886c239 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@2x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@3x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@3x.png new file mode 100644 index 0000000..c68d22a Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-29@3x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@1x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@1x.png new file mode 100644 index 0000000..c6597c2 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@1x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@2x-1.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@2x-1.png new file mode 100644 index 0000000..9fb569e Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@2x-1.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@2x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@2x.png new file mode 100644 index 0000000..9fb569e Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@2x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@3x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@3x.png new file mode 100644 index 0000000..6f70ce8 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-40@3x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-60@2x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-60@2x.png new file mode 100644 index 0000000..3a58d78 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-60@2x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-60@3x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-60@3x.png new file mode 100644 index 0000000..59debb1 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-60@3x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-76@1x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-76@1x.png new file mode 100644 index 0000000..74fd70e Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-76@1x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-76@2x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-76@2x.png new file mode 100644 index 0000000..be898af Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-76@2x.png differ diff --git a/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-83.5@2x.png b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-83.5@2x.png new file mode 100644 index 0000000..dc9decd Binary files /dev/null and b/NoisyMobile/Assets.xcassets/AppIcon.appiconset/noisy-83.5@2x.png differ diff --git a/NoisyMobile/Assets.xcassets/Contents.json b/NoisyMobile/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/NoisyMobile/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NoisyMobile/Assets.xcassets/Noisy.imageset/Contents.json b/NoisyMobile/Assets.xcassets/Noisy.imageset/Contents.json new file mode 100644 index 0000000..f6c845d --- /dev/null +++ b/NoisyMobile/Assets.xcassets/Noisy.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Noisy_128x128x32.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Noisy_256x256x32.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Noisy_512x512x32.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_128x128x32.png b/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_128x128x32.png new file mode 100644 index 0000000..40f6fb3 Binary files /dev/null and b/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_128x128x32.png differ diff --git a/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_256x256x32.png b/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_256x256x32.png new file mode 100644 index 0000000..2b4b86f Binary files /dev/null and b/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_256x256x32.png differ diff --git a/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_512x512x32.png b/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_512x512x32.png new file mode 100644 index 0000000..34b4dac Binary files /dev/null and b/NoisyMobile/Assets.xcassets/Noisy.imageset/Noisy_512x512x32.png differ diff --git a/NoisyMobile/Base.lproj/LaunchScreen.storyboard b/NoisyMobile/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/NoisyMobile/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NoisyMobile/Base.lproj/Main.storyboard b/NoisyMobile/Base.lproj/Main.storyboard new file mode 100644 index 0000000..a8b2e56 --- /dev/null +++ b/NoisyMobile/Base.lproj/Main.storyboard @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NoisyMobile/Info.plist b/NoisyMobile/Info.plist new file mode 100644 index 0000000..e3be84f --- /dev/null +++ b/NoisyMobile/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Noisy + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.00 + CFBundleVersion + 2 + LSRequiresIPhoneOS + + UIBackgroundModes + + audio + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/NoisyMobile/ViewController.h b/NoisyMobile/ViewController.h new file mode 100644 index 0000000..fbb197b --- /dev/null +++ b/NoisyMobile/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// NoisyMobile +// +// Created by Joe Hoper on 14/01/2019. +// + +#import + +#define PLAY_IN_BACKGROUND_KEY @"PLAY_IN_BACKGROUND" + +@interface ViewController : UIViewController +@property (weak, nonatomic) IBOutlet UISwitch *playInBackgroundSwitch; +- (IBAction)playInBackgroundSwitchChanged:(id)sender; +@end diff --git a/NoisyMobile/ViewController.m b/NoisyMobile/ViewController.m new file mode 100644 index 0000000..51d1d00 --- /dev/null +++ b/NoisyMobile/ViewController.m @@ -0,0 +1,68 @@ +// +// ViewController.m +// NoisyMobile +// +// Created by Joe Hoper on 14/01/2019. +// + +#import "ViewController.h" +#import "../Source/NoiseGenerator.h" +#import + +@implementation ViewController { + NoiseGenerator *generator; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + if ([[NSUserDefaults standardUserDefaults] objectForKey:PLAY_IN_BACKGROUND_KEY] != nil) { + BOOL playInBackground = [[NSUserDefaults standardUserDefaults] boolForKey:PLAY_IN_BACKGROUND_KEY]; + [self setPlaybackMode:playInBackground]; + [self.playInBackgroundSwitch setOn:playInBackground]; + } + + generator = [[NoiseGenerator alloc] init]; +} + +- (IBAction)noiseTypeChanged:(UISegmentedControl *)sender { + switch (sender.selectedSegmentIndex) { + case 0: + [generator setType:NoNoiseType]; + break; + case 1: + [generator setType:WhiteNoiseType]; + break; + case 2: + [generator setType:PinkNoiseType]; + break; + case 3: + [generator setType:BrownNoiseType]; + break; + } +} + +- (IBAction)volumeSliderChanged:(UISlider *)sender { + [generator setVolume:sender.value]; +} + +- (void)setPlaybackMode:(BOOL)playInBackground { + AVAudioSessionCategory sessionCategory = playInBackground + ? AVAudioSessionCategoryPlayback + : AVAudioSessionCategorySoloAmbient; + + NSError *error; + [[AVAudioSession sharedInstance] setCategory:sessionCategory error:&error]; + if (error) { + NSLog(@"Error setting audio session category: %@", error); + return; + } + + [[NSUserDefaults standardUserDefaults] setBool:playInBackground forKey:PLAY_IN_BACKGROUND_KEY]; +} + +- (IBAction)playInBackgroundSwitchChanged:(id)sender { + [self setPlaybackMode:self.playInBackgroundSwitch.on]; +} + +@end diff --git a/NoisyMobile/main.m b/NoisyMobile/main.m new file mode 100644 index 0000000..46e9145 --- /dev/null +++ b/NoisyMobile/main.m @@ -0,0 +1,15 @@ +// +// main.m +// NoisyMobile +// +// Created by Joe Hoper on 14/01/2019. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/README b/README index 698efda..ae1bb1a 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ Download: http://github.com/downloads/jonshea/Noisy/Noisy.zip What? -Noisy is a random audio noise generator for OS X. It is based on “Noise” by Blackhole Media. It was maintained anonymously at http://code.google.com/p/noisy/, and is now maintained at http://github.com/jonshea/Noisy. +Noisy is a random audio noise generator for OS X and iOS. It is based on “Noise” by Blackhole Media. It was maintained anonymously at http://code.google.com/p/noisy/, and is now maintained at http://github.com/jonshea/Noisy. Why? Does your coworker use a gigantic, over-engineered, mechanically switched keyboard that, when he gets up to speed, sounds like a train wrecking? Do people like to chit-chat next to you while you’re trying to work? Do high school students walk past your window every day shouting at each other so loudly that you’re certain they must be about to start a brawl, and do you, every day, go to the window to investigate only to discover that’s just how they communicate normally with each other? Are you otherwise easily distracted? diff --git a/Resources/English.lproj/InfoPlist.strings b/Resources/English.lproj/InfoPlist.strings index a354b5b..0a525d3 100755 Binary files a/Resources/English.lproj/InfoPlist.strings and b/Resources/English.lproj/InfoPlist.strings differ diff --git a/Resources/English.lproj/MainMenu.xib b/Resources/English.lproj/MainMenu.xib index b82fdf1..22e4f1a 100644 --- a/Resources/English.lproj/MainMenu.xib +++ b/Resources/English.lproj/MainMenu.xib @@ -1,1378 +1,144 @@ - - - 1050 - 10F569 - 783 - 1038.29 - 461.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 783 - - - YES - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES - - NoisyApp - - - FirstResponder - - - NSApplication - - - MainMenu - - YES - - - Noisy - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - submenuAction: - - Noisy - - YES - - - About Noisy - - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Hide Noisy - h - 1048576 - 2147483647 - - - - - - Hide Others - - 1048576 - 2147483647 - - - - - - Show All - 1 - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Quit Noisy - q - 1048576 - 2147483647 - - - - - _NSAppleMenu - - - - - Window - - 1048576 - 2147483647 - - - submenuAction: - - - Window - - - YES - - - Close Window - w - 1048576 - 2147483647 - - - - - - Minimize - m - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Bring All to Front - - 1048576 - 2147483647 - - - - - _NSWindowsMenu - - - - - Help - - 1048576 - 2147483647 - - - submenuAction: - - - Help - - - YES - - - About the “Colors” of Noise - - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - - Noisy Website - - 1048576 - 2147483647 - - - - - - - - _NSMainMenu - - - 263 - 2 - {{570, 471}, {230, 60}} - 611844096 - - NSWindow - - {3.40282e+38, 3.40282e+38} - - - 256 - - YES - - - 268 - {{10, 30}, {210, 25}} - - YES - - -2080244224 - 0 - - LucidaGrande - 13 - 16 - - - - YES - - Off - 0 - - - White - 1 - 0 - - - Pink - 2 - 0 - - - Brown - 3 - YES - 0 - - - 3 - 2 - - - - - 268 - {{8, 5}, {214, 21}} - - YES - - -2079981824 - 0 - - - Helvetica - 12 - 16 - - - 1 - 0.0 - 1 - 0.0 - 0 - 1 - NO - NO - - - - {230, 60} - - {{0, 0}, {1280, 778}} - {3.40282e+38, 3.40282e+38} - NoisyWindow - - - NoisyApp - - - - - YES - - - openNoisyWebsite: - - - - 271 - - - - selectedTag: noiseType - - - - - - selectedTag: noiseType - selectedTag - noiseType - 2 - - - 292 - - - - value: volume - - - - - - value: volume - value - volume - 2 - - - 293 - - - - oWindow - - - - 295 - - - - hide: - - - - 299 - - - - terminate: - - - - 300 - - - - miniaturizeAll: - - - - 301 - - - - hideOtherApplications: - - - - 302 - - - - orderFrontStandardAboutPanel: - - - - 303 - - - - delegate - - - - 305 - - - - orderOut: - - - - 309 - - - - makeKeyAndOrderFront: - - - - 310 - - - - delegate - - - - 312 - - - - openAboutNoiseColors: - - - - 313 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 29 - - - YES - - - - - - MainMenu - - - 19 - - - YES - - - - - - 24 - - - YES - - - - - - - - - 5 - - - - - 23 - - - - - 92 - - - - - 56 - - - YES - - - - - - 57 - - - YES - - - - - - - - - - - - 58 - - - - - 134 - - - - - 136 - - - - - 145 - - - - - 149 - - - - - 150 - - - - - 231 - - - - - 103 - - - YES - - - - - - 106 - - - YES - - - - - - - - 270 - - - - - 276 - - - - - 278 - - - - - 240 - - - YES - - - - Window - - - 241 - - - YES - - - - - - - 242 - - - YES - - - - - - 244 - - - YES - - - - - - 283 - - - - - 284 - - - - - 291 - - - NoisyApp - - - 307 - - - - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 103.IBPluginDependency - 103.ImportedFromIB2 - 106.IBEditorWindowLastContentRect - 106.IBPluginDependency - 106.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 19.IBPluginDependency - 19.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 231.IBPluginDependency - 231.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 240.IBEditorWindowLastContentRect - 240.IBPluginDependency - 240.IBWindowTemplateEditedContentRect - 240.ImportedFromIB2 - 240.NSWindowTemplate.visibleAtLaunch - 241.IBPluginDependency - 241.ImportedFromIB2 - 242.IBPluginDependency - 242.ImportedFromIB2 - 244.IBPluginDependency - 244.ImportedFromIB2 - 270.IBPluginDependency - 270.ImportedFromIB2 - 276.IBPluginDependency - 276.ImportedFromIB2 - 278.IBPluginDependency - 278.ImportedFromIB2 - 283.IBPluginDependency - 283.IBSegmentedControlInspectorSelectedSegmentMetadataKey - 284.IBPluginDependency - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 307.IBPluginDependency - 5.IBPluginDependency - 5.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{976, 783}, {253, 53}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{905, 763}, {194, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{381, 534}, {230, 60}} - com.apple.InterfaceBuilder.CocoaPlugin - {{381, 534}, {230, 60}} - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - {{834, 836}, {203, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{846, 713}, {159, 123}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - - - - - YES - - - YES - - - - 313 - - - - YES - - FirstResponder - NSObject - - IBUserSource - - - - - NoisyApp - NSApplication - - YES - - YES - openAboutNoiseColors: - openNoisyWebsite: - - - YES - id - id - - - - YES - - YES - openAboutNoiseColors: - openNoisyWebsite: - - - YES - - openAboutNoiseColors: - id - - - openNoisyWebsite: - id - - - - - oWindow - NSWindow - - - oWindow - - oWindow - NSWindow - - - - IBProjectSource - Source/NoisyApp.h - - - - NoisyApp - NSApplication - - IBUserSource - - - - - - YES - - NSActionCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSActionCell.h - - - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSCell - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSCell.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSSegmentedCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSSegmentedCell.h - - - - NSSegmentedControl - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSSegmentedControl.h - - - - NSSlider - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSSlider.h - - - - NSSliderCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSSliderCell.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../../Noisy.xcodeproj - 3 - - YES - - YES - NSMenuCheckmark - NSMenuMixedState - - - YES - {9, 8} - {7, 2} - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Resources/Info.plist b/Resources/Info.plist index f6a9904..bb7d1c0 100644 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile Noisy CFBundleIdentifier - com.rathertremendous.noisy + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 1.3 + 1.4 NSAppleScriptEnabled YES NSMainNibFile diff --git a/Source/NoiseGenerator.h b/Source/NoiseGenerator.h index d76b74f..52876f0 100644 --- a/Source/NoiseGenerator.h +++ b/Source/NoiseGenerator.h @@ -36,10 +36,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#import #import +#define WIKIPEDIA_URL @"http://en.wikipedia.org/wiki/Colors_of_noise" +#define GITHUB_URL @"http://github.com/jonshea/Noisy" #define kPinkMaxRandomRows 32 #define kPinkRandomBits 30 diff --git a/Source/NoiseGenerator.m b/Source/NoiseGenerator.m index 1a835e0..79d89ce 100644 --- a/Source/NoiseGenerator.m +++ b/Source/NoiseGenerator.m @@ -38,7 +38,16 @@ #import "NoiseGenerator.h" -#import + +#if TARGET_OS_IOS + #define NG_CAST __bridge NoiseGenerator * + #define SELF_TO_VOID_STAR (__bridge void *)self + #define kAudioHardwareNoError 0 +#else + #import + #define NG_CAST NoiseGenerator * + #define SELF_TO_VOID_STAR self +#endif @interface NoiseGenerator (Internal) @@ -62,16 +71,16 @@ static unsigned long sGetNextRandomNumber() static void sAudioQueueOutputCallback(void *inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) { - NoiseGenerator *generator = (NoiseGenerator *)inUserData; + NoiseGenerator *generator = (NG_CAST)inUserData; [generator _processBuffer:inBuffer]; } -static OSStatus sDefaultOutputDeviceChanged(AudioHardwarePropertyID inPropertyID, void *inClientData) -{ - NoiseGenerator *generator = (NoiseGenerator *)inClientData; - return [generator defaultOutputDeviceChanged]; -} +//static OSStatus sDefaultOutputDeviceChanged(AudioHardwarePropertyID inPropertyID, void *inClientData) +//{ +// NoiseGenerator *generator = (NoiseGenerator *)inClientData; +// return [generator defaultOutputDeviceChanged]; +//} @implementation NoiseGenerator @@ -85,13 +94,13 @@ - (id) init return self; } - +#ifndef TARGET_OS_IOS - (void)dealloc { [self stopAudio]; [super dealloc]; } - +#endif - (void)initRandomEnv:(long)numRows { @@ -129,7 +138,7 @@ - (void) startAudio description.mBitsPerChannel = sizeof(float) * 8; _isPlaying = YES; - OSStatus err = AudioQueueNewOutput(&description, sAudioQueueOutputCallback, self, CFRunLoopGetCurrent(), kCFRunLoopCommonModes, 0, &_queue); + OSStatus err = AudioQueueNewOutput(&description, sAudioQueueOutputCallback, SELF_TO_VOID_STAR, CFRunLoopGetCurrent(), kCFRunLoopCommonModes, 0, &_queue); if (err) { NSLog(@"AudioQueueNewOutput returned %d", err); return; } NSUInteger i; @@ -161,7 +170,7 @@ - (void) _processBuffer:(AudioQueueBufferRef)audioQueueBuffer UInt32 bufferFrames = bufferSize / sizeof(float); float *buffer = (float *)audioQueueBuffer->mAudioData; float sample; - UInt32 i; + UInt32 i = 0; // White Noise if (_type == WhiteNoiseType) { diff --git a/Source/NoisyApp.m b/Source/NoisyApp.m index a3290ad..e8fd553 100644 --- a/Source/NoisyApp.m +++ b/Source/NoisyApp.m @@ -54,8 +54,8 @@ - (void)awakeFromNib [self setVolume:[[NSUserDefaults standardUserDefaults] doubleForKey:sNoiseVolumeKeyPath]]; // int p = [[NSUserDefaults standardUserDefaults] integerForKey:sPreviousNoiseTypeKeyPath]; - [self setNoiseType:[[NSUserDefaults standardUserDefaults] integerForKey:sNoiseTypeKeyPath]]; - previousNoiseType = [[NSUserDefaults standardUserDefaults] integerForKey:sPreviousNoiseTypeKeyPath]; + [self setNoiseType:(int)[[NSUserDefaults standardUserDefaults] integerForKey:sNoiseTypeKeyPath]]; + previousNoiseType = (int)[[NSUserDefaults standardUserDefaults] integerForKey:sPreviousNoiseTypeKeyPath]; [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(handleWorkspaceWillSleepNotification:) name:NSWorkspaceWillSleepNotification object:NULL]; } @@ -177,14 +177,14 @@ - (void)sendEvent:(NSEvent *)anEvent - (IBAction)openAboutNoiseColors:(id)sender { - NSURL *url = [NSURL URLWithString:@"http://en.wikipedia.org/wiki/Colors_of_noise"]; + NSURL *url = [NSURL URLWithString:WIKIPEDIA_URL]; [[NSWorkspace sharedWorkspace] openURL:url]; } - (IBAction)openNoisyWebsite:(id)sender { - NSURL *url = [NSURL URLWithString:@"http://github.com/jonshea/Noisy"]; + NSURL *url = [NSURL URLWithString:GITHUB_URL]; [[NSWorkspace sharedWorkspace] openURL:url]; } @@ -194,7 +194,7 @@ - (IBAction)openNoisyWebsite:(id)sender - (id) scriptNoiseType { - NoiseType type = [[NSUserDefaults standardUserDefaults] integerForKey:sNoiseTypeKeyPath]; + NoiseType type = (int)[[NSUserDefaults standardUserDefaults] integerForKey:sNoiseTypeKeyPath]; OSType scriptType; if (type == WhiteNoiseType) { @@ -211,7 +211,7 @@ - (id) scriptNoiseType - (void)setScriptNoiseType:(id)scriptTypeAsNumber { - OSType scriptType = [scriptTypeAsNumber unsignedIntegerValue]; + OSType scriptType = (int)[scriptTypeAsNumber unsignedIntegerValue]; NoiseType type; if (scriptType == 'Nnon') {