diff --git a/ExampleProject/Example.xcodeproj/project.pbxproj b/ExampleProject/Example.xcodeproj/project.pbxproj index 8d868b04..187075a1 100644 --- a/ExampleProject/Example.xcodeproj/project.pbxproj +++ b/ExampleProject/Example.xcodeproj/project.pbxproj @@ -8,6 +8,10 @@ /* Begin PBXBuildFile section */ 0C9D527520AF4EAA93E80BC5 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A64AE23935D5499BAF0AC8C1 /* libPods.a */; }; + 69EED4131922FA4100C1510F /* error.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 69EED4121922FA4100C1510F /* error.mp3 */; }; + 69EED4151922FAA400C1510F /* warning.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 69EED4141922FAA400C1510F /* warning.mp3 */; }; + 69EED4171922FAE300C1510F /* message.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 69EED4161922FAE300C1510F /* message.mp3 */; }; + 69EED4191922FB5100C1510F /* success.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 69EED4181922FB5100C1510F /* success.mp3 */; }; CA0B97051719CD6800E06F84 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA0B97041719CD6800E06F84 /* UIKit.framework */; }; CA0B97071719CD6800E06F84 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA0B97061719CD6800E06F84 /* Foundation.framework */; }; CA0B97091719CD6800E06F84 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA0B97081719CD6800E06F84 /* CoreGraphics.framework */; }; @@ -23,6 +27,10 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 69EED4121922FA4100C1510F /* error.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = error.mp3; sourceTree = ""; }; + 69EED4141922FAA400C1510F /* warning.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = warning.mp3; sourceTree = ""; }; + 69EED4161922FAE300C1510F /* message.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = message.mp3; sourceTree = ""; }; + 69EED4181922FB5100C1510F /* success.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = success.mp3; sourceTree = ""; }; 8B33F75B47A447C8B36A0061 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = SOURCE_ROOT; }; A64AE23935D5499BAF0AC8C1 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; CA0B97011719CD6800E06F84 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -105,6 +113,10 @@ CA0B970B1719CD6800E06F84 /* Supporting Files */ = { isa = PBXGroup; children = ( + 69EED4141922FAA400C1510F /* warning.mp3 */, + 69EED4161922FAE300C1510F /* message.mp3 */, + 69EED4181922FB5100C1510F /* success.mp3 */, + 69EED4121922FA4100C1510F /* error.mp3 */, CA0B970C1719CD6800E06F84 /* Example-Info.plist */, CA0B970D1719CD6800E06F84 /* InfoPlist.strings */, CA0B97101719CD6800E06F84 /* main.m */, @@ -169,10 +181,14 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 69EED4131922FA4100C1510F /* error.mp3 in Resources */, CA0B970F1719CD6800E06F84 /* InfoPlist.strings in Resources */, + 69EED4191922FB5100C1510F /* success.mp3 in Resources */, CA0B97171719CD6800E06F84 /* Default.png in Resources */, CA0B97191719CD6800E06F84 /* Default@2x.png in Resources */, + 69EED4171922FAE300C1510F /* message.mp3 in Resources */, CA0B971B1719CD6800E06F84 /* Default-568h@2x.png in Resources */, + 69EED4151922FAA400C1510F /* warning.mp3 in Resources */, CA0B971E1719CD6800E06F84 /* MainStoryboard.storyboard in Resources */, CAA3C9E817C3CD180085E06E /* AlternativeDesign.json in Resources */, ); diff --git a/ExampleProject/Example/TSDemoViewController.m b/ExampleProject/Example/TSDemoViewController.m index fd057035..fcbf51d8 100644 --- a/ExampleProject/Example/TSDemoViewController.m +++ b/ExampleProject/Example/TSDemoViewController.m @@ -18,6 +18,9 @@ - (void)viewDidLoad [super viewDidLoad]; [TSMessage setDefaultViewController:self]; + [TSMessage setDefaultNotificationSoundWithName:@"message" andExtension:@"mp3"]; + [TSMessage setSoundWithName:@"error" extension:@"mp3" forNotificationType:TSMessageNotificationTypeError]; + [TSMessage setSoundWithName:@"warning" extension:@"mp3" forNotificationType:TSMessageNotificationTypeWarning]; self.wantsFullScreenLayout = YES; [self.navigationController.navigationBar setTranslucent:YES]; } diff --git a/ExampleProject/Example/error.mp3 b/ExampleProject/Example/error.mp3 new file mode 100755 index 00000000..16e5558a Binary files /dev/null and b/ExampleProject/Example/error.mp3 differ diff --git a/ExampleProject/Example/message.mp3 b/ExampleProject/Example/message.mp3 new file mode 100755 index 00000000..2b1ecaad Binary files /dev/null and b/ExampleProject/Example/message.mp3 differ diff --git a/ExampleProject/Example/success.mp3 b/ExampleProject/Example/success.mp3 new file mode 100755 index 00000000..6da178c3 Binary files /dev/null and b/ExampleProject/Example/success.mp3 differ diff --git a/ExampleProject/Example/warning.mp3 b/ExampleProject/Example/warning.mp3 new file mode 100755 index 00000000..7c069f3a Binary files /dev/null and b/ExampleProject/Example/warning.mp3 differ diff --git a/ExampleProject/Podfile.lock b/ExampleProject/Podfile.lock index 229e91c9..0227248c 100644 --- a/ExampleProject/Podfile.lock +++ b/ExampleProject/Podfile.lock @@ -1,6 +1,6 @@ PODS: - HexColors (2.2.1) - - TSMessages (0.9.4): + - TSMessages (0.9.9): - HexColors DEPENDENCIES: @@ -11,7 +11,7 @@ EXTERNAL SOURCES: :path: .. SPEC CHECKSUMS: - HexColors: 3a68db077cd6572a8f7d4aa1add284dd2436a934 - TSMessages: de3fecb312d44078128add86d4347307669d0af2 + HexColors: 99211502e17904af7891fc8f687d0e4958a6d66e + TSMessages: 078f4d4a92335417d862c3460e8676588d0a974a -COCOAPODS: 0.29.0 +COCOAPODS: 0.32.1 diff --git a/ExampleProject/Pods/Local Podspecs/TSMessages.podspec b/ExampleProject/Pods/Local Podspecs/TSMessages.podspec index c9f9cdef..1afc7d40 100644 --- a/ExampleProject/Pods/Local Podspecs/TSMessages.podspec +++ b/ExampleProject/Pods/Local Podspecs/TSMessages.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "TSMessages" - s.version = "0.9.4" + s.version = "0.9.9" s.summary = "Easy to use and customizable messages/notifications for iOS à la Tweetbot." s.description = <<-DESC This framework provides an easy to use class to show little notification views on the top of the screen. (à la Tweetbot). @@ -24,5 +24,6 @@ There are 4 different types already set up for you: Success, Error, Warning, Mes s.requires_arc = true + s.framework = 'AVFoundation' s.dependency 'HexColors' end diff --git a/ExampleProject/Pods/Manifest.lock b/ExampleProject/Pods/Manifest.lock index 229e91c9..0227248c 100644 --- a/ExampleProject/Pods/Manifest.lock +++ b/ExampleProject/Pods/Manifest.lock @@ -1,6 +1,6 @@ PODS: - HexColors (2.2.1) - - TSMessages (0.9.4): + - TSMessages (0.9.9): - HexColors DEPENDENCIES: @@ -11,7 +11,7 @@ EXTERNAL SOURCES: :path: .. SPEC CHECKSUMS: - HexColors: 3a68db077cd6572a8f7d4aa1add284dd2436a934 - TSMessages: de3fecb312d44078128add86d4347307669d0af2 + HexColors: 99211502e17904af7891fc8f687d0e4958a6d66e + TSMessages: 078f4d4a92335417d862c3460e8676588d0a974a -COCOAPODS: 0.29.0 +COCOAPODS: 0.32.1 diff --git a/ExampleProject/Pods/Pods-TSMessages-Private.xcconfig b/ExampleProject/Pods/Pods-TSMessages-Private.xcconfig index c06eb5ba..dc5617c0 100644 --- a/ExampleProject/Pods/Pods-TSMessages-Private.xcconfig +++ b/ExampleProject/Pods/Pods-TSMessages-Private.xcconfig @@ -1,5 +1,5 @@ #include "Pods-TSMessages.xcconfig" GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/TSMessages" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/HexColors" "${PODS_ROOT}/Headers/TSMessages" -OTHER_LDFLAGS = -ObjC +OTHER_LDFLAGS = -ObjC ${PODS_TSMESSAGES_OTHER_LDFLAGS} PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/ExampleProject/Pods/Pods-TSMessages.xcconfig b/ExampleProject/Pods/Pods-TSMessages.xcconfig index e69de29b..55b8f450 100644 --- a/ExampleProject/Pods/Pods-TSMessages.xcconfig +++ b/ExampleProject/Pods/Pods-TSMessages.xcconfig @@ -0,0 +1 @@ +PODS_TSMESSAGES_OTHER_LDFLAGS = -framework AVFoundation \ No newline at end of file diff --git a/ExampleProject/Pods/Pods-environment.h b/ExampleProject/Pods/Pods-environment.h index f5642e91..afd46bac 100644 --- a/ExampleProject/Pods/Pods-environment.h +++ b/ExampleProject/Pods/Pods-environment.h @@ -16,5 +16,5 @@ #define COCOAPODS_POD_AVAILABLE_TSMessages #define COCOAPODS_VERSION_MAJOR_TSMessages 0 #define COCOAPODS_VERSION_MINOR_TSMessages 9 -#define COCOAPODS_VERSION_PATCH_TSMessages 4 +#define COCOAPODS_VERSION_PATCH_TSMessages 9 diff --git a/ExampleProject/Pods/Pods.xcconfig b/ExampleProject/Pods/Pods.xcconfig index 1a9622ab..57f3569a 100644 --- a/ExampleProject/Pods/Pods.xcconfig +++ b/ExampleProject/Pods/Pods.xcconfig @@ -1,5 +1,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/HexColors" "${PODS_ROOT}/Headers/TSMessages" -OTHER_CFLAGS = $(inherited) "-isystem${PODS_ROOT}/Headers" "-isystem${PODS_ROOT}/Headers/HexColors" "-isystem${PODS_ROOT}/Headers/TSMessages" -OTHER_LDFLAGS = -ObjC +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/HexColors" -isystem "${PODS_ROOT}/Headers/TSMessages" +OTHER_LDFLAGS = -ObjC -framework AVFoundation PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/ExampleProject/Pods/Pods.xcodeproj/project.pbxproj b/ExampleProject/Pods/Pods.xcodeproj/project.pbxproj index 6e78b8c5..1ddf0afa 100644 --- a/ExampleProject/Pods/Pods.xcodeproj/project.pbxproj +++ b/ExampleProject/Pods/Pods.xcodeproj/project.pbxproj @@ -10,187 +10,223 @@ 46 objects - 03C6013078E94A0E82974916 + 00A4702867E54D94BA8FFFBB - baseConfigurationReference - 73A7EA8E61034AC98667E196 - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - YES - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-HexColors-prefix.pch - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 5.1 - OTHER_CFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_CPLUSPLUSFLAGS - - -DNS_BLOCK_ASSERTIONS=1 - $(inherited) - - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - VALIDATE_PRODUCT - YES - + buildConfigurations + + D983ACA9FF674768B54600AD + 7353D2C78F6449BEA144EA37 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release isa - XCBuildConfiguration + XCConfigurationList + + 07EC5C45321E42239C3AF5A7 + + containerPortal + E7AA7FB0036D4026AB1A047D + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 518EFA9B97E049B59D8F6CA6 + remoteInfo + Pods-HexColors + + 086B6A5DC0214AFE8F2E57CA + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h name - Release + TSMessage.h + path + TSMessages/Classes/TSMessage.h + sourceTree + <group> - 04BEA0BD41874685ACBC8DA2 + 088B131643F9493FACB5DE11 - baseConfigurationReference - 0B0F7677A5CA40EAB540A3DE - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-TSMessages-prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 5.1 - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - + includeInIndex + 1 isa - XCBuildConfiguration + PBXFileReference + lastKnownFileType + sourcecode.c.h name - Debug + HexColor.h + path + Classes/HexColor.h + sourceTree + <group> + + 0AE012E6DCE04653BCBEE809 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + path + Pods-acknowledgements.markdown + sourceTree + <group> - 069A1DF9A34A43138DB94BE8 + 17EA9FF064A842C89DFF406D + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework + sourceTree + DEVELOPER_DIR + + 18C6F08783604D6B8FC2300B children - 800156CDE3FA4B5EA1AFC2FA + 9A02E038D50140259C4D2FAB + 8D602D53B0844B788141C26E + 086B6A5DC0214AFE8F2E57CA + 7ECA6AB737024965A308B89A + 6073D3FA9F7D48A5B1DB7ABF + F7289E47AB1945ABB11CDBFF + 592AB091F4444B0DA040CDDA + 38CE85EB666549E1A65082D0 isa PBXGroup name - Pods + TSMessages + path + ../.. sourceTree <group> - 0B0F7677A5CA40EAB540A3DE + 1B59A72EA55C4F3FABD17FC4 includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + text + name + Podfile path - Pods-TSMessages-Private.xcconfig + ../Podfile sourceTree - <group> + SOURCE_ROOT + xcLanguageSpecificationIdentifier + xcode.lang.ruby + + 1CA33630A9BB43DFA6C3132B + + fileRef + 7ECA6AB737024965A308B89A + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 + + + 1D32A3F7382344349A14D7BE + + fileRef + DB0686B7F3874A6BB40F4A71 + isa + PBXBuildFile + + 20C7FE4C2AC0489898F58A03 + + buildActionMask + 2147483647 + files + + 1D32A3F7382344349A14D7BE + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 20DDF3DC44DA4B929F54ADBB + + fileRef + 5A363BD2472E45FC92A2C389 + isa + PBXBuildFile - 0B14269B41954AC9B148A5F9 + 210CF3DE61514EF5985A995C includeInIndex 1 isa PBXFileReference - lastKnownFileType - sourcecode.c.h + name + NotificationBackgroundMessage@2x.png path - Pods-HexColors-prefix.pch + TSMessages/Resources/Images/NotificationBackgroundMessage@2x.png sourceTree <group> - 0D5A2A53932944A6AE8A4CA1 + 2AEF943FAB6049678BC50AE2 includeInIndex 1 isa PBXFileReference - lastKnownFileType - sourcecode.c.h name - TSBlurView.h + NotificationBackgroundError.png path - TSMessages/Views/TSBlurView.h + TSMessages/Resources/Images/NotificationBackgroundError.png sourceTree <group> - 14833BC0FBFB4B0C8672D8D3 + 2C3D2C3FF29D4579A8441785 includeInIndex 1 isa PBXFileReference - name - NotificationBackgroundSuccessIcon@2x.png + lastKnownFileType + text.xcconfig path - TSMessages/Resources/Images/NotificationBackgroundSuccessIcon@2x.png + Pods-HexColors.xcconfig sourceTree <group> - 1D7A52D5728F41E785C322DC + 3129B3026A224829B672406A - fileRef - A4CE9FC3E73543C38D323E2D + children + + F682E90B8B054FD6B6E548F5 + isa - PBXBuildFile + PBXGroup + name + Pods + sourceTree + <group> - 1FA50EC3B88C4C0CB1B14CA1 + 322949FCED6248D4A77B664D baseConfigurationReference - 40DEB958567846FFA974718C + E367538F31F64BDCB3376D3D buildSettings ALWAYS_SEARCH_USER_PATHS @@ -237,305 +273,242 @@ name Release - 2415DE35049842A2AFFA2686 + 327AFEB0FD6F4D1CA059FD0D includeInIndex 1 isa PBXFileReference - lastKnownFileType - sourcecode.c.objc name - TSBlurView.m + NotificationBackgroundSuccess.png path - TSMessages/Views/TSBlurView.m + TSMessages/Resources/Images/NotificationBackgroundSuccess.png sourceTree <group> - 24240995116B46EAB0AF513E + 38430ED88F5C4E858FFE0AC5 children - 5F703371046545A2939CF01A - 6FD011263EC84BDDBED1AFE1 - BBEBDD261DC34FB8BB236341 - 069A1DF9A34A43138DB94BE8 - B2A7A54260A043A2874D2AEE - 26EB239DDC5B4CCCA42203CC + A5B2D4B70A87499D89D7AC06 + 17EA9FF064A842C89DFF406D isa PBXGroup + name + iOS sourceTree <group> - 2463BD24FF8D4198995F9BEB + 38CE85EB666549E1A65082D0 + + children + + 5257E00DD0B24552A8DE8BB4 + CD22EDF59E124312BC32094D + 5A363BD2472E45FC92A2C389 + 62FF479401C14473B2A2396D + + isa + PBXGroup + name + Support Files + sourceTree + SOURCE_ROOT + + 38DD9BEA9414409B8ED79516 includeInIndex 1 isa PBXFileReference - lastKnownFileType - sourcecode.c.h name - TSMessage.h + NotificationButtonBackground@2x.png path - TSMessages/Classes/TSMessage.h + TSMessages/Resources/Images/NotificationButtonBackground@2x.png sourceTree <group> - 24C31BAB15AF47FFBD2F51E9 + 3B266442E4E94FAAA3DD47BD - baseConfigurationReference - 73A7EA8E61034AC98667E196 - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - NO - DSTROOT - /tmp/xcodeproj.dst - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PRECOMPILE_PREFIX_HEADER - YES - GCC_PREFIX_HEADER - Pods-HexColors-prefix.pch - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_VERSION - com.apple.compilers.llvm.clang.1_0 - INSTALL_PATH - $(BUILT_PRODUCTS_DIR) - IPHONEOS_DEPLOYMENT_TARGET - 5.1 - OTHER_LDFLAGS - - PRODUCT_NAME - $(TARGET_NAME) - PUBLIC_HEADERS_FOLDER_PATH - $(TARGET_NAME) - SDKROOT - iphoneos - SKIP_INSTALL - YES - - isa - XCBuildConfiguration - name - Debug - - 259060024F734777BBEE0224 - - explicitFileType - archive.ar includeInIndex - 0 + 1 isa PBXFileReference - path - libPods-HexColors.a - sourceTree - BUILT_PRODUCTS_DIR - - 26EB239DDC5B4CCCA42203CC - - children - - FE01A87B16DA489ABE41A574 - - isa - PBXGroup name - Targets Support Files + NotificationButtonBackground.png + path + TSMessages/Resources/Images/NotificationButtonBackground.png sourceTree <group> - 27BA6AF02B394EEDAD3073AA + 3F21C500B2544AB4915E2699 - fileRef - 68C15DED264D4219B1D29AC7 + containerPortal + E7AA7FB0036D4026AB1A047D isa - PBXBuildFile + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + FFBEDDA68E264F7B9691FA74 + remoteInfo + Pods-TSMessages - 2CB643C08C4B48B6983B92A0 + 412C9BAF76E940768E6D4E0D includeInIndex 1 isa PBXFileReference name - TSMessagesDefaultDesign.json + NotificationBackgroundWarningIcon@2x.png path - TSMessages/Resources/TSMessagesDefaultDesign.json + TSMessages/Resources/Images/NotificationBackgroundWarningIcon@2x.png sourceTree <group> - 2D687DE1255D459FAC46B986 + 427850920DE348DF9221623C includeInIndex 1 isa PBXFileReference - name - NotificationBackgroundWarning.png + lastKnownFileType + sourcecode.c.h path - TSMessages/Resources/Images/NotificationBackgroundWarning.png + Pods-HexColors-prefix.pch sourceTree <group> - 2D946FE34C4E4E1C8CDDDC00 + 437E897444C1438EB4E76822 - fileRef - D981CB2AF212488C83B57089 + buildActionMask + 2147483647 + files + + 8117E75A8A2243EE90FFAE02 + 70CEC908528746E6AA4490B0 + D6F4E5A2C0C94DFCAE78F48F + isa - PBXBuildFile + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 - 2E04345824C144B786437EA1 + 43BE5F9129BB4F94ACC9B86A fileRef - A4CE9FC3E73543C38D323E2D + 17EA9FF064A842C89DFF406D isa PBXBuildFile - 329C9A0C916A4D2E93C257C4 + 44F63CE8A00040C4B996B09B - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - CLANG_CXX_LANGUAGE_STANDARD - gnu++0x - CLANG_CXX_LIBRARY - libc++ - CLANG_ENABLE_MODULES - YES - CLANG_ENABLE_OBJC_ARC - NO - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR - COPY_PHASE_STRIP - YES - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 5.1 - ONLY_ACTIVE_ARCH - YES - STRIP_INSTALLED_PRODUCT - NO - + children + + C6CDC583AEC94DB48E51320D + A543B74CEC734CFDADF9D978 + ABDD37F4DFD54692ADA01EBB + isa - XCBuildConfiguration + PBXGroup name - Debug + Products + sourceTree + <group> - 34EC7EF804A54DD38BFE4A78 + 4A4BCD7C42274EB4BC59255F includeInIndex 1 isa PBXFileReference lastKnownFileType - text.plist.xml + text.script.sh path - Pods-acknowledgements.plist + Pods-resources.sh + sourceTree + <group> + + 4A95B7047E144EC58C7AF65B + + isa + PBXTargetDependency + target + 518EFA9B97E049B59D8F6CA6 + targetProxy + 07EC5C45321E42239C3AF5A7 + + 4DCC1CA1A47843D192A13531 + + children + + 1B59A72EA55C4F3FABD17FC4 + D4A84D2B8F0848B09D422872 + EECB2020CE1F45A0A8A46A8E + 3129B3026A224829B672406A + 44F63CE8A00040C4B996B09B + 669F7608664E44429A9A3FD3 + + isa + PBXGroup sourceTree <group> - 38EC203546A14BD0913E36FB + 4EFC399C502B4A75947A842B includeInIndex 1 isa PBXFileReference name - NotificationBackgroundWarning@2x.png + NotificationBackgroundWarning.png path - TSMessages/Resources/Images/NotificationBackgroundWarning@2x.png + TSMessages/Resources/Images/NotificationBackgroundWarning.png sourceTree <group> - 3A4D7998F45E4CFD93B86CD0 + 4F9891782A414158BD0629C2 - buildActionMask - 2147483647 - files + buildConfigurations - CD45345C93F34361BC1B6E10 - 55A265BA87F447F5859D72A0 - 2D946FE34C4E4E1C8CDDDC00 + C20F48C4833F4110B30393BE + E8DBF411C3B54E9798575128 - isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing + defaultConfigurationIsVisible 0 - - 3B733B54AF964A7AAD3B0D37 - - containerPortal - 960AC0AB20464481B1F828FB + defaultConfigurationName + Release isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - BC5CDB1831C74F8AABF01B10 - remoteInfo - Pods-HexColors + XCConfigurationList - 3C72160B2C8E45918505780B + 518EFA9B97E049B59D8F6CA6 - fileRef - A1C56EA0BB274A2D8AE23D41 + buildConfigurationList + 4F9891782A414158BD0629C2 + buildPhases + + 6ED2CC17B41E4D8EB43A0992 + 947A5D6C7454468F935877EC + 7141624B17344DAEB7E5AD13 + + buildRules + + dependencies + isa - PBXBuildFile + PBXNativeTarget + name + Pods-HexColors + productName + Pods-HexColors + productReference + A543B74CEC734CFDADF9D978 + productType + com.apple.product-type.library.static - 40DEB958567846FFA974718C + 5257E00DD0B24552A8DE8BB4 includeInIndex 1 @@ -544,61 +517,267 @@ lastKnownFileType text.xcconfig path - Pods.xcconfig + Pods-TSMessages.xcconfig sourceTree <group> - 40F6BD4E11724577A3B0BA51 + 56681A99A8634A7996F3C634 - buildConfigurationList - CEA591430ACF4758B1890A90 - buildPhases - - FED15D656EC849388C009B94 - 66AE72DAA7954E8BA85E178A - - buildRules - - dependencies + buildActionMask + 2147483647 + files - 64B3E31E46754BC89FBB1F22 - BAB9C16F0D7647749599679F + C65D6D2C7C90417498FDE9A1 + DC01ACE02FD043EBB7C51837 + 5D174A57F0CC40D8B0C87814 isa - PBXNativeTarget - name - Pods - productName - Pods - productReference - D1D2457075E847678498CAE1 - productType - com.apple.product-type.library.static + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 - 457ECD26C4F14E829E904F1D + 56CC2A18B9B84BFF99FFAA93 includeInIndex 1 isa PBXFileReference name - NotificationButtonBackground@2x.png + NotificationBackgroundErrorIcon@2x.png path - TSMessages/Resources/Images/NotificationButtonBackground@2x.png + TSMessages/Resources/Images/NotificationBackgroundErrorIcon@2x.png sourceTree <group> - 4728996C35514049BC00536B + 592AB091F4444B0DA040CDDA - baseConfigurationReference - 0B0F7677A5CA40EAB540A3DE - buildSettings - - ALWAYS_SEARCH_USER_PATHS - NO - COPY_PHASE_STRIP - YES - DSTROOT + children + + 2AEF943FAB6049678BC50AE2 + D1CB90F7CB1D4B7AA87ED8B3 + EA1630A92D5141C396106607 + 56CC2A18B9B84BFF99FFAA93 + E52F0D13B07A43658906B92C + 210CF3DE61514EF5985A995C + 327AFEB0FD6F4D1CA059FD0D + B782173D5A824C90AB48B691 + FB62581D05DF4C73A0DEFCDE + 8D150AAA28D14752A95D4551 + 4EFC399C502B4A75947A842B + D02B9CE6E02A4B0AA034B78C + B8EB55AFBB9046858B9C227E + 412C9BAF76E940768E6D4E0D + 3B266442E4E94FAAA3DD47BD + 38DD9BEA9414409B8ED79516 + A1CE180659544702B6237625 + + isa + PBXGroup + name + Resources + sourceTree + <group> + + 5A363BD2472E45FC92A2C389 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-TSMessages-dummy.m + sourceTree + <group> + + 5D174A57F0CC40D8B0C87814 + + fileRef + 6073D3FA9F7D48A5B1DB7ABF + isa + PBXBuildFile + + 601410AAEC9D46F5AE600335 + + children + + E367538F31F64BDCB3376D3D + 0AE012E6DCE04653BCBEE809 + 981555D78CD84ADEA20E2085 + DB0686B7F3874A6BB40F4A71 + F9063835DF8546FA93397F66 + 4A4BCD7C42274EB4BC59255F + + isa + PBXGroup + name + Pods + sourceTree + <group> + + 6073D3FA9F7D48A5B1DB7ABF + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + TSMessageView.h + path + TSMessages/Views/TSMessageView.h + sourceTree + <group> + + 614C4B8C619B48AC83E3A0F7 + + buildConfigurations + + 72C9C4121D01478798B85C14 + 322949FCED6248D4A77B664D + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 61F4073372584934B2D321A9 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-HexColors-Private.xcconfig + sourceTree + <group> + + 62FF479401C14473B2A2396D + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-TSMessages-prefix.pch + sourceTree + <group> + + 669F7608664E44429A9A3FD3 + + children + + 601410AAEC9D46F5AE600335 + + isa + PBXGroup + name + Targets Support Files + sourceTree + <group> + + 6ED2CC17B41E4D8EB43A0992 + + buildActionMask + 2147483647 + files + + 9B946AE7663A47F09AE339D9 + C8F1EEFA84184487A61AED19 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 70CEC908528746E6AA4490B0 + + fileRef + A543B74CEC734CFDADF9D978 + isa + PBXBuildFile + + 7141624B17344DAEB7E5AD13 + + buildActionMask + 2147483647 + files + + E0D305460645476B956975DF + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 72C9C4121D01478798B85C14 + + baseConfigurationReference + E367538F31F64BDCB3376D3D + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.1 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 7353D2C78F6449BEA144EA37 + + baseConfigurationReference + CD22EDF59E124312BC32094D + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + DSTROOT /tmp/xcodeproj.dst GCC_C_LANGUAGE_STANDARD gnu99 @@ -640,34 +819,39 @@ name Release - 4940F90FEA65410F8AFB8F8B + 78585EE9E505478BBCB2D397 - fileRef - 6CD42DAD26174313BDE0154F + children + + 2C3D2C3FF29D4579A8441785 + 61F4073372584934B2D321A9 + F58EA48959614A9694008952 + 427850920DE348DF9221623C + isa - PBXBuildFile + PBXGroup + name + Support Files + sourceTree + SOURCE_ROOT - 4A2F32290C174C9DAA4241E0 + 7CAAE68DFC504421A7D2F34D buildActionMask 2147483647 files - 9F7FE6B501114AA2BF5EE13F + 20DDF3DC44DA4B929F54ADBB + A8E18B50B7DE46B0989CA46F + 1CA33630A9BB43DFA6C3132B + E2F007F32B8545398AD688C6 isa - PBXHeadersBuildPhase + PBXSourcesBuildPhase runOnlyForDeploymentPostprocessing 0 - 4D0B5DF76432433290E9A520 - - fileRef - 5E0CFB2579BD4622AD88E280 - isa - PBXBuildFile - - 4FB78B9DC5274E45ADE45851 + 7ECA6AB737024965A308B89A includeInIndex 1 @@ -682,85 +866,43 @@ sourceTree <group> - 5304BFC7CDFA425CA9C08D80 - - buildConfigurations - - 24C31BAB15AF47FFBD2F51E9 - 03C6013078E94A0E82974916 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 53B443F40EED4B19B90DEC17 - - buildConfigurations - - 329C9A0C916A4D2E93C257C4 - 7346440540A643178A28990D - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 54D3C00A46BB4E66BDEE0520 + 7F6052B0EC9A472B84071640 - containerPortal - 960AC0AB20464481B1F828FB isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 9D1220C3B8A14ECF8E1DC6F4 - remoteInfo - Pods-TSMessages + PBXTargetDependency + target + FFBEDDA68E264F7B9691FA74 + targetProxy + 3F21C500B2544AB4915E2699 - 54F3AF800B5C4CC7BFA9F7EA + 8117E75A8A2243EE90FFAE02 - includeInIndex - 1 + fileRef + 17EA9FF064A842C89DFF406D isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - name - HexColor.h - path - Classes/HexColor.h - sourceTree - <group> + PBXBuildFile - 55A265BA87F447F5859D72A0 + 8827EDBF2AA1494481B562CB fileRef - 2463BD24FF8D4198995F9BEB + A5B2D4B70A87499D89D7AC06 isa PBXBuildFile - 5651147C2DFF4E698B32E32D + 8D150AAA28D14752A95D4551 includeInIndex 1 isa PBXFileReference - lastKnownFileType - sourcecode.c.objc name - TSMessageView.m + NotificationBackgroundSuccessIcon@2x.png path - TSMessages/Views/TSMessageView.m + TSMessages/Resources/Images/NotificationBackgroundSuccessIcon@2x.png sourceTree <group> - 5E0CFB2579BD4622AD88E280 + 8D602D53B0844B788141C26E includeInIndex 1 @@ -768,81 +910,122 @@ PBXFileReference lastKnownFileType sourcecode.c.objc + name + TSBlurView.m path - Pods-dummy.m + TSMessages/Views/TSBlurView.m sourceTree <group> - 5F703371046545A2939CF01A - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text - name - Podfile - path - ../Podfile - sourceTree - SOURCE_ROOT - xcLanguageSpecificationIdentifier - xcode.lang.ruby - - 64B3E31E46754BC89FBB1F22 - - isa - PBXTargetDependency - target - BC5CDB1831C74F8AABF01B10 - targetProxy - 3B733B54AF964A7AAD3B0D37 - - 66AE72DAA7954E8BA85E178A + 947A5D6C7454468F935877EC buildActionMask 2147483647 files - D8E9A18E3B604B09931632C4 - 7B51E34A7E2346148F450290 - 4940F90FEA65410F8AFB8F8B + 43BE5F9129BB4F94ACC9B86A isa PBXFrameworksBuildPhase runOnlyForDeploymentPostprocessing 0 - 68C15DED264D4219B1D29AC7 + 9576E17BC6FA48E1A99F6995 + + isa + PBXTargetDependency + target + 518EFA9B97E049B59D8F6CA6 + targetProxy + E856BC60BF1F473692E452FE + + 981555D78CD84ADEA20E2085 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.objc - name - HexColor.m + text.plist.xml path - Classes/HexColor.m + Pods-acknowledgements.plist sourceTree <group> - 6C16DB02D58C4353B59B4E12 + 9A02E038D50140259C4D2FAB includeInIndex 1 isa PBXFileReference lastKnownFileType - text.xcconfig + sourcecode.c.h + name + TSBlurView.h path - Pods-HexColors.xcconfig + TSMessages/Views/TSBlurView.h + sourceTree + <group> + + 9B946AE7663A47F09AE339D9 + + fileRef + C55BCE8D397E4C2AB73A3E76 + isa + PBXBuildFile + + A1CE180659544702B6237625 + + includeInIndex + 1 + isa + PBXFileReference + name + TSMessagesDefaultDesign.json + path + TSMessages/Resources/TSMessagesDefaultDesign.json sourceTree <group> - 6CD42DAD26174313BDE0154F + A543B74CEC734CFDADF9D978 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-HexColors.a + sourceTree + BUILT_PRODUCTS_DIR + + A5B2D4B70A87499D89D7AC06 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + AVFoundation.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/AVFoundation.framework + sourceTree + DEVELOPER_DIR + + A8E18B50B7DE46B0989CA46F + + fileRef + 8D602D53B0844B788141C26E + isa + PBXBuildFile + settings + + COMPILER_FLAGS + -fobjc-arc -DOS_OBJECT_USE_OBJC=0 + + + ABDD37F4DFD54692ADA01EBB explicitFileType archive.ar @@ -855,40 +1038,140 @@ sourceTree BUILT_PRODUCTS_DIR - 6F18CD3DC7F14E15AC671EF2 + B782173D5A824C90AB48B691 includeInIndex 1 isa PBXFileReference name - NotificationBackgroundWarningIcon@2x.png + NotificationBackgroundSuccess@2x.png path - TSMessages/Resources/Images/NotificationBackgroundWarningIcon@2x.png + TSMessages/Resources/Images/NotificationBackgroundSuccess@2x.png sourceTree <group> - 6FD011263EC84BDDBED1AFE1 + B8EB55AFBB9046858B9C227E - children - - 9F8B269E50C449C6842AA3C1 - + includeInIndex + 1 isa - PBXGroup + PBXFileReference name - Development Pods + NotificationBackgroundWarningIcon.png + path + TSMessages/Resources/Images/NotificationBackgroundWarningIcon.png + sourceTree + <group> + + C20F48C4833F4110B30393BE + + baseConfigurationReference + 61F4073372584934B2D321A9 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-HexColors-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.1 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + C55BCE8D397E4C2AB73A3E76 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + HexColor.m + path + Classes/HexColor.m sourceTree <group> - 70DB0E8F6C3D48A1BC733D2E + C65D6D2C7C90417498FDE9A1 + + fileRef + 9A02E038D50140259C4D2FAB + isa + PBXBuildFile + + C6CDC583AEC94DB48E51320D + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR + + C7D98E08375B40FF86ACC510 + + buildActionMask + 2147483647 + files + + 8827EDBF2AA1494481B562CB + D5DC57A6D878465980244248 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + C8F1EEFA84184487A61AED19 fileRef - D22EE3B4774043D58D535E20 + F58EA48959614A9694008952 isa PBXBuildFile - 7346440540A643178A28990D + C9D0216EE32749559584F400 buildSettings @@ -907,7 +1190,7 @@ CLANG_WARN_CONSTANT_CONVERSION YES CLANG_WARN_DIRECT_OBJC_ISA_USAGE - YES_ERROR + YES CLANG_WARN_EMPTY_BODY YES CLANG_WARN_ENUM_CONVERSION @@ -915,17 +1198,26 @@ CLANG_WARN_INT_CONVERSION YES CLANG_WARN_OBJC_ROOT_CLASS - YES_ERROR + YES COPY_PHASE_STRIP - NO - ENABLE_NS_ASSERTIONS - NO + YES GCC_C_LANGUAGE_STANDARD gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO GCC_WARN_64_TO_32_BIT_CONVERSION YES GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR + YES GCC_WARN_UNDECLARED_SELECTOR YES GCC_WARN_UNINITIALIZED_AUTOS @@ -936,229 +1228,249 @@ YES IPHONEOS_DEPLOYMENT_TARGET 5.1 + ONLY_ACTIVE_ARCH + YES STRIP_INSTALLED_PRODUCT NO - VALIDATE_PRODUCT - YES isa XCBuildConfiguration name - Release + Debug - 7369A2112BB9422BA478F6E0 + CD22EDF59E124312BC32094D includeInIndex 1 isa PBXFileReference - name - NotificationBackgroundMessage@2x.png + lastKnownFileType + text.xcconfig path - TSMessages/Resources/Images/NotificationBackgroundMessage@2x.png + Pods-TSMessages-Private.xcconfig sourceTree <group> - 73A7EA8E61034AC98667E196 + CE0A734FE9704C1DBD519754 - includeInIndex - 1 + buildConfigurationList + 614C4B8C619B48AC83E3A0F7 + buildPhases + + 20C7FE4C2AC0489898F58A03 + 437E897444C1438EB4E76822 + + buildRules + + dependencies + + 4A95B7047E144EC58C7AF65B + 7F6052B0EC9A472B84071640 + isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-HexColors-Private.xcconfig - sourceTree - <group> + PBXNativeTarget + name + Pods + productName + Pods + productReference + C6CDC583AEC94DB48E51320D + productType + com.apple.product-type.library.static - 73F1271D00AA46739C9233BA + D02B9CE6E02A4B0AA034B78C includeInIndex 1 isa PBXFileReference name - NotificationBackgroundSuccess@2x.png + NotificationBackgroundWarning@2x.png path - TSMessages/Resources/Images/NotificationBackgroundSuccess@2x.png + TSMessages/Resources/Images/NotificationBackgroundWarning@2x.png sourceTree <group> - 765AFF434ED547D0B29EBC1C + D1CB90F7CB1D4B7AA87ED8B3 includeInIndex 1 isa PBXFileReference name - NotificationButtonBackground.png + NotificationBackgroundError@2x.png path - TSMessages/Resources/Images/NotificationButtonBackground.png + TSMessages/Resources/Images/NotificationBackgroundError@2x.png sourceTree <group> - 7B51E34A7E2346148F450290 - - fileRef - 259060024F734777BBEE0224 - isa - PBXBuildFile - - 800156CDE3FA4B5EA1AFC2FA + D4A84D2B8F0848B09D422872 children - 54F3AF800B5C4CC7BFA9F7EA - 68C15DED264D4219B1D29AC7 - B356E772B5254879B61E7376 + 18C6F08783604D6B8FC2300B isa PBXGroup name - HexColors - path - HexColors + Development Pods sourceTree <group> - 87375B4DDB794013BF02CB2E + D5DC57A6D878465980244248 - includeInIndex - 1 + fileRef + 17EA9FF064A842C89DFF406D isa - PBXFileReference - name - NotificationBackgroundWarningIcon.png - path - TSMessages/Resources/Images/NotificationBackgroundWarningIcon.png - sourceTree - <group> + PBXBuildFile - 8FE07178853342E09250918D + D6F4E5A2C0C94DFCAE78F48F - buildActionMask - 2147483647 - files - - 2E04345824C144B786437EA1 - + fileRef + ABDD37F4DFD54692ADA01EBB isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXBuildFile - 960AC0AB20464481B1F828FB + D983ACA9FF674768B54600AD - attributes + baseConfigurationReference + CD22EDF59E124312BC32094D + buildSettings - LastUpgradeCheck - 0500 + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-TSMessages-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 5.1 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES - buildConfigurationList - 53B443F40EED4B19B90DEC17 - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 isa - PBXProject - knownRegions - - en - - mainGroup - 24240995116B46EAB0AF513E - productRefGroup - B2A7A54260A043A2874D2AEE - projectDirPath - - projectReferences - - projectRoot - - targets - - 40F6BD4E11724577A3B0BA51 - BC5CDB1831C74F8AABF01B10 - 9D1220C3B8A14ECF8E1DC6F4 - + XCBuildConfiguration + name + Debug - 9BB63CE3AC754A8BAC5EF09D + DB0686B7F3874A6BB40F4A71 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h + sourcecode.c.objc path - Pods-TSMessages-prefix.pch + Pods-dummy.m sourceTree <group> - 9D1220C3B8A14ECF8E1DC6F4 + DC01ACE02FD043EBB7C51837 - buildConfigurationList - A75A171CD8D145AD9F6561AC - buildPhases - - AA6C165C94CD4E6BBC98FF00 - 8FE07178853342E09250918D - 3A4D7998F45E4CFD93B86CD0 - - buildRules - - dependencies - - C1442F3F598F4DD7840D05CE - + fileRef + 086B6A5DC0214AFE8F2E57CA isa - PBXNativeTarget - name - Pods-TSMessages - productName - Pods-TSMessages - productReference - 6CD42DAD26174313BDE0154F - productType - com.apple.product-type.library.static + PBXBuildFile - 9F7FE6B501114AA2BF5EE13F + E0D305460645476B956975DF fileRef - 54F3AF800B5C4CC7BFA9F7EA + 088B131643F9493FACB5DE11 isa PBXBuildFile - 9F8B269E50C449C6842AA3C1 + E2CF2F652E2E4680A790F05E - children - - 0D5A2A53932944A6AE8A4CA1 - 2415DE35049842A2AFFA2686 - 2463BD24FF8D4198995F9BEB - 4FB78B9DC5274E45ADE45851 - D981CB2AF212488C83B57089 - 5651147C2DFF4E698B32E32D - DD89D3A0E2E546B5B104B74C - B8EA8C8B92B54E3AAC2710C9 - + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + NO + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES + COPY_PHASE_STRIP + NO + ENABLE_NS_ASSERTIONS + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + 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 + IPHONEOS_DEPLOYMENT_TARGET + 5.1 + STRIP_INSTALLED_PRODUCT + NO + VALIDATE_PRODUCT + YES + isa - PBXGroup + XCBuildConfiguration name - TSMessages - path - ../.. - sourceTree - <group> + Release - A0557B42439D46EBBCCD5BE2 + E2F007F32B8545398AD688C6 fileRef - 5651147C2DFF4E698B32E32D + F7289E47AB1945ABB11CDBFF isa PBXBuildFile settings @@ -1167,72 +1479,7 @@ -fobjc-arc -DOS_OBJECT_USE_OBJC=0 - A10A43940FF148AA829DF51D - - containerPortal - 960AC0AB20464481B1F828FB - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - BC5CDB1831C74F8AABF01B10 - remoteInfo - Pods-HexColors - - A1C56EA0BB274A2D8AE23D41 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Pods-HexColors-dummy.m - sourceTree - <group> - - A1DEA504AFA84A758E9E82AA - - buildActionMask - 2147483647 - files - - 1D7A52D5728F41E785C322DC - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - A26FAF9921E24272A13C6AE0 - - includeInIndex - 1 - isa - PBXFileReference - name - NotificationBackgroundErrorIcon.png - path - TSMessages/Resources/Images/NotificationBackgroundErrorIcon.png - sourceTree - <group> - - A4CE9FC3E73543C38D323E2D - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - Foundation.framework - path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework - sourceTree - DEVELOPER_DIR - - A4D243890D05418CB11439DB + E367538F31F64BDCB3376D3D includeInIndex 1 @@ -1241,156 +1488,108 @@ lastKnownFileType text.xcconfig path - Pods-TSMessages.xcconfig + Pods.xcconfig sourceTree <group> - A75A171CD8D145AD9F6561AC - - buildConfigurations - - 04BEA0BD41874685ACBC8DA2 - 4728996C35514049BC00536B - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - A9AEC5BA924F4382B5749ACC + E52F0D13B07A43658906B92C includeInIndex 1 isa PBXFileReference name - NotificationBackgroundError.png + NotificationBackgroundMessage.png path - TSMessages/Resources/Images/NotificationBackgroundError.png + TSMessages/Resources/Images/NotificationBackgroundMessage.png sourceTree <group> - AA6C165C94CD4E6BBC98FF00 + E7AA7FB0036D4026AB1A047D - buildActionMask - 2147483647 - files - - 70DB0E8F6C3D48A1BC733D2E - CABF247B7697439E883E462B - E3E553FD14FA42C1ACFA5816 - A0557B42439D46EBBCCD5BE2 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing + attributes + + LastUpgradeCheck + 0510 + + buildConfigurationList + EBE1205570CF4E5C849BEA9A + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings 0 - - AABC6754D5F9439D9E9892C3 - - includeInIndex - 1 isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Pods-environment.h - sourceTree - <group> - - B2A7A54260A043A2874D2AEE - - children + PBXProject + knownRegions - D1D2457075E847678498CAE1 - 259060024F734777BBEE0224 - 6CD42DAD26174313BDE0154F + en - isa - PBXGroup - name - Products - sourceTree - <group> - - B33D4E81354E49398E2C3DC8 - - includeInIndex - 1 - isa - PBXFileReference - name - NotificationBackgroundMessage.png - path - TSMessages/Resources/Images/NotificationBackgroundMessage.png - sourceTree - <group> - - B356E772B5254879B61E7376 - - children + mainGroup + 4DCC1CA1A47843D192A13531 + productRefGroup + 44F63CE8A00040C4B996B09B + projectDirPath + + projectReferences + + projectRoot + + targets - 6C16DB02D58C4353B59B4E12 - 73A7EA8E61034AC98667E196 - A1C56EA0BB274A2D8AE23D41 - 0B14269B41954AC9B148A5F9 + CE0A734FE9704C1DBD519754 + 518EFA9B97E049B59D8F6CA6 + FFBEDDA68E264F7B9691FA74 - isa - PBXGroup - name - Support Files - sourceTree - SOURCE_ROOT - B600F65B8D7D41ED85CBCC57 + E856BC60BF1F473692E452FE - includeInIndex - 1 + containerPortal + E7AA7FB0036D4026AB1A047D isa - PBXFileReference - lastKnownFileType - text.script.sh - path - Pods-resources.sh - sourceTree - <group> + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 518EFA9B97E049B59D8F6CA6 + remoteInfo + Pods-HexColors - B6094657571848A4829418BE + E8DBF411C3B54E9798575128 baseConfigurationReference - 40DEB958567846FFA974718C + 61F4073372584934B2D321A9 buildSettings ALWAYS_SEARCH_USER_PATHS NO COPY_PHASE_STRIP - NO + YES DSTROOT /tmp/xcodeproj.dst GCC_C_LANGUAGE_STANDARD gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 GCC_PRECOMPILE_PREFIX_HEADER YES - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO + GCC_PREFIX_HEADER + Pods-HexColors-prefix.pch GCC_VERSION com.apple.compilers.llvm.clang.1_0 INSTALL_PATH $(BUILT_PRODUCTS_DIR) IPHONEOS_DEPLOYMENT_TARGET 5.1 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + OTHER_LDFLAGS PRODUCT_NAME @@ -1401,109 +1600,33 @@ iphoneos SKIP_INSTALL YES + VALIDATE_PRODUCT + YES isa XCBuildConfiguration name - Debug - - B8EA8C8B92B54E3AAC2710C9 - - children - - A4D243890D05418CB11439DB - 0B0F7677A5CA40EAB540A3DE - D22EE3B4774043D58D535E20 - 9BB63CE3AC754A8BAC5EF09D - - isa - PBXGroup - name - Support Files - sourceTree - SOURCE_ROOT - - BAB9C16F0D7647749599679F - - isa - PBXTargetDependency - target - 9D1220C3B8A14ECF8E1DC6F4 - targetProxy - 54D3C00A46BB4E66BDEE0520 + Release - BBEBDD261DC34FB8BB236341 + EA1630A92D5141C396106607 - children - - E95AE17553B84BCD971EAC70 - + includeInIndex + 1 isa - PBXGroup + PBXFileReference name - Frameworks + NotificationBackgroundErrorIcon.png + path + TSMessages/Resources/Images/NotificationBackgroundErrorIcon.png sourceTree <group> - BC5CDB1831C74F8AABF01B10 - - buildConfigurationList - 5304BFC7CDFA425CA9C08D80 - buildPhases - - E7CE3C41B4E042728248247C - A1DEA504AFA84A758E9E82AA - 4A2F32290C174C9DAA4241E0 - - buildRules - - dependencies - - isa - PBXNativeTarget - name - Pods-HexColors - productName - Pods-HexColors - productReference - 259060024F734777BBEE0224 - productType - com.apple.product-type.library.static - - C1442F3F598F4DD7840D05CE - - isa - PBXTargetDependency - target - BC5CDB1831C74F8AABF01B10 - targetProxy - A10A43940FF148AA829DF51D - - CABF247B7697439E883E462B - - fileRef - 2415DE35049842A2AFFA2686 - isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc -DOS_OBJECT_USE_OBJC=0 - - - CD45345C93F34361BC1B6E10 - - fileRef - 0D5A2A53932944A6AE8A4CA1 - isa - PBXBuildFile - - CEA591430ACF4758B1890A90 + EBE1205570CF4E5C849BEA9A buildConfigurations - B6094657571848A4829418BE - 1FA50EC3B88C4C0CB1B14CA1 + C9D0216EE32749559584F400 + E2CF2F652E2E4680A790F05E defaultConfigurationIsVisible 0 @@ -1512,220 +1635,119 @@ isa XCConfigurationList - D1D2457075E847678498CAE1 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods.a - sourceTree - BUILT_PRODUCTS_DIR - - D22EE3B4774043D58D535E20 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Pods-TSMessages-dummy.m - sourceTree - <group> - - D28618AA782C49A5B8F568CC + EECB2020CE1F45A0A8A46A8E - includeInIndex - 1 + children + + 38430ED88F5C4E858FFE0AC5 + isa - PBXFileReference + PBXGroup name - NotificationBackgroundSuccessIcon.png - path - TSMessages/Resources/Images/NotificationBackgroundSuccessIcon.png + Frameworks sourceTree <group> - D8E9A18E3B604B09931632C4 - - fileRef - A4CE9FC3E73543C38D323E2D - isa - PBXBuildFile - - D981CB2AF212488C83B57089 + F58EA48959614A9694008952 includeInIndex 1 isa PBXFileReference lastKnownFileType - sourcecode.c.h - name - TSMessageView.h + sourcecode.c.objc path - TSMessages/Views/TSMessageView.h + Pods-HexColors-dummy.m sourceTree <group> - DD89D3A0E2E546B5B104B74C + F682E90B8B054FD6B6E548F5 children - A9AEC5BA924F4382B5749ACC - FB594E4FA1A145B6B1A7EE4E - A26FAF9921E24272A13C6AE0 - E5DAFA8555EB40D78468A0D6 - B33D4E81354E49398E2C3DC8 - 7369A2112BB9422BA478F6E0 - FD949A47B9334D55AED8D090 - 73F1271D00AA46739C9233BA - D28618AA782C49A5B8F568CC - 14833BC0FBFB4B0C8672D8D3 - 2D687DE1255D459FAC46B986 - 38EC203546A14BD0913E36FB - 87375B4DDB794013BF02CB2E - 6F18CD3DC7F14E15AC671EF2 - 765AFF434ED547D0B29EBC1C - 457ECD26C4F14E829E904F1D - 2CB643C08C4B48B6983B92A0 + 088B131643F9493FACB5DE11 + C55BCE8D397E4C2AB73A3E76 + 78585EE9E505478BBCB2D397 isa PBXGroup name - Resources - sourceTree - <group> - - DE80330D02144B4CB72AAC15 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text + HexColors path - Pods-acknowledgements.markdown + HexColors sourceTree <group> - E3E553FD14FA42C1ACFA5816 - - fileRef - 4FB78B9DC5274E45ADE45851 - isa - PBXBuildFile - settings - - COMPILER_FLAGS - -fobjc-arc -DOS_OBJECT_USE_OBJC=0 - - - E5DAFA8555EB40D78468A0D6 + F7289E47AB1945ABB11CDBFF includeInIndex 1 isa PBXFileReference + lastKnownFileType + sourcecode.c.objc name - NotificationBackgroundErrorIcon@2x.png + TSMessageView.m path - TSMessages/Resources/Images/NotificationBackgroundErrorIcon@2x.png - sourceTree - <group> - - E7CE3C41B4E042728248247C - - buildActionMask - 2147483647 - files - - 27BA6AF02B394EEDAD3073AA - 3C72160B2C8E45918505780B - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - E95AE17553B84BCD971EAC70 - - children - - A4CE9FC3E73543C38D323E2D - - isa - PBXGroup - name - iOS + TSMessages/Views/TSMessageView.m sourceTree <group> - FB594E4FA1A145B6B1A7EE4E + F9063835DF8546FA93397F66 includeInIndex 1 isa PBXFileReference - name - NotificationBackgroundError@2x.png + lastKnownFileType + sourcecode.c.h path - TSMessages/Resources/Images/NotificationBackgroundError@2x.png + Pods-environment.h sourceTree <group> - FD949A47B9334D55AED8D090 + FB62581D05DF4C73A0DEFCDE includeInIndex 1 isa PBXFileReference name - NotificationBackgroundSuccess.png + NotificationBackgroundSuccessIcon.png path - TSMessages/Resources/Images/NotificationBackgroundSuccess.png + TSMessages/Resources/Images/NotificationBackgroundSuccessIcon.png sourceTree <group> - FE01A87B16DA489ABE41A574 + FFBEDDA68E264F7B9691FA74 - children + buildConfigurationList + 00A4702867E54D94BA8FFFBB + buildPhases - 40DEB958567846FFA974718C - DE80330D02144B4CB72AAC15 - 34EC7EF804A54DD38BFE4A78 - 5E0CFB2579BD4622AD88E280 - AABC6754D5F9439D9E9892C3 - B600F65B8D7D41ED85CBCC57 + 7CAAE68DFC504421A7D2F34D + C7D98E08375B40FF86ACC510 + 56681A99A8634A7996F3C634 - isa - PBXGroup - name - Pods - sourceTree - <group> - - FED15D656EC849388C009B94 - - buildActionMask - 2147483647 - files + buildRules + + dependencies - 4D0B5DF76432433290E9A520 + 9576E17BC6FA48E1A99F6995 isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 + PBXNativeTarget + name + Pods-TSMessages + productName + Pods-TSMessages + productReference + ABDD37F4DFD54692ADA01EBB + productType + com.apple.product-type.library.static rootObject - 960AC0AB20464481B1F828FB + E7AA7FB0036D4026AB1A047D diff --git a/TSMessages.podspec b/TSMessages.podspec index 72f07ba6..1afc7d40 100644 --- a/TSMessages.podspec +++ b/TSMessages.podspec @@ -24,5 +24,6 @@ There are 4 different types already set up for you: Success, Error, Warning, Mes s.requires_arc = true + s.framework = 'AVFoundation' s.dependency 'HexColors' end diff --git a/TSMessages/Classes/TSMessage.h b/TSMessages/Classes/TSMessage.h index dc1cd506..c2043320 100755 --- a/TSMessages/Classes/TSMessage.h +++ b/TSMessages/Classes/TSMessage.h @@ -160,6 +160,12 @@ typedef NS_ENUM(NSInteger,TSMessageNotificationDuration) { /** Use this method to use custom designs in your messages. */ + (void)addCustomDesignFromFileWithName:(NSString *)fileName; +/** Use this method to set a default sound for all notifications, or a fallback for notifications that do not have an associated sound */ ++ (void)setDefaultNotificationSoundWithName:(NSString*)name andExtension:(NSString*)extension; + +/** Use this method to set default sound to be used with a particular TSMessageNotificationType */ ++ (void)setSoundWithName:(NSString*)name extension:(NSString*)extension forNotificationType:(TSMessageNotificationType)notificationType; + /** Indicates whether a notification is currently active. */ + (BOOL)isNotificationActive; diff --git a/TSMessages/Classes/TSMessage.m b/TSMessages/Classes/TSMessage.m index 59e6bfd6..064d77ff 100755 --- a/TSMessages/Classes/TSMessage.m +++ b/TSMessages/Classes/TSMessage.m @@ -8,6 +8,7 @@ #import "TSMessage.h" #import "TSMessageView.h" +#import #define kTSMessageDisplayTime 1.5 #define kTSMessageExtraDisplayTimePerPixel 0.04 @@ -31,6 +32,11 @@ @implementation TSMessage __weak static UIViewController *_defaultViewController; +__strong static AVAudioPlayer *_defaultSound; +__strong static AVAudioPlayer *_messageSound; +__strong static AVAudioPlayer *_warningSound; +__strong static AVAudioPlayer *_errorSound; +__strong static AVAudioPlayer *_successSound; + (TSMessage *)sharedMessage { @@ -267,12 +273,61 @@ - (void)fadeInCurrentNotification }; if (![TSMessage iOS7StyleEnabled]) { + switch (currentView.messageType) { + case TSMessageNotificationTypeMessage: + if (_messageSound) { [_messageSound play]; } else if (_defaultSound) { [_defaultSound play]; } else + break; + case TSMessageNotificationTypeWarning: + if (_warningSound) { [_warningSound play]; } else if (_defaultSound) { [_defaultSound play]; } else + break; + case TSMessageNotificationTypeError: + if (_errorSound) { [_errorSound play]; } else if (_defaultSound) { [_defaultSound play]; } else + break; + case TSMessageNotificationTypeSuccess: + if (_successSound) { [_successSound play]; } else if (_defaultSound) { [_defaultSound play]; } else + break; + default: + break; + } [UIView animateWithDuration:kTSMessageAnimationDuration delay:0.0 options:UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction animations:animationBlock completion:completionBlock]; } else { + switch (currentView.messageType) { + case TSMessageNotificationTypeMessage: + if (_messageSound) { + [_messageSound play]; + } else if (_defaultSound) { + [_defaultSound play]; + } + break; + case TSMessageNotificationTypeWarning: + if (_warningSound) { + [_warningSound play]; + } + else if (_defaultSound) { + [_defaultSound play]; + } + break; + case TSMessageNotificationTypeError: + if (_errorSound) { + [_errorSound play]; + } else if (_defaultSound) { + [_defaultSound play]; + } + break; + case TSMessageNotificationTypeSuccess: + if (_successSound) { + [_successSound play]; + } else if (_defaultSound) { + [_defaultSound play]; + } + break; + default: + break; + } #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 [UIView animateWithDuration:kTSMessageAnimationDuration + 0.1 delay:0 @@ -395,6 +450,49 @@ + (void)addCustomDesignFromFileWithName:(NSString *)fileName [TSMessageView addNotificationDesignFromFile:fileName]; } ++ (void)setDefaultNotificationSoundWithName:(NSString *)name andExtension:(NSString *)extension +{ + _defaultSound = [[TSMessage sharedMessage] loadSound:name extension:extension]; +} + ++ (void)setSoundWithName:(NSString*)name extension:(NSString*)extension forNotificationType:(TSMessageNotificationType)notificationType { + switch (notificationType) { + case TSMessageNotificationTypeMessage: + _messageSound = [[TSMessage sharedMessage] loadSound:name extension:extension]; + break; + case TSMessageNotificationTypeWarning: + _warningSound =[[TSMessage sharedMessage] loadSound:name extension:extension]; + break; + case TSMessageNotificationTypeError: + _errorSound = [[TSMessage sharedMessage] loadSound:name extension:extension]; + break; + case TSMessageNotificationTypeSuccess: + _successSound = [[TSMessage sharedMessage] loadSound:name extension:extension]; + break; + default: + break; + } +} + +- (AVAudioPlayer *)loadSound:(NSString *)filename extension:(NSString *)extension +{ + NSURL * url = [[NSBundle mainBundle] URLForResource:filename withExtension:extension]; + NSError * error; + AVAudioPlayer * player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error]; + if (!player) { + NSLog(@"Error loading %@: %@", url, error.localizedDescription); + } else + { + //#if !(TARGET_IPHONE_SIMULATOR) + { + [player prepareToPlay]; + } + //#endif + + } + return player; +} + #pragma mark Other methods diff --git a/TSMessages/Views/TSMessageView.h b/TSMessages/Views/TSMessageView.h index b52cf221..06f3dc25 100755 --- a/TSMessages/Views/TSMessageView.h +++ b/TSMessages/Views/TSMessageView.h @@ -39,6 +39,9 @@ /** The position of the message (top or bottom) */ @property (nonatomic, assign) TSMessageNotificationPosition messagePosition; +/** The message type */ +@property (nonatomic, assign) TSMessageNotificationType messageType; + /** Is the message currenlty fully displayed? Is set as soon as the message is really fully visible */ @property (nonatomic, assign) BOOL messageIsFullyDisplayed; diff --git a/TSMessages/Views/TSMessageView.m b/TSMessages/Views/TSMessageView.m index 365c30c2..5276423f 100755 --- a/TSMessages/Views/TSMessageView.m +++ b/TSMessages/Views/TSMessageView.m @@ -109,6 +109,7 @@ - (id)initWithTitle:(NSString *)title _messagePosition = position; self.callback = callback; self.buttonCallback = buttonCallback; + _messageType = notificationType; CGFloat screenWidth = self.viewController.view.bounds.size.width; NSDictionary *current;