diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..7de3dcc Binary files /dev/null and b/.DS_Store differ diff --git a/EonaCatTools.xcodeproj/project.pbxproj b/EonaCatTools.xcodeproj/project.pbxproj new file mode 100644 index 0000000..50ff3b6 --- /dev/null +++ b/EonaCatTools.xcodeproj/project.pbxproj @@ -0,0 +1,636 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + EC760B97178E976E00095B31 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC760B96178E976E00095B31 /* Foundation.framework */; }; + EC760B99178E976E00095B31 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC760B98178E976E00095B31 /* CoreGraphics.framework */; }; + EC760B9B178E976E00095B31 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC760B9A178E976E00095B31 /* UIKit.framework */; }; + EC760BA1178E976E00095B31 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EC760B9F178E976E00095B31 /* InfoPlist.strings */; }; + EC760BA3178E976E00095B31 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BA2178E976E00095B31 /* main.m */; }; + EC760BA7178E976E00095B31 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BA6178E976E00095B31 /* AppDelegate.m */; }; + EC760BAA178E976E00095B31 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EC760BA8178E976E00095B31 /* Main_iPhone.storyboard */; }; + EC760BAD178E976E00095B31 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EC760BAB178E976E00095B31 /* Main_iPad.storyboard */; }; + EC760BB0178E976E00095B31 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BAF178E976E00095B31 /* ViewController.m */; }; + EC760BB2178E976E00095B31 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC760BB1178E976E00095B31 /* Images.xcassets */; }; + EC760BB9178E976E00095B31 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC760BB8178E976E00095B31 /* XCTest.framework */; }; + EC760BBA178E976E00095B31 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC760B96178E976E00095B31 /* Foundation.framework */; }; + EC760BBB178E976E00095B31 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC760B9A178E976E00095B31 /* UIKit.framework */; }; + EC760BC3178E976E00095B31 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EC760BC1178E976E00095B31 /* InfoPlist.strings */; }; + EC760BC5178E976E00095B31 /* EonaCatToolsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BC4178E976E00095B31 /* EonaCatToolsTests.m */; }; + EC760BEC178E97CB00095B31 /* ExceptionsLogger.strings in Resources */ = {isa = PBXBuildFile; fileRef = EC760BE2178E97CB00095B31 /* ExceptionsLogger.strings */; }; + EC760BED178E97CB00095B31 /* ExceptionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BE6178E97CB00095B31 /* ExceptionHandler.m */; }; + EC760BEE178E97CB00095B31 /* ExceptionLogger-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC760BE7178E97CB00095B31 /* ExceptionLogger-iPad.xib */; }; + EC760BEF178E97CB00095B31 /* ExceptionLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BE9178E97CB00095B31 /* ExceptionLogger.m */; }; + EC760BF0178E97CB00095B31 /* ExceptionLogger.png in Resources */ = {isa = PBXBuildFile; fileRef = EC760BEA178E97CB00095B31 /* ExceptionLogger.png */; }; + EC760BF1178E97CB00095B31 /* ExceptionLogger.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC760BEB178E97CB00095B31 /* ExceptionLogger.xib */; }; + EC760BF7178E989000095B31 /* DeviceIdentifier.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BF4178E989000095B31 /* DeviceIdentifier.m */; }; + EC760BF8178E989000095B31 /* SHA1.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BF6178E989000095B31 /* SHA1.m */; }; + EC760C05178EB5FB00095B31 /* LockController.strings in Resources */ = {isa = PBXBuildFile; fileRef = EC760BFA178EB5FB00095B31 /* LockController.strings */; }; + EC760C06178EB5FB00095B31 /* LockController.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760BFE178EB5FB00095B31 /* LockController.m */; }; + EC760C07178EB5FB00095B31 /* Popup.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760C01178EB5FB00095B31 /* Popup.m */; }; + EC760C08178EB5FB00095B31 /* Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = EC760C04178EB5FB00095B31 /* Toast.m */; }; + EC760C0B178EB9C800095B31 /* toast.png in Resources */ = {isa = PBXBuildFile; fileRef = EC760C0A178EB9C800095B31 /* toast.png */; }; + EC760C0D178EBBE300095B31 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EC760C0C178EBBE300095B31 /* AudioToolbox.framework */; }; + EC760C0F178EBCD200095B31 /* toast.wav in Resources */ = {isa = PBXBuildFile; fileRef = EC760C0E178EBCD200095B31 /* toast.wav */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + EC760BBC178E976E00095B31 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EC760B8B178E976E00095B31 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EC760B92178E976E00095B31; + remoteInfo = EonaCatTools; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + EC760B93178E976E00095B31 /* EonaCatTools.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EonaCatTools.app; sourceTree = BUILT_PRODUCTS_DIR; }; + EC760B96178E976E00095B31 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + EC760B98178E976E00095B31 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + EC760B9A178E976E00095B31 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + EC760B9E178E976E00095B31 /* EonaCatTools-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "EonaCatTools-Info.plist"; sourceTree = ""; }; + EC760BA0178E976E00095B31 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + EC760BA2178E976E00095B31 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + EC760BA4178E976E00095B31 /* EonaCatTools-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "EonaCatTools-Prefix.pch"; sourceTree = ""; }; + EC760BA5178E976E00095B31 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + EC760BA6178E976E00095B31 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + EC760BA9178E976E00095B31 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = ""; }; + EC760BAC178E976E00095B31 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = ""; }; + EC760BAE178E976E00095B31 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + EC760BAF178E976E00095B31 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + EC760BB1178E976E00095B31 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + EC760BB7178E976E00095B31 /* EonaCatToolsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EonaCatToolsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + EC760BB8178E976E00095B31 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + EC760BC0178E976E00095B31 /* EonaCatToolsTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "EonaCatToolsTests-Info.plist"; sourceTree = ""; }; + EC760BC2178E976E00095B31 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + EC760BC4178E976E00095B31 /* EonaCatToolsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EonaCatToolsTests.m; sourceTree = ""; }; + EC760BE3178E97CB00095B31 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/ExceptionsLogger.strings; sourceTree = ""; }; + EC760BE4178E97CB00095B31 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/ExceptionsLogger.strings; sourceTree = ""; }; + EC760BE5178E97CB00095B31 /* ExceptionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionHandler.h; sourceTree = ""; }; + EC760BE6178E97CB00095B31 /* ExceptionHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExceptionHandler.m; sourceTree = ""; }; + EC760BE7178E97CB00095B31 /* ExceptionLogger-iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ExceptionLogger-iPad.xib"; sourceTree = ""; }; + EC760BE8178E97CB00095B31 /* ExceptionLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionLogger.h; sourceTree = ""; }; + EC760BE9178E97CB00095B31 /* ExceptionLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExceptionLogger.m; sourceTree = ""; }; + EC760BEA178E97CB00095B31 /* ExceptionLogger.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ExceptionLogger.png; sourceTree = ""; }; + EC760BEB178E97CB00095B31 /* ExceptionLogger.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ExceptionLogger.xib; sourceTree = ""; }; + EC760BF3178E989000095B31 /* DeviceIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceIdentifier.h; sourceTree = ""; }; + EC760BF4178E989000095B31 /* DeviceIdentifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceIdentifier.m; sourceTree = ""; }; + EC760BF5178E989000095B31 /* SHA1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SHA1.h; sourceTree = ""; }; + EC760BF6178E989000095B31 /* SHA1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SHA1.m; sourceTree = ""; }; + EC760BFB178EB5FB00095B31 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/LockController.strings; sourceTree = ""; }; + EC760BFC178EB5FB00095B31 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/LockController.strings; sourceTree = ""; }; + EC760BFD178EB5FB00095B31 /* LockController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LockController.h; sourceTree = ""; }; + EC760BFE178EB5FB00095B31 /* LockController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LockController.m; sourceTree = ""; }; + EC760C00178EB5FB00095B31 /* Popup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Popup.h; sourceTree = ""; }; + EC760C01178EB5FB00095B31 /* Popup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Popup.m; sourceTree = ""; }; + EC760C03178EB5FB00095B31 /* Toast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Toast.h; sourceTree = ""; }; + EC760C04178EB5FB00095B31 /* Toast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Toast.m; sourceTree = ""; }; + EC760C0A178EB9C800095B31 /* toast.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = toast.png; sourceTree = ""; }; + EC760C0C178EBBE300095B31 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + EC760C0E178EBCD200095B31 /* toast.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = toast.wav; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + EC760B90178E976E00095B31 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EC760C0D178EBBE300095B31 /* AudioToolbox.framework in Frameworks */, + EC760B99178E976E00095B31 /* CoreGraphics.framework in Frameworks */, + EC760B9B178E976E00095B31 /* UIKit.framework in Frameworks */, + EC760B97178E976E00095B31 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC760BB4178E976E00095B31 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EC760BB9178E976E00095B31 /* XCTest.framework in Frameworks */, + EC760BBB178E976E00095B31 /* UIKit.framework in Frameworks */, + EC760BBA178E976E00095B31 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + EC760B8A178E976E00095B31 = { + isa = PBXGroup; + children = ( + EC760B9C178E976E00095B31 /* EonaCatTools */, + EC760BBE178E976E00095B31 /* EonaCatToolsTests */, + EC760B95178E976E00095B31 /* Frameworks */, + EC760B94178E976E00095B31 /* Products */, + ); + sourceTree = ""; + }; + EC760B94178E976E00095B31 /* Products */ = { + isa = PBXGroup; + children = ( + EC760B93178E976E00095B31 /* EonaCatTools.app */, + EC760BB7178E976E00095B31 /* EonaCatToolsTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + EC760B95178E976E00095B31 /* Frameworks */ = { + isa = PBXGroup; + children = ( + EC760C0C178EBBE300095B31 /* AudioToolbox.framework */, + EC760B96178E976E00095B31 /* Foundation.framework */, + EC760B98178E976E00095B31 /* CoreGraphics.framework */, + EC760B9A178E976E00095B31 /* UIKit.framework */, + EC760BB8178E976E00095B31 /* XCTest.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + EC760B9C178E976E00095B31 /* EonaCatTools */ = { + isa = PBXGroup; + children = ( + EC760C09178EB9C800095B31 /* Images */, + EC760BE0178E97CB00095B31 /* Tools */, + EC760BA5178E976E00095B31 /* AppDelegate.h */, + EC760BA6178E976E00095B31 /* AppDelegate.m */, + EC760BA8178E976E00095B31 /* Main_iPhone.storyboard */, + EC760BAB178E976E00095B31 /* Main_iPad.storyboard */, + EC760BAE178E976E00095B31 /* ViewController.h */, + EC760BAF178E976E00095B31 /* ViewController.m */, + EC760BB1178E976E00095B31 /* Images.xcassets */, + EC760B9D178E976E00095B31 /* Supporting Files */, + ); + path = EonaCatTools; + sourceTree = ""; + }; + EC760B9D178E976E00095B31 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + EC760B9E178E976E00095B31 /* EonaCatTools-Info.plist */, + EC760B9F178E976E00095B31 /* InfoPlist.strings */, + EC760BA2178E976E00095B31 /* main.m */, + EC760BA4178E976E00095B31 /* EonaCatTools-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + EC760BBE178E976E00095B31 /* EonaCatToolsTests */ = { + isa = PBXGroup; + children = ( + EC760BC4178E976E00095B31 /* EonaCatToolsTests.m */, + EC760BBF178E976E00095B31 /* Supporting Files */, + ); + path = EonaCatToolsTests; + sourceTree = ""; + }; + EC760BBF178E976E00095B31 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + EC760BC0178E976E00095B31 /* EonaCatToolsTests-Info.plist */, + EC760BC1178E976E00095B31 /* InfoPlist.strings */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + EC760BE0178E97CB00095B31 /* Tools */ = { + isa = PBXGroup; + children = ( + EC760BF9178EB5FB00095B31 /* Lockscreen */, + EC760BFF178EB5FB00095B31 /* Popup */, + EC760C02178EB5FB00095B31 /* Toast */, + EC760BF2178E989000095B31 /* uniqueIdentifier */, + EC760BE1178E97CB00095B31 /* ExceptionsLogger */, + ); + path = Tools; + sourceTree = ""; + }; + EC760BE1178E97CB00095B31 /* ExceptionsLogger */ = { + isa = PBXGroup; + children = ( + EC760BE2178E97CB00095B31 /* ExceptionsLogger.strings */, + EC760BE5178E97CB00095B31 /* ExceptionHandler.h */, + EC760BE6178E97CB00095B31 /* ExceptionHandler.m */, + EC760BE7178E97CB00095B31 /* ExceptionLogger-iPad.xib */, + EC760BE8178E97CB00095B31 /* ExceptionLogger.h */, + EC760BE9178E97CB00095B31 /* ExceptionLogger.m */, + EC760BEA178E97CB00095B31 /* ExceptionLogger.png */, + EC760BEB178E97CB00095B31 /* ExceptionLogger.xib */, + ); + path = ExceptionsLogger; + sourceTree = ""; + }; + EC760BF2178E989000095B31 /* uniqueIdentifier */ = { + isa = PBXGroup; + children = ( + EC760BF3178E989000095B31 /* DeviceIdentifier.h */, + EC760BF4178E989000095B31 /* DeviceIdentifier.m */, + EC760BF5178E989000095B31 /* SHA1.h */, + EC760BF6178E989000095B31 /* SHA1.m */, + ); + path = uniqueIdentifier; + sourceTree = ""; + }; + EC760BF9178EB5FB00095B31 /* Lockscreen */ = { + isa = PBXGroup; + children = ( + EC760BFA178EB5FB00095B31 /* LockController.strings */, + EC760BFD178EB5FB00095B31 /* LockController.h */, + EC760BFE178EB5FB00095B31 /* LockController.m */, + ); + path = Lockscreen; + sourceTree = ""; + }; + EC760BFF178EB5FB00095B31 /* Popup */ = { + isa = PBXGroup; + children = ( + EC760C00178EB5FB00095B31 /* Popup.h */, + EC760C01178EB5FB00095B31 /* Popup.m */, + ); + path = Popup; + sourceTree = ""; + }; + EC760C02178EB5FB00095B31 /* Toast */ = { + isa = PBXGroup; + children = ( + EC760C03178EB5FB00095B31 /* Toast.h */, + EC760C0E178EBCD200095B31 /* toast.wav */, + EC760C04178EB5FB00095B31 /* Toast.m */, + ); + path = Toast; + sourceTree = ""; + }; + EC760C09178EB9C800095B31 /* Images */ = { + isa = PBXGroup; + children = ( + EC760C0A178EB9C800095B31 /* toast.png */, + ); + name = Images; + path = EonaCatTools/Images; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + EC760B92178E976E00095B31 /* EonaCatTools */ = { + isa = PBXNativeTarget; + buildConfigurationList = EC760BC8178E976E00095B31 /* Build configuration list for PBXNativeTarget "EonaCatTools" */; + buildPhases = ( + EC760B8F178E976E00095B31 /* Sources */, + EC760B90178E976E00095B31 /* Frameworks */, + EC760B91178E976E00095B31 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EonaCatTools; + productName = EonaCatTools; + productReference = EC760B93178E976E00095B31 /* EonaCatTools.app */; + productType = "com.apple.product-type.application"; + }; + EC760BB6178E976E00095B31 /* EonaCatToolsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EC760BCB178E976E00095B31 /* Build configuration list for PBXNativeTarget "EonaCatToolsTests" */; + buildPhases = ( + EC760BB3178E976E00095B31 /* Sources */, + EC760BB4178E976E00095B31 /* Frameworks */, + EC760BB5178E976E00095B31 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EC760BBD178E976E00095B31 /* PBXTargetDependency */, + ); + name = EonaCatToolsTests; + productName = EonaCatToolsTests; + productReference = EC760BB7178E976E00095B31 /* EonaCatToolsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + EC760B8B178E976E00095B31 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0500; + ORGANIZATIONNAME = EonaCat; + TargetAttributes = { + EC760BB6178E976E00095B31 = { + TestTargetID = EC760B92178E976E00095B31; + }; + }; + }; + buildConfigurationList = EC760B8E178E976E00095B31 /* Build configuration list for PBXProject "EonaCatTools" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + Dutch, + English, + ); + mainGroup = EC760B8A178E976E00095B31; + productRefGroup = EC760B94178E976E00095B31 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + EC760B92178E976E00095B31 /* EonaCatTools */, + EC760BB6178E976E00095B31 /* EonaCatToolsTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + EC760B91178E976E00095B31 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC760BAD178E976E00095B31 /* Main_iPad.storyboard in Resources */, + EC760C05178EB5FB00095B31 /* LockController.strings in Resources */, + EC760BB2178E976E00095B31 /* Images.xcassets in Resources */, + EC760BEC178E97CB00095B31 /* ExceptionsLogger.strings in Resources */, + EC760BF1178E97CB00095B31 /* ExceptionLogger.xib in Resources */, + EC760BF0178E97CB00095B31 /* ExceptionLogger.png in Resources */, + EC760C0F178EBCD200095B31 /* toast.wav in Resources */, + EC760BEE178E97CB00095B31 /* ExceptionLogger-iPad.xib in Resources */, + EC760BAA178E976E00095B31 /* Main_iPhone.storyboard in Resources */, + EC760BA1178E976E00095B31 /* InfoPlist.strings in Resources */, + EC760C0B178EB9C800095B31 /* toast.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC760BB5178E976E00095B31 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC760BC3178E976E00095B31 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + EC760B8F178E976E00095B31 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC760C06178EB5FB00095B31 /* LockController.m in Sources */, + EC760BB0178E976E00095B31 /* ViewController.m in Sources */, + EC760BA7178E976E00095B31 /* AppDelegate.m in Sources */, + EC760C07178EB5FB00095B31 /* Popup.m in Sources */, + EC760BF7178E989000095B31 /* DeviceIdentifier.m in Sources */, + EC760C08178EB5FB00095B31 /* Toast.m in Sources */, + EC760BED178E97CB00095B31 /* ExceptionHandler.m in Sources */, + EC760BEF178E97CB00095B31 /* ExceptionLogger.m in Sources */, + EC760BA3178E976E00095B31 /* main.m in Sources */, + EC760BF8178E989000095B31 /* SHA1.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC760BB3178E976E00095B31 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC760BC5178E976E00095B31 /* EonaCatToolsTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + EC760BBD178E976E00095B31 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EC760B92178E976E00095B31 /* EonaCatTools */; + targetProxy = EC760BBC178E976E00095B31 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + EC760B9F178E976E00095B31 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + EC760BA0178E976E00095B31 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + EC760BA8178E976E00095B31 /* Main_iPhone.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EC760BA9178E976E00095B31 /* Base */, + ); + name = Main_iPhone.storyboard; + sourceTree = ""; + }; + EC760BAB178E976E00095B31 /* Main_iPad.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EC760BAC178E976E00095B31 /* Base */, + ); + name = Main_iPad.storyboard; + sourceTree = ""; + }; + EC760BC1178E976E00095B31 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + EC760BC2178E976E00095B31 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + EC760BE2178E97CB00095B31 /* ExceptionsLogger.strings */ = { + isa = PBXVariantGroup; + children = ( + EC760BE3178E97CB00095B31 /* Dutch */, + EC760BE4178E97CB00095B31 /* English */, + ); + name = ExceptionsLogger.strings; + sourceTree = ""; + }; + EC760BFA178EB5FB00095B31 /* LockController.strings */ = { + isa = PBXVariantGroup; + children = ( + EC760BFB178EB5FB00095B31 /* Dutch */, + EC760BFC178EB5FB00095B31 /* English */, + ); + name = LockController.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + EC760BC6178E976E00095B31 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + 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; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + 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_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 = 7.0; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EC760BC7178E976E00095B31 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + 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; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 7.0; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EC760BC9178E976E00095B31 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "EonaCatTools/EonaCatTools-Prefix.pch"; + INFOPLIST_FILE = "EonaCatTools/EonaCatTools-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + EC760BCA178E976E00095B31 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "EonaCatTools/EonaCatTools-Prefix.pch"; + INFOPLIST_FILE = "EonaCatTools/EonaCatTools-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + EC760BCC178E976E00095B31 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/EonaCatTools.app/EonaCatTools"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(SYSTEM_APPS_DIR)/Xcode5-DP3.app/Contents/Developer/Library/Frameworks", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "EonaCatTools/EonaCatTools-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "EonaCatToolsTests/EonaCatToolsTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + EC760BCD178E976E00095B31 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/EonaCatTools.app/EonaCatTools"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(SYSTEM_APPS_DIR)/Xcode5-DP3.app/Contents/Developer/Library/Frameworks", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "EonaCatTools/EonaCatTools-Prefix.pch"; + INFOPLIST_FILE = "EonaCatToolsTests/EonaCatToolsTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + EC760B8E178E976E00095B31 /* Build configuration list for PBXProject "EonaCatTools" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EC760BC6178E976E00095B31 /* Debug */, + EC760BC7178E976E00095B31 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EC760BC8178E976E00095B31 /* Build configuration list for PBXNativeTarget "EonaCatTools" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EC760BC9178E976E00095B31 /* Debug */, + EC760BCA178E976E00095B31 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + EC760BCB178E976E00095B31 /* Build configuration list for PBXNativeTarget "EonaCatToolsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EC760BCC178E976E00095B31 /* Debug */, + EC760BCD178E976E00095B31 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = EC760B8B178E976E00095B31 /* Project object */; +} diff --git a/EonaCatTools.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/EonaCatTools.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..651a506 --- /dev/null +++ b/EonaCatTools.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/EonaCatTools/.DS_Store b/EonaCatTools/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/EonaCatTools/.DS_Store differ diff --git a/EonaCatTools/AppDelegate.h b/EonaCatTools/AppDelegate.h new file mode 100644 index 0000000..f8eefe1 --- /dev/null +++ b/EonaCatTools/AppDelegate.h @@ -0,0 +1,16 @@ +// +// AppDelegate.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +#define Delegate ((AppDelegate *)[[UIApplication sharedApplication] delegate]) + +@property (strong, nonatomic) UIWindow *window; +@property (nonatomic, assign) BOOL iPad; + +@end diff --git a/EonaCatTools/AppDelegate.m b/EonaCatTools/AppDelegate.m new file mode 100644 index 0000000..eb36295 --- /dev/null +++ b/EonaCatTools/AppDelegate.m @@ -0,0 +1,55 @@ +// +// AppDelegate.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import "AppDelegate.h" +#import "ExceptionHandler.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + + self.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); + + // Create the exceptionHandler + [self performSelector:@selector(setExceptionHandler) withObject:nil afterDelay:0]; + + return YES; +} + +- (void)setExceptionHandler +{ + createExceptionHandler(@"YOUREMAILADDRESS", @""); +} + +- (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 throttle down OpenGL ES frame rates. 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 inactive 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/EonaCatTools/Base.lproj/Main_iPad.storyboard b/EonaCatTools/Base.lproj/Main_iPad.storyboard new file mode 100644 index 0000000..d185ea0 --- /dev/null +++ b/EonaCatTools/Base.lproj/Main_iPad.storyboard @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EonaCatTools/Base.lproj/Main_iPhone.storyboard b/EonaCatTools/Base.lproj/Main_iPhone.storyboard new file mode 100644 index 0000000..9e8307e --- /dev/null +++ b/EonaCatTools/Base.lproj/Main_iPhone.storyboard @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EonaCatTools/EonaCatTools-Info.plist b/EonaCatTools/EonaCatTools-Info.plist new file mode 100644 index 0000000..ede82dd --- /dev/null +++ b/EonaCatTools/EonaCatTools-Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + nl.EonaCat.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main_iPhone + UIMainStoryboardFile~ipad + Main_iPad + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/EonaCatTools/EonaCatTools-Prefix.pch b/EonaCatTools/EonaCatTools-Prefix.pch new file mode 100644 index 0000000..82a2bb4 --- /dev/null +++ b/EonaCatTools/EonaCatTools-Prefix.pch @@ -0,0 +1,16 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#import + +#ifndef __IPHONE_5_0 +#warning "This project uses features only available in iOS SDK 5.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/EonaCatTools/Images.xcassets/AppIcon.appiconset/Contents.json b/EonaCatTools/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..1189d95 --- /dev/null +++ b/EonaCatTools/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "50x50", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "50x50", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "72x72", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "72x72", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/EonaCatTools/Images.xcassets/LaunchImage.launchimage/Contents.json b/EonaCatTools/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..6f870a4 --- /dev/null +++ b/EonaCatTools/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,51 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/EonaCatTools/Images/toast.png b/EonaCatTools/Images/toast.png new file mode 100644 index 0000000..a8c4593 Binary files /dev/null and b/EonaCatTools/Images/toast.png differ diff --git a/EonaCatTools/Tools/.DS_Store b/EonaCatTools/Tools/.DS_Store new file mode 100644 index 0000000..e6cc851 Binary files /dev/null and b/EonaCatTools/Tools/.DS_Store differ diff --git a/EonaCatTools/Tools/ExceptionsLogger/.DS_Store b/EonaCatTools/Tools/ExceptionsLogger/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/EonaCatTools/Tools/ExceptionsLogger/.DS_Store differ diff --git a/EonaCatTools/Tools/ExceptionsLogger/Dutch.lproj/ExceptionsLogger.strings b/EonaCatTools/Tools/ExceptionsLogger/Dutch.lproj/ExceptionsLogger.strings new file mode 100644 index 0000000..61834fb --- /dev/null +++ b/EonaCatTools/Tools/ExceptionsLogger/Dutch.lproj/ExceptionsLogger.strings @@ -0,0 +1,5 @@ +// Dutch language file + +"Back" = "Terug"; +"Clear" = "Legen"; +"Exceptions" = "Foutmeldingen"; \ No newline at end of file diff --git a/EonaCatTools/Tools/ExceptionsLogger/English.lproj/ExceptionsLogger.strings b/EonaCatTools/Tools/ExceptionsLogger/English.lproj/ExceptionsLogger.strings new file mode 100644 index 0000000..2cf3e3e --- /dev/null +++ b/EonaCatTools/Tools/ExceptionsLogger/English.lproj/ExceptionsLogger.strings @@ -0,0 +1,5 @@ +// English language file + +"Back" = "Back"; +"Clear" = "Clear"; +"Exceptions" = "Exceptions"; \ No newline at end of file diff --git a/EonaCatTools/Tools/ExceptionsLogger/ExceptionHandler.h b/EonaCatTools/Tools/ExceptionsLogger/ExceptionHandler.h new file mode 100644 index 0000000..3c9c326 --- /dev/null +++ b/EonaCatTools/Tools/ExceptionsLogger/ExceptionHandler.h @@ -0,0 +1,20 @@ +// +// ExceptionHandler.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import +#import +#import + +#define exceptionDelegate [[UIApplication sharedApplication] delegate] + +@interface ExceptionHandler : UIViewController +{ + BOOL dismissed; +} + +@end + +void createExceptionHandler(NSString *emailAddress,NSString *BCCemailAddress); \ No newline at end of file diff --git a/EonaCatTools/Tools/ExceptionsLogger/ExceptionHandler.m b/EonaCatTools/Tools/ExceptionsLogger/ExceptionHandler.m new file mode 100644 index 0000000..fee0e16 --- /dev/null +++ b/EonaCatTools/Tools/ExceptionsLogger/ExceptionHandler.m @@ -0,0 +1,359 @@ +// +// ExceptionHandler.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +// The ExceptionHandler needs to be imported in the ApplicationDelegate by using the #import "ExceptionHandler.h"; statement in de .m file +// The following functions need to be created in the ApplicationDelegate.m file + +// - (void)setExceptionHandler +// { +// createExceptionHandler(@"YOUREMAILADDRESS", @""); +// } + +// In the ApplicationDelegate file the method +// - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { +// need to be created inside this method you will need to implement the following code: +// + +// //Create the exceptionHandler +// [self performSelector:@selector(setExceptionHandler) withObject:nil afterDelay:0]; +// +// +// You will need to implement the application delegate of the application before you can use the Email function. +// So be sure to import the applications's delegate headerfile and change the following line: +// (Located in the - (void) displayComposerSheet:(NSString *)body method) +// +// [self presentViewController: tempMailCompose animated:YES completion:nil]; +// +// into +// +// [root.navigationController presentViewController: tempMailCompose animated:YES completion:nil]; +// +// Be sure that the following line is present in your core or appdelegate file +// #define Delegate ((yourAppDelegateFileName*)[UIApplication sharedApplication].delegate) + + + +#import "ExceptionHandler.h" +#import "DeviceIdentifier.h" +#include +#include +#import "ExceptionLogger.h" + +const NSString *ExceptionName = @"ExceptionName"; +const NSString *ExceptionKey = @"ExceptionKey"; +const NSString *ExceptionAddresses = @"ExceptionAddresses"; + +NSString *ExceptionTitle = @"iPhone Exception"; +NSString *ExceptionEmail = @""; +NSString *ExceptionBCCEmail = @""; +NSString *ExceptionMessage = @""; +NSInteger ExceptionShown = 0; +BOOL ExceptionAlert = true; + +volatile int32_t ExceptionCount = 0; +const int32_t ExceptionMaximum = 5; + +const NSInteger ExceptionHandlerSkipAddressCount = 4; +const NSInteger ExceptionHandlerReportAddressCount = 5; + +@implementation ExceptionHandler + ++ (NSArray *)backtrace +{ + void *callstack[128]; + int frames = backtrace(callstack, 128); + char **stringSymbols = backtrace_symbols(callstack, frames); + + int i; + NSMutableArray *backtrace = [NSMutableArray arrayWithCapacity:frames]; + + for (i = ExceptionHandlerSkipAddressCount; i < ExceptionHandlerSkipAddressCount + ExceptionHandlerReportAddressCount; i++) + { + [backtrace addObject:[NSString stringWithUTF8String:stringSymbols[i]]]; + } + free(stringSymbols); + + return backtrace; +} + +- (void)alertView:(UIAlertView *)anAlertView clickedButtonAtIndex:(NSInteger)Index +{ + if (Index == 0) // Quit button clicked + { + ExceptionShown = 0; + dismissed = YES; + } + else if (Index == 1) // Continue button clicked + { + ExceptionShown = 0; + } + else if (Index == 2) // Email button clicked + { + // Create the email that needs to be send + [self performSelector:@selector(showComposer:) withObject:ExceptionMessage afterDelay:0.1]; + } +} + + +// Displays an email composition interface inside the application. Populates all the Mail fields. +- (void) displayComposerSheet:(NSString *)body +{ + MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init]; + mailController.mailComposeDelegate = self; + + NSArray *toRecipient = [[NSArray alloc] initWithObjects:ExceptionEmail,nil]; + [mailController setToRecipients:toRecipient]; + + if (ExceptionBCCEmail.length > 0) + { + NSArray *bccRecipient = [[NSArray alloc] initWithObjects:ExceptionBCCEmail,nil]; + [mailController setBccRecipients:bccRecipient]; + } + [mailController setSubject:ExceptionTitle]; + [mailController setMessageBody:body isHTML:NO]; + + UIWindow* window = [[UIApplication sharedApplication] keyWindow]; + [window addSubview:mailController.view]; +} + +// Dismisses the email composition interface when users tap Cancel or Send. Proceeds to update the message field with the result of the operation. +- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error +{ + // Notifies users about errors associated with the interface + switch (result) + { + case MFMailComposeResultCancelled: + NSLog(@"Result: canceled"); + break; + case MFMailComposeResultSaved: + NSLog(@"Result: saved"); + break; + case MFMailComposeResultSent: + NSLog(@"Result: sent"); + break; + case MFMailComposeResultFailed: + NSLog(@"Result: failed"); + break; + default: + NSLog(@"Result: not sent"); + break; + } + [self dismissViewControllerAnimated:YES completion:nil]; +} + +// Launches the Mail application on the device. Workaround +-(void)launchMailAppOnDevice:(NSString *)body +{ + NSString *recipients; + + if ([ExceptionEmail isEqualToString:@"YOUREMAILADDRESS"]) + { + NSLog(@"Could not send email (default values where detected!)"); + return; + } + + if (ExceptionBCCEmail.length > 0) + { + recipients = [NSString stringWithFormat:@"mailto:%@?bcc=%@?subject=%@", ExceptionEmail, ExceptionBCCEmail, ExceptionTitle]; + } + else + { + recipients = [NSString stringWithFormat:@"mailto:%@?subject=%@", ExceptionEmail, ExceptionTitle]; + } + + NSString *mailBody = [NSString stringWithFormat:@"&body=%@", body]; + + NSString *email = [NSString stringWithFormat:@"%@%@", recipients, mailBody]; + email = [email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:email]]; +} + +// Call this method and pass parameters +-(void) showComposer:(id)sender +{ + Class mailClass = (NSClassFromString(@"MFMailComposeViewController")); + + if (mailClass != nil) + { + // We must always check whether the current device is configured for sending emails + if ([mailClass canSendMail]) + { + [self displayComposerSheet:sender]; + } + else + { + [self launchMailAppOnDevice:sender]; + } + } + else + { + [self launchMailAppOnDevice:sender]; + } +} + + +- (void)saveAndQuit +{ + +} + +- (void)checkForExceptions:(NSException *)exception +{ + if (ExceptionShown == 0) + { + ExceptionShown = 1; + [self saveAndQuit]; + + /* + // Set the IMEI Number + // Check if you got iOS5 + NSString *IMEI; + float version = [[[UIDevice currentDevice] systemVersion] floatValue]; + if (version >= 5.0) + { + IMEI = [[NSString alloc] initWithString:[[UIDevice currentDevice] deviceIdentifier]]; + } + else + { + IMEI = [[NSString alloc] initWithString:[[UIDevice currentDevice] uniqueIdentifier]]; + } + */ + + NSDate *currentTime = [NSDate date]; + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"YYYY-MM-dd hh-mm"]; + NSString *resultString = [dateFormatter stringFromDate: currentTime]; + + ExceptionMessage = [NSString stringWithFormat: + @"iPhone exception information:\n\n" + @"Date: %@\n" + @"Application Name: %@\n" + @"Localized Application Name: %@\n" + @"Devicetype: %@\n" + @"============================= \n" + @"Reason: %@\n" + @"============================= \n\n" + @"***************************** \n\n" + @"Exception: %@\n\n" + @"***************************** \n", + resultString, [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"], + [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"], [UIDevice currentDevice].model, + [exception reason],[[exception userInfo] objectForKey:ExceptionAddresses]]; + + if (ExceptionAlert) + { + UIAlertView *alert = + [[UIAlertView alloc] + initWithTitle:@"You have found an error" + message:[NSString stringWithFormat: @"You can try continuing using the application " + @"but it may become unstable after a while.\n" + @"Please send us an email with the error report " + @"by clicking on the send report button."] + delegate:self + cancelButtonTitle:@"Quit" + otherButtonTitles:@"Continue", @"Send report",nil]; + [alert show]; + } + else + { + [[ExceptionLogger instance] log:ExceptionMessage]; + } + + CFRunLoopRef runLoop = CFRunLoopGetCurrent(); + CFArrayRef allModes = CFRunLoopCopyAllModes(runLoop); + + while (!dismissed) + { + for (NSString *mode in (__bridge NSArray *)allModes) + { + CFRunLoopRunInMode((__bridge CFStringRef)mode, 0.001, false); + } + } + + CFRelease(allModes); + + NSSetUncaughtExceptionHandler(NULL); + signal(SIGABRT, SIG_DFL); + signal(SIGILL, SIG_DFL); + signal(SIGSEGV, SIG_DFL); + signal(SIGFPE, SIG_DFL); + signal(SIGBUS, SIG_DFL); + signal(SIGPIPE, SIG_DFL); + + if ([[exception name] isEqual:ExceptionName]) + { + kill(getpid(), [[[exception userInfo] objectForKey:ExceptionKey] intValue]); + } + else + { + [exception raise]; + } + } +} + +@end + +void checkForExceptions(NSException *exception) +{ + int32_t exceptionCount = OSAtomicIncrement32(&ExceptionCount); + if (exceptionCount > ExceptionMaximum) + { + NSLog(@"Maximum amount of exceptions where raised !"); + return; + } + + NSArray *callStack = [ExceptionHandler backtrace]; + NSMutableDictionary *userInfo = + [NSMutableDictionary dictionaryWithDictionary:[exception userInfo]]; + [userInfo + setObject:callStack + forKey:ExceptionAddresses]; + + [[[ExceptionHandler alloc] init] + performSelectorOnMainThread:@selector(checkForExceptions:) + withObject: + [NSException + exceptionWithName:[exception name] + reason:[exception reason] + userInfo:userInfo] + waitUntilDone:YES]; +} + +void ExceptionCounter(int exception) +{ + int32_t exceptionCount = OSAtomicIncrement32(&ExceptionCount); + + if (exceptionCount > ExceptionMaximum) + { + return; + } + + NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObject:[NSNumber numberWithInt:exception] forKey:ExceptionKey]; + + NSArray *callStack = [ExceptionHandler backtrace]; + [userInfo setObject:callStack forKey:ExceptionAddresses]; + + [[[ExceptionHandler alloc] init] performSelectorOnMainThread:@selector(checkForExceptions:) + withObject: [NSException exceptionWithName:[NSString stringWithFormat:@"%@",ExceptionTitle] + reason: [NSString stringWithFormat: NSLocalizedString(@"Signal %d was raised.", nil), signal] + userInfo: [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:exception] forKey:ExceptionKey]] + waitUntilDone:YES]; +} + +void createExceptionHandler(NSString *emailAddress,NSString *BCCemailAddress) +{ + NSSetUncaughtExceptionHandler(&checkForExceptions); + signal(SIGABRT, ExceptionCounter); + signal(SIGILL, ExceptionCounter); + signal(SIGSEGV, ExceptionCounter); + signal(SIGFPE, ExceptionCounter); + signal(SIGBUS, ExceptionCounter); + signal(SIGPIPE, ExceptionCounter); + + ExceptionEmail = emailAddress; + ExceptionBCCEmail = BCCemailAddress; +} \ No newline at end of file diff --git a/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger-iPad.xib b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger-iPad.xib new file mode 100644 index 0000000..6ba67e2 --- /dev/null +++ b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger-iPad.xib @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.h b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.h new file mode 100644 index 0000000..bc19908 --- /dev/null +++ b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.h @@ -0,0 +1,24 @@ +// +// ExceptionLogger.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import + +@interface ExceptionLogger : UIViewController +{ + IBOutlet UINavigationItem *navigationBar; + NSString *path; + IBOutlet UITextView *textView; +} + +@property (nonatomic, strong) IBOutlet UINavigationItem *navigationBar; +@property (nonatomic, strong) IBOutlet UITextView *textView; + ++(ExceptionLogger*)instance; +-(IBAction)updateLog:(id)sender; +-(IBAction)Clear:(id)sender; +-(void)log:(NSString*)exception; + +@end diff --git a/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.m b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.m new file mode 100644 index 0000000..baa5bbe --- /dev/null +++ b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.m @@ -0,0 +1,226 @@ +// +// ExceptionLogger.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +// The ExceptionLogger needs to be imported in a view by using the #import "ExceptionLogger.h"; statement in de .m file +// The following functions need to be created in the view.m file + +// - (void)swipedScreen:(UISwipeGestureRecognizer*)swipeGesture +// { +// // Show ExceptionLogger (Check for iPhone or iPad) +// ExceptionLogger* exceptionLogger = nil; +// if (iPad) +// { +// exceptionLogger = [[ExceptionLogger alloc] initWithNibName:@"ExceptionLogger-iPad" bundle:nil]; +// } +// else +// { +// exceptionLogger = [[ExceptionLogger alloc] initWithNibName:@"ExceptionLogger" bundle:nil]; +// } +// [self.navigationController pushViewController:exceptionLogger animated:YES completion:nil]; +// [exceptionLogger release]; +// } + +// Add these line to your ViewDidLoad method: +// +// // Add the ExceptionLogger Swipe Gesture +// UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipedScreen:)]; +// swipeRight.direction = UISwipeGestureRecognizerDirectionRight; +// [self.view addGestureRecognizer:swipeRight]; + +// In your delegate file you need to write the following lines: +// +// +// + +// Be sure that the following line is present in your core or delegate file +// #define Delegate ((yourAppDelegateFileName*)[UIApplication sharedApplication].delegate) + +#import "ExceptionLogger.h" + +@implementation ExceptionLogger +static ExceptionLogger* _instance = nil; + +@synthesize textView; +@synthesize navigationBar; + ++(ExceptionLogger*)instance +{ + @synchronized([ExceptionLogger class]) + { + if (!_instance) + { + [self alloc]; + } + return _instance; + } + return nil; +} + ++(id)alloc +{ + @synchronized([ExceptionLogger class]) + { + _instance = [super alloc]; + return _instance; + } + return nil; +} + +- (void)viewDidLoad +{ + @try + { + [super viewDidLoad]; + self.navigationBar.title = NSLocalizedStringFromTable(@"Exceptions", @"ExceptionsLogger", @"Exceptions"); + navigationBar.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Back", @"ExceptionsLogger", @"Back") + style: UIBarButtonItemStyleBordered + target: self + action: @selector(Back:)]; + + navigationBar.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Clear", @"ExceptionsLogger", @"Clear") +style: UIBarButtonItemStyleBordered + target: self + action: @selector(Clear:)]; + textView.editable = false; + textView.text = @""; + [self updateLog:self]; + textView.hidden = false; + + [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(updateLog:) userInfo:nil repeats:YES]; + } + @catch(NSException* exception) + { + NSLog(@"Exception: ExceptionLogger > viewDidLoad\n%@",exception); + } +} + +- (IBAction)Back:(id)sender +{ + [self dismissViewControllerAnimated:YES completion:nil]; +} + +-(void)log:(NSString*)exception +{ + @try + { + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"dd-MM-YYYY HH:mm:ss"]; + NSString *stringFromDate = [dateFormatter stringFromDate:[NSDate date]]; + NSString* stringData = [[NSString alloc] initWithFormat:@"\n%@\n\n %@", stringFromDate, exception]; + NSData *dataToWrite = [stringData dataUsingEncoding:NSUTF8StringEncoding]; + + NSString *docsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + path = [docsDirectory stringByAppendingPathComponent:@"Exceptions.log"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if (![fileManager fileExistsAtPath:path]) + { + [fileManager createFileAtPath:path contents:nil attributes:nil]; + } + + NSDictionary* attributes = [fileManager attributesOfItemAtPath:path error:nil]; + NSNumber* fileSize = [attributes objectForKey:NSFileSize]; + // Check if the logfile exceeds 10 MB + + if ([fileSize intValue] > 10 * 1024) + { + [fileManager removeItemAtPath:path error:nil]; + [fileManager createFileAtPath:path contents:nil attributes:nil]; + } + + NSMutableData *concatenatedData = [[NSMutableData alloc] init]; + [concatenatedData appendData: dataToWrite]; + NSData *fileData = [[NSData alloc] initWithContentsOfFile:(NSString *)path]; + [concatenatedData appendData: fileData]; + NSFileHandle *fileHandle = [NSFileHandle fileHandleForWritingAtPath:path]; + [fileHandle seekToFileOffset:0]; + [fileHandle writeData:concatenatedData]; + } + @catch(NSException* exception) + { + NSLog(@"Exception: ExceptionLogger > log\n%@",exception); + } +} + +- (BOOL)canBecomeFirstResponder +{ + return NO; +} + +-(IBAction)updateLog:(id)sender +{ + @try + { + NSString *docsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + path = [docsDirectory stringByAppendingPathComponent:@"Exceptions.log"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + if ([fileManager fileExistsAtPath:path]) + { + textView.text = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];[NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; + } + } + @catch(NSException* exception) + { + NSLog(@"Exception: ExceptionLogger > updateLog\n%@",exception); + } +} + +-(IBAction)Clear:(id)sender +{ + @try + { + NSString *docsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; + + path = [docsDirectory stringByAppendingPathComponent:@"Exceptions.log"]; + + NSFileManager *fileManager = [NSFileManager defaultManager]; + if ([fileManager fileExistsAtPath:path]) + { + [fileManager removeItemAtPath:path error:nil]; + [fileManager createFileAtPath:path contents:nil attributes:nil ]; + } + + [self updateLog:self]; + } + @catch(NSException* exception) + { + NSLog(@"Exception: ExceptionLogger > Clear\n%@",exception); + } +} + +- (void)viewWillAppear:(BOOL)animated +{ + @try + { + [super viewWillAppear:animated]; + } + @catch(NSException* exception) + { + NSLog(@"Exception: ExceptionLogger > viewWillAppear\n%@",exception); + } +} + + +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; +} + +// Rotate application view +-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + return YES; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; +} + + +@end \ No newline at end of file diff --git a/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.png b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.png new file mode 100644 index 0000000..2132527 Binary files /dev/null and b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.png differ diff --git a/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.xib b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.xib new file mode 100644 index 0000000..6ba06e7 --- /dev/null +++ b/EonaCatTools/Tools/ExceptionsLogger/ExceptionLogger.xib @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EonaCatTools/Tools/Lockscreen/.DS_Store b/EonaCatTools/Tools/Lockscreen/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/EonaCatTools/Tools/Lockscreen/.DS_Store differ diff --git a/EonaCatTools/Tools/Lockscreen/Dutch.lproj/LockController.strings b/EonaCatTools/Tools/Lockscreen/Dutch.lproj/LockController.strings new file mode 100644 index 0000000..5845668 --- /dev/null +++ b/EonaCatTools/Tools/Lockscreen/Dutch.lproj/LockController.strings @@ -0,0 +1,6 @@ +// Dutch language file + +"Please wait" = "Een ogenblik geduld"; +"Decimal title" = "Alleen nummers"; +"Decimal message" = "Alleen nummers zijn toegestaan"; +"OK" = "OK"; \ No newline at end of file diff --git a/EonaCatTools/Tools/Lockscreen/English.lproj/LockController.strings b/EonaCatTools/Tools/Lockscreen/English.lproj/LockController.strings new file mode 100644 index 0000000..9e81dc9 --- /dev/null +++ b/EonaCatTools/Tools/Lockscreen/English.lproj/LockController.strings @@ -0,0 +1,6 @@ +// English language file + +"Please wait" = "Please wait"; +"Decimal title" = "Decimals only"; +"Decimal message" = "You can only insert decimals"; +"OK" = "OK"; \ No newline at end of file diff --git a/EonaCatTools/Tools/Lockscreen/LockController.h b/EonaCatTools/Tools/Lockscreen/LockController.h new file mode 100644 index 0000000..7d6cf7f --- /dev/null +++ b/EonaCatTools/Tools/Lockscreen/LockController.h @@ -0,0 +1,73 @@ +#import + +// +// LockController.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +typedef enum +{ + AUTHENTICATE, + SET +} STYLE; + +@protocol LockControllerDelegate + +@required +//- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +- (void)lockControllerDidFinish:(NSString*)passcode tag:(NSInteger)tag; +- (void)lockControllerIncorrectPassword:(NSString*)incorrectPassword tag:(NSInteger)tag; +- (void)lockControllerDidCancel:(NSInteger)tag; + +@end + + +@interface LockController : UIViewController +{ + //Public + STYLE style; + NSString *passcode; + NSString *givenPasscode; + NSString *title; + UILabel *promptLabel; + UILabel *subPromptLabel; + UILabel *hintLabel; + UIAlertView *alert; + int _deviceWidth; + + id __weak delegate; + BOOL hideCode; + + //Private + BOOL _iPad; + BOOL retry; + NSMutableString *tempString; + + UITextField *hiddenField; + UINavigationItem *navigationItem; + NSMutableArray *textFieldArray; +} + +@property (nonatomic, weak) id delegate; +@property (nonatomic, copy) NSString *title; +@property (nonatomic) STYLE style; +@property (nonatomic, strong) UIColor *color; +@property (nonatomic, strong) UIColor *color2; +@property (nonatomic, strong) NSString *passcode; +@property (nonatomic, strong) NSString *prompt; +@property (nonatomic, strong) NSString *subPrompt; +@property (nonatomic, strong) NSString *hint; +@property (nonatomic, strong) NSString *correct; +@property (nonatomic) NSInteger tag; +@property (nonatomic) BOOL cancel; +@property (nonatomic) NSInteger fieldsAmount; +@property (nonatomic) BOOL hideCode; +@property (nonatomic) BOOL waitingAlert; + +- (id)initWithTitle:(NSString*)newTitle prompt:(NSString*)newPrompt errorMessage:(NSString*)newSubPrompt correctMessage:(NSString*)newCorrectMessage passCode:(NSString*)newPasscode hint:(NSString*)newHint color:(UIColor*)newColor color2:(UIColor*)newColor2 fieldAmount:(NSInteger)newFieldAmount style:(STYLE)newStyle delegate:(id)newDelegate tag:(NSInteger)newTag cancelButton:(BOOL)cancelButton; + +- (void)incorrect; +- (void)finished; + +@end diff --git a/EonaCatTools/Tools/Lockscreen/LockController.m b/EonaCatTools/Tools/Lockscreen/LockController.m new file mode 100644 index 0000000..b66f7cb --- /dev/null +++ b/EonaCatTools/Tools/Lockscreen/LockController.m @@ -0,0 +1,444 @@ +#import "LockController.h" +#import + +// +// LockController.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +//private methods +@interface LockController() + +- (void)setupSubviews; +- (void)setupNavigationBar; +- (void)setupTextFields; +- (void)resetFields; +- (void)passcodeDidNotMatch:(NSString*)incorrectPassword; +- (void)dissmissView; + +@property (nonatomic, strong) NSMutableString *tempString; +@property (nonatomic, strong) UITextField *hiddenField; +@property (nonatomic, strong) UINavigationItem *navigationItem; + +@end + +@implementation LockController + +@synthesize delegate; +@synthesize style; +@synthesize passcode; +@synthesize prompt; +@synthesize subPrompt; +@synthesize hint; +@synthesize hiddenField; +@synthesize navigationItem; +@synthesize tempString; +@synthesize title; +@synthesize hideCode; +@synthesize waitingAlert; + +- (id)initWithTitle:(NSString*)newTitle prompt:(NSString*)newPrompt errorMessage:(NSString*)newSubPrompt correctMessage:(NSString*)newCorrectMessage passCode:(NSString*)newPasscode hint:(NSString*)newHint color:(UIColor*)newColor color2:(UIColor*)newColor2 fieldAmount:(NSInteger)newFieldAmount style:(STYLE)newStyle delegate:(id)newDelegate tag:(NSInteger)newTag cancelButton:(BOOL)cancelButton +{ + if (self = [super init]) + { + _iPad = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad; + + if (_iPad) + { + _deviceWidth = 768; + } + else + { + _deviceWidth = 320; + } + + newTitle == nil ? [NSString stringWithFormat:@"Security"] : newTitle; + newPrompt == nil ? [NSString stringWithFormat:@"Insert pincode"] : newPrompt; + newSubPrompt == nil ? [NSString stringWithFormat:@"Invalid code"] : newSubPrompt; + newHint == nil ? [NSString stringWithFormat:@"As a security you need to supply a pincode"] : newHint; + newColor == nil ? [UIColor whiteColor] : newColor; + newColor2 == nil ? [UIColor whiteColor] : newColor2; + //newFieldAmount == 0 ? 4 : newFieldAmount; + newCorrectMessage == nil ? [NSString stringWithFormat:@"Code is valid"] : newCorrectMessage; + newPasscode == nil ? [NSString stringWithFormat:@"0000"] : newCorrectMessage; + + self.cancel = cancelButton; + self.tag = newTag; + self.title = newTitle; + self.prompt = newPrompt; + self.subPrompt = newSubPrompt; + self.hint = newHint; + self.color = newColor; + self.color2 = newColor2; + self.correct = newCorrectMessage; + self.passcode = newPasscode; + self.style = newStyle; + self.fieldsAmount = newFieldAmount; + self.delegate = newDelegate; + + self.tempString = [NSMutableString string]; + self.hideCode = true; + self.waitingAlert = false; + } + + return self; +} + + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + //needs a delegate + assert (delegate != nil); + + //check if passcode is set for AUTHENTICATION + if (style == AUTHENTICATE) + { + assert (passcode != nil); + } + + [self setupSubviews]; + +} + +-(void)handleSingleTap:(UITapGestureRecognizer *)sender +{ + [alert dismissWithClickedButtonIndex:0 animated:YES]; +} + +- (void)setupSubviews +{ + self.view.backgroundColor = [UIColor groupTableViewBackgroundColor]; + + if (self.waitingAlert) + { + //Alert + alert = [[UIAlertView alloc] initWithTitle:NSLocalizedStringFromTable(@"Status", @"LockController", @"Status") + message:NSLocalizedStringFromTable(@"Please wait", @"LockController", @"Please wait") + delegate:self + cancelButtonTitle:nil + otherButtonTitles:nil, nil]; + + UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)]; + [alert addGestureRecognizer:singleTap]; + } + + //main prompt + promptLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 70, _deviceWidth, 25)]; + promptLabel.textAlignment = NSTextAlignmentCenter; + promptLabel.backgroundColor = [UIColor clearColor]; + promptLabel.shadowColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:.50]; + promptLabel.font = [UIFont systemFontOfSize:[UIFont labelFontSize]]; + promptLabel.shadowOffset = CGSizeMake(0, -0.75); + promptLabel.textColor = [UIColor blackColor]; + promptLabel.text = prompt; + [self.view addSubview:promptLabel]; + + //subPrompt + subPromptLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 90, _deviceWidth, 25)]; + subPromptLabel.textAlignment = NSTextAlignmentCenter; + subPromptLabel.backgroundColor = [UIColor clearColor]; + subPromptLabel.textColor = [UIColor redColor]; + subPromptLabel.font = [UIFont systemFontOfSize:14]; + subPromptLabel.text = subPrompt; + subPromptLabel.hidden = true; + [self.view addSubview:subPromptLabel]; + + // hint + hintLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 160, _deviceWidth, 100)]; + hintLabel.textAlignment = NSTextAlignmentCenter; + hintLabel.backgroundColor = [UIColor clearColor]; + hintLabel.shadowColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:.50]; + hintLabel.font = [UIFont systemFontOfSize:14]; + hintLabel.shadowOffset = CGSizeMake(0, -0.75); + hintLabel.numberOfLines = 2; + hintLabel.textColor = [UIColor blackColor]; + hintLabel.text = hint; + [self.view addSubview:hintLabel]; + + //bar + [self setupNavigationBar]; + + //text fields + [self setupTextFields]; +} + +- (void)setupNavigationBar +{ + UINavigationBar *navBar; + + navBar = [[UINavigationBar alloc]initWithFrame:CGRectMake(0,0,_deviceWidth,50)]; + navBar.barStyle = UIBarStyleBlack; + [self.view addSubview:navBar]; + navigationItem = [[UINavigationItem alloc]init]; + + if (self.cancel) + { + [navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel + target:self + action:@selector(userDidCancel:)] + animated:NO]; + } + + [navBar pushNavigationItem:navigationItem animated:NO]; + + navigationItem.title = title; + + if (self.color) + { + CAGradientLayer *gradient = [CAGradientLayer layer]; + gradient.frame = self.view.bounds; + gradient.colors = @[(id)[self.color CGColor], (id)[self.color2 CGColor],(id)[self.color CGColor], (id)[self.color CGColor]]; + [self.view.layer insertSublayer:gradient atIndex:0]; + + if ([[[UIDevice currentDevice] systemVersion] floatValue] < 7.0) + { + [navBar setTintColor:self.color]; + } + else + { + [navBar setBarTintColor:self.color]; + } + } +} + +- (void)setupTextFields +{ + int toppadding; + int leftpadding; + int width; + int height; + int padding; + CGFloat fontsize; + + + if (_iPad) + { + if (_fieldsAmount == 4) + { + leftpadding = 150; + } + else + { + leftpadding = 130; + } + + width = 100; + height = 100; + toppadding = 250; + padding = 60; + fontsize = 64; + } + else + { + if (_fieldsAmount == 4) + { + leftpadding = 40; + } + else + { + leftpadding = 20; + } + width = 50; + height = 50; + toppadding = 125; + padding = 30; + fontsize = 32; + } + + // Initialise the textField array + textFieldArray = [NSMutableArray array]; + + for (int i = 0; i < self.fieldsAmount; i++) + { + UITextField *textField; + + textField = [[UITextField alloc]initWithFrame:CGRectMake(leftpadding + width*i + padding,toppadding,width,height)]; + + textField.backgroundColor = [UIColor whiteColor]; + textField.borderStyle = UITextBorderStyleBezel; + textField.secureTextEntry = self.hideCode; + textField.font = [UIFont systemFontOfSize:fontsize]; + textField.textAlignment = NSTextAlignmentCenter; + textField.tag = i; + textField.enabled = false; + + [self.view addSubview:textField]; + [textFieldArray addObject:textField]; + } + + hiddenField = [[UITextField alloc]initWithFrame:CGRectMake(0,0,500,500)]; + hiddenField.text = @""; + hiddenField.keyboardType = UIKeyboardTypeNumberPad; + hiddenField.keyboardAppearance = UIKeyboardAppearanceAlert; + hiddenField.delegate = self; + hiddenField.hidden = true; + [hiddenField becomeFirstResponder]; + [self.view setBackgroundColor:[UIColor whiteColor]]; + [self.view addSubview:hiddenField]; +} + +-(BOOL)checkDecimal:(NSString *)string +{ + NSNumberFormatter *numberFormat = [[NSNumberFormatter alloc] init]; + BOOL isDecimal = [numberFormat numberFromString:string] != nil; + + if (!isDecimal) + { + UIAlertView * decimalAlert = [[UIAlertView alloc] initWithTitle:NSLocalizedStringFromTable(@"Decimal title", @"LockController", @"Decimal title") + message:NSLocalizedStringFromTable(@"Decimal message", @"LockController", @"Decimal message") + delegate:self + cancelButtonTitle:@"OK" + otherButtonTitles:nil, nil]; + [decimalAlert show]; + } + return isDecimal; +} + +- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string +{ + @try + { + if ([string isEqualToString:@""] || [self checkDecimal:string]) + { + UITextField *currentTextField; + + // Check if the backSpace was pressed + if ([string isEqualToString:@""]) + { + [self.tempString setString:[self.tempString substringToIndex:[self.tempString length]-1]]; + currentTextField = textFieldArray[[self.tempString length]]; + } + else + { + [self.tempString appendString:string]; + currentTextField = textFieldArray[[self.tempString length] -1]; + } + + currentTextField.text = string; + + // we have reached the maximum characters + if ([self.tempString length] == [textFieldArray count]) + { + if (self.style == SET) + { + if (passcode == nil) + { + //empty tempstring to passcode string + passcode = [self.tempString copy]; + + self.tempString = [NSMutableString string]; + + //reset fields + [self resetFields]; + textField.text = @""; + } + else + { + //check if confirm matches first + givenPasscode = [self.tempString copy]; + if ([passcode isEqualToString:self.tempString]) + { + subPromptLabel.textColor = [UIColor greenColor]; + subPromptLabel.text = self.correct; + [delegate lockControllerDidFinish:givenPasscode tag:self.tag]; + [self dissmissView]; + } + else + { + [self passcodeDidNotMatch:givenPasscode]; + } + } + } + else if(self.style == AUTHENTICATE) + { + givenPasscode = [self.tempString copy]; + if ([passcode isEqualToString:self.tempString]) + { + subPromptLabel.textColor = [UIColor greenColor]; + subPromptLabel.text = self.correct; + [delegate lockControllerDidFinish:givenPasscode tag:self.tag]; + [self dissmissView]; + } + else + { + [self passcodeDidNotMatch:givenPasscode]; + } + return false; + } + } + return true; + } + return false; + } + @catch (NSException *exception) + { + // Do nothing + } +} + +- (void)passcodeDidNotMatch:(NSString*)incorrectPassword +{ + if (self.waitingAlert) + { + [alert show]; + } + + self.tempString = [NSMutableString string]; + + subPromptLabel.textColor = [UIColor redColor]; + subPromptLabel.text = self.subPrompt; + subPromptLabel.hidden = false; + + [self resetFields]; + [delegate lockControllerIncorrectPassword:incorrectPassword tag:self.tag]; +} + +- (void)resetFields +{ + for (UITextField *textField in textFieldArray) + { + textField.text = @""; + } + hiddenField.text = @""; +} + +- (void)incorrect +{ + if (self.waitingAlert) + { + [alert dismissWithClickedButtonIndex:0 animated:true]; + } +} + + +- (void)finished +{ + if (self.waitingAlert) + { + [alert dismissWithClickedButtonIndex:0 animated:true]; + } + + subPromptLabel.textColor = [UIColor greenColor]; + subPromptLabel.text = self.correct; +} + +- (void)dissmissView +{ + [self dismissViewControllerAnimated:TRUE completion:nil]; +} + +- (void)userDidCancel:(id)sender +{ + [delegate lockControllerDidCancel:self.tag]; + [self dissmissView]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; +} + +@end diff --git a/EonaCatTools/Tools/Popup/.DS_Store b/EonaCatTools/Tools/Popup/.DS_Store new file mode 100644 index 0000000..4ff8c89 Binary files /dev/null and b/EonaCatTools/Tools/Popup/.DS_Store differ diff --git a/EonaCatTools/Tools/Popup/Popup.h b/EonaCatTools/Tools/Popup/Popup.h new file mode 100644 index 0000000..86518df --- /dev/null +++ b/EonaCatTools/Tools/Popup/Popup.h @@ -0,0 +1,25 @@ +// +// Popup.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import + +@interface Popup : NSObject +{ + NSTimer *_notificationTimer; + UILabel *_target; + UIColor *_targetOldBackgroundColor; + UIColor *_targetOldTextColor; + NSString *_targetText; + UIAlertView *_alert; +} + +-(void)showAlert:(NSString*)title message:(NSString*)message delegate:(id)delegate cancelButtonText:(NSString*)cancelButtonText otherButtonText:(NSString*)otherButtonText tag:(NSInteger)tag; +-(void)showDebugNotification:(NSString*)message textColor:(UIColor*)textColor backgroundColor:(UIColor*)backgroundColor target:(UILabel*)target; +-(void)dismiss; + ++ (id)getInstance; + +@end diff --git a/EonaCatTools/Tools/Popup/Popup.m b/EonaCatTools/Tools/Popup/Popup.m new file mode 100644 index 0000000..1c00b1b --- /dev/null +++ b/EonaCatTools/Tools/Popup/Popup.m @@ -0,0 +1,83 @@ +// +// Popup.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import "Popup.h" + +@implementation Popup + +static Popup *_instance; + ++ (id)getInstance +{ + @synchronized(self) + { + if (_instance == nil) + { + _instance = [[self alloc] init]; + } + } + return _instance; +} + +-(void)showAlert:(NSString *)title message:(NSString *)message delegate:(id)delegate cancelButtonText:(NSString *)cancelButtonText otherButtonText:(NSString *)otherButtonText tag:(NSInteger)tag +{ + _alert = [[UIAlertView alloc] initWithTitle:title + message:message + delegate:delegate + cancelButtonTitle:[cancelButtonText length] == 0 ? nil : cancelButtonText + otherButtonTitles:[otherButtonText length] == 0 ? nil : otherButtonText,nil]; + _alert.tag = tag; + [_alert show]; + + + UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)]; + [_alert addGestureRecognizer:singleTap]; +} + +-(void)handleSingleTap:(UITapGestureRecognizer *)sender +{ + [_alert dismissWithClickedButtonIndex:0 animated:YES]; +} + +-(void)dismiss +{ + [_alert dismissWithClickedButtonIndex:0 animated:true]; +} + +-(void)showDebugNotification:(NSString *)message textColor:(UIColor *)textColor backgroundColor:(UIColor *)backgroundColor target:(UILabel *)target +{ + _target = target; + _targetOldBackgroundColor = target.backgroundColor; + _targetOldTextColor = target.textColor; + _targetText = target.text; + + + target.textColor = textColor; + target.backgroundColor = backgroundColor; + target.text = message; + _notificationTimer = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(debugNotificationTimeElapsed:) userInfo:nil repeats:NO]; +} + +- (void)debugNotificationTimeElapsed:(NSTimer*)timer +{ + @try + { + UILabel *target = _target; + target.backgroundColor = _targetOldBackgroundColor; + target.textColor = _targetOldTextColor; + target.text = _targetText; + + + [_notificationTimer invalidate]; + } + @catch (NSException *exception) + { + NSLog(@"DebugNotificationError: %@",exception.description); + } +} + + +@end diff --git a/EonaCatTools/Tools/Toast/Toast.h b/EonaCatTools/Tools/Toast/Toast.h new file mode 100644 index 0000000..d520186 --- /dev/null +++ b/EonaCatTools/Tools/Toast/Toast.h @@ -0,0 +1,27 @@ +// +// Toast.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import + +@interface UIView (Toast) + +// each makeToast method creates a view and displays it as toast +- (void)makeToast:(NSString *)message; +- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position; +- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position title:(NSString *)title; +- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position title:(NSString *)title image:(UIImage *)image; +- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position image:(UIImage *)image; + +// displays toast with an activity spinner +- (void)makeToastActivity; +- (void)makeToastActivity:(id)position; +- (void)hideToastActivity; + +// the showToast methods display any view as toast +- (void)showToast:(UIView *)toast; +- (void)showToast:(UIView *)toast duration:(CGFloat)interval position:(id)point; + +@end diff --git a/EonaCatTools/Tools/Toast/Toast.m b/EonaCatTools/Tools/Toast/Toast.m new file mode 100644 index 0000000..2776893 --- /dev/null +++ b/EonaCatTools/Tools/Toast/Toast.m @@ -0,0 +1,375 @@ +// +// Toast.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import "Toast.h" +#import +#import +#import + +#define kMaxWidth 0.8 +#define kMaxHeight 0.8 + +#define kHorizontalPadding 10.0 +#define kVerticalPadding 10.0 +#define kCornerRadius 10.0 +#define kOpacity 0.8 +#define kFontSize 16.0 +#define kMaxTitleLines 999 +#define kMaxMessageLines 999 +#define kFadeDuration 0.2 +#define kDisplayShadow YES + +#define kDefaultLength 3.0 +#define kDefaultPosition @"bottom" + +#define kImageWidth 80.0 +#define kImageHeight 80.0 + +#define kActivityWidth 100.0 +#define kActivityHeight 100.0 +#define kActivityDefaultPosition @"center" +#define kActivityTag 91325 + +static NSString *kDurationKey = @"CSToastDurationKey"; + + +@interface UIView (ToastPrivate) + +- (CGPoint)getPositionFor:(id)position toast:(UIView *)toast; +- (UIView *)makeViewForMessage:(NSString *)message title:(NSString *)title image:(UIImage *)image; + +@end + + +@implementation UIView (Toast) + +#pragma mark - Toast Methods + +- (void)makeToast:(NSString *)message { + [self makeToast:message duration:kDefaultLength position:kDefaultPosition]; +} + +- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position { + UIView *toast = [self makeViewForMessage:message title:nil image:nil]; + [self showToast:toast duration:interval position:position]; +} + +- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position title:(NSString *)title { + UIView *toast = [self makeViewForMessage:message title:title image:nil]; + [self showToast:toast duration:interval position:position]; +} + +- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position image:(UIImage *)image { + UIView *toast = [self makeViewForMessage:message title:nil image:image]; + [self showToast:toast duration:interval position:position]; +} + +- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position title:(NSString *)title image:(UIImage *)image { + UIView *toast = [self makeViewForMessage:message title:title image:image]; + [self showToast:toast duration:interval position:position]; +} + +- (void)showToast:(UIView *)toast { + [self showToast:toast duration:kDefaultLength position:kDefaultPosition]; +} + +- (void)showToast:(UIView *)toast duration:(CGFloat)interval position:(id)point { + // Display a view for a given duration & position. + + CGPoint toastPoint = [self getPositionFor:point toast:toast]; + + // use an associative reference to associate the toast view with the display interval + objc_setAssociatedObject (toast, &kDurationKey, [NSNumber numberWithFloat:interval], OBJC_ASSOCIATION_RETAIN); + + [toast setCenter:toastPoint]; + [toast setAlpha:0.0]; + [self addSubview:toast]; + +#if !__has_feature(objc_arc) + [UIView beginAnimations:@"fade_in" context:toast]; +#else + [UIView beginAnimations:@"fade_in" context:(__bridge void*)toast]; +#endif + [UIView setAnimationDuration:kFadeDuration]; + + SystemSoundID mySound = [self createSoundID: @"toast.wav"]; + AudioServicesPlaySystemSound(mySound); + + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; + [toast setAlpha:1.0]; + [UIView commitAnimations]; + +} + +-(SystemSoundID) createSoundID: (NSString*)name +{ + NSString *path = [NSString stringWithFormat: @"%@/%@", + [[NSBundle mainBundle] resourcePath], name]; + + NSURL* filePath = [NSURL fileURLWithPath: path isDirectory: NO]; + SystemSoundID soundID; + AudioServicesCreateSystemSoundID((__bridge CFURLRef)filePath, &soundID); + NSLog(@"%@, %@", path, filePath); + return soundID; +} + +#pragma mark - Toast Activity Methods + +- (void)makeToastActivity { + [self makeToastActivity:kActivityDefaultPosition]; +} + +- (void)makeToastActivity:(id)position { + // prevent more than one activity view + UIView *existingToast = [self viewWithTag:kActivityTag]; + if (existingToast != nil) { + [existingToast removeFromSuperview]; + } + + UIView *activityContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kActivityWidth, kActivityHeight)]; +#if !__has_feature(objc_arc) + [activityContainer autorelease]; +#endif + [activityContainer setCenter:[self getPositionFor:position toast:activityContainer]]; + [activityContainer setBackgroundColor:[[UIColor blackColor] colorWithAlphaComponent:kOpacity]]; + [activityContainer setAlpha:0.0]; + [activityContainer setTag:kActivityTag]; + [activityContainer setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin)]; + [activityContainer.layer setCornerRadius:kCornerRadius]; + if (kDisplayShadow) { + [activityContainer.layer setShadowColor:[UIColor blackColor].CGColor]; + [activityContainer.layer setShadowOpacity:0.8]; + [activityContainer.layer setShadowRadius:6.0]; + [activityContainer.layer setShadowOffset:CGSizeMake(4.0, 4.0)]; + } + + UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; +#if !__has_feature(objc_arc) + [activityView autorelease]; +#endif + [activityView setCenter:CGPointMake(activityContainer.bounds.size.width / 2, activityContainer.bounds.size.height / 2)]; + [activityContainer addSubview:activityView]; + [activityView startAnimating]; + + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kFadeDuration]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; + [activityContainer setAlpha:1.0]; + [UIView commitAnimations]; + + [self addSubview:activityContainer]; +} + +- (void)hideToastActivity { + UIView *existingToast = [self viewWithTag:kActivityTag]; + if (existingToast != nil) { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:kFadeDuration]; + [UIView setAnimationDelegate:existingToast]; + [UIView setAnimationDidStopSelector:@selector(removeFromSuperview)]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; + [existingToast setAlpha:0.0]; + [UIView commitAnimations]; + } +} + +#pragma mark - Animation Delegate Method + +- (void)animationDidStop:(NSString*)animationID finished:(BOOL)finished context:(void *)context { +#if !__has_feature(objc_arc) + UIView *toast = (UIView *)context; +#else + UIView *toast = (UIView *)(__bridge id)context; +#endif + + // retrieve the display interval associated with the view + CGFloat interval = [(NSNumber *)objc_getAssociatedObject(toast, &kDurationKey) floatValue]; + + if([animationID isEqualToString:@"fade_in"]) { + +#if !__has_feature(objc_arc) + [UIView beginAnimations:@"fade_out" context:toast]; +#else + [UIView beginAnimations:@"fade_out" context:(__bridge void*)toast]; +#endif + [UIView setAnimationDelay:interval]; + [UIView setAnimationDuration:kFadeDuration]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; + [toast setAlpha:0.0]; + [UIView commitAnimations]; + + } else if ([animationID isEqualToString:@"fade_out"]) { + + [toast removeFromSuperview]; + + } + +} + +#pragma mark - Private Methods + +- (CGPoint)getPositionFor:(id)point toast:(UIView *)toast { + // Convert string literals @"top", @"bottom", @"center", or any point wrapped in an + // NSValue object into a CGPoint + + if([point isKindOfClass:[NSString class]]) { + + if( [point caseInsensitiveCompare:@"top"] == NSOrderedSame ) { + return CGPointMake(self.bounds.size.width/2, (toast.frame.size.height / 2) + kVerticalPadding); + } else if( [point caseInsensitiveCompare:@"bottom"] == NSOrderedSame ) { + return CGPointMake(self.bounds.size.width/2, (self.bounds.size.height - (toast.frame.size.height / 2)) - kVerticalPadding); + } else if( [point caseInsensitiveCompare:@"center"] == NSOrderedSame ) { + return CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2); + } + + } else if ([point isKindOfClass:[NSValue class]]) { + return [point CGPointValue]; + } + + NSLog(@"Error: Invalid position for toast."); + return [self getPositionFor:kDefaultPosition toast:toast]; +} + +- (UIView *)makeViewForMessage:(NSString *)message title:(NSString *)title image:(UIImage *)image { + // sanity + if((message == nil) && (title == nil) && (image == nil)) return nil; + + // Dynamically build a toast view with any combination of message, title, & image. + UILabel *messageLabel = nil; + UILabel *titleLabel = nil; + UIImageView *imageView = nil; + + // create the parent view + UIView *wrapperView = [[UIView alloc] init]; +#if !__has_feature(objc_arc) + [wrapperView autorelease]; +#endif + [wrapperView setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin)]; + [wrapperView.layer setCornerRadius:kCornerRadius]; + if (kDisplayShadow) { + [wrapperView.layer setShadowColor:[UIColor blackColor].CGColor]; + [wrapperView.layer setShadowOpacity:0.8]; + [wrapperView.layer setShadowRadius:6.0]; + [wrapperView.layer setShadowOffset:CGSizeMake(4.0, 4.0)]; + } + + [wrapperView setBackgroundColor:[[UIColor blackColor] colorWithAlphaComponent:kOpacity]]; + + if(image != nil) { + imageView = [[UIImageView alloc] initWithImage:image]; +#if !__has_feature(objc_arc) + [imageView autorelease]; +#endif + [imageView setContentMode:UIViewContentModeScaleAspectFit]; + [imageView setFrame:CGRectMake(kHorizontalPadding, kVerticalPadding, kImageWidth, kImageHeight)]; + } + + CGFloat imageWidth, imageHeight, imageLeft; + + // the imageView frame values will be used to size & position the other views + if(imageView != nil) { + imageWidth = imageView.bounds.size.width; + imageHeight = imageView.bounds.size.height; + imageLeft = kHorizontalPadding; + } else { + imageWidth = imageHeight = imageLeft = 0.0; + } + + if (title != nil) { + titleLabel = [[UILabel alloc] init]; +#if !__has_feature(objc_arc) + [titleLabel autorelease]; +#endif + [titleLabel setNumberOfLines:kMaxTitleLines]; + [titleLabel setFont:[UIFont boldSystemFontOfSize:kFontSize]]; + [titleLabel setTextAlignment:NSTextAlignmentLeft]; + [titleLabel setLineBreakMode:NSLineBreakByWordWrapping]; + [titleLabel setTextColor:[UIColor whiteColor]]; + [titleLabel setBackgroundColor:[UIColor clearColor]]; + [titleLabel setAlpha:1.0]; + [titleLabel setText:title]; + + // size the title label according to the length of the text + CGSize maxSizeTitle = CGSizeMake((self.bounds.size.width * kMaxWidth) - imageWidth, self.bounds.size.height * kMaxHeight); + CGSize expectedSizeTitle = [title sizeWithFont:titleLabel.font constrainedToSize:maxSizeTitle lineBreakMode:titleLabel.lineBreakMode]; + [titleLabel setFrame:CGRectMake(0.0, 0.0, expectedSizeTitle.width, expectedSizeTitle.height)]; + } + + if (message != nil) { + messageLabel = [[UILabel alloc] init]; +#if !__has_feature(objc_arc) + [messageLabel autorelease]; +#endif + [messageLabel setNumberOfLines:kMaxMessageLines]; + [messageLabel setFont:[UIFont systemFontOfSize:kFontSize]]; + [messageLabel setLineBreakMode:NSLineBreakByWordWrapping]; + [messageLabel setTextColor:[UIColor whiteColor]]; + [messageLabel setBackgroundColor:[UIColor clearColor]]; + [messageLabel setAlpha:1.0]; + [messageLabel setText:message]; + + // size the message label according to the length of the text + CGSize maxSizeMessage = CGSizeMake((self.bounds.size.width * kMaxWidth) - imageWidth, self.bounds.size.height * kMaxHeight); + CGSize expectedSizeMessage = [message sizeWithFont:messageLabel.font constrainedToSize:maxSizeMessage lineBreakMode:messageLabel.lineBreakMode]; + [messageLabel setFrame:CGRectMake(0.0, 0.0, expectedSizeMessage.width, expectedSizeMessage.height)]; + } + + // titleLabel frame values + CGFloat titleWidth, titleHeight, titleTop, titleLeft; + + if(titleLabel != nil) { + titleWidth = titleLabel.bounds.size.width; + titleHeight = titleLabel.bounds.size.height; + titleTop = kVerticalPadding; + titleLeft = imageLeft + imageWidth + kHorizontalPadding; + } else { + titleWidth = titleHeight = titleTop = titleLeft = 0.0; + } + + // messageLabel frame values + CGFloat messageWidth, messageHeight, messageLeft, messageTop; + + if(messageLabel != nil) { + messageWidth = messageLabel.bounds.size.width; + messageHeight = messageLabel.bounds.size.height; + messageLeft = imageLeft + imageWidth + kHorizontalPadding; + messageTop = titleTop + titleHeight + kVerticalPadding; + } else { + messageWidth = messageHeight = messageLeft = messageTop = 0.0; + } + + + CGFloat longerWidth = MAX(titleWidth, messageWidth); + CGFloat longerLeft = MAX(titleLeft, messageLeft); + + // wrapper width uses the longerWidth or the image width, whatever is larger. same logic applies to the wrapper height + CGFloat wrapperWidth = MAX((imageWidth + (kHorizontalPadding * 2)), (longerLeft + longerWidth + kHorizontalPadding)); + CGFloat wrapperHeight = MAX((messageTop + messageHeight + kVerticalPadding), (imageHeight + (kVerticalPadding * 2))); + + [wrapperView setFrame:CGRectMake(0.0, 0.0, wrapperWidth, wrapperHeight)]; + + if(titleLabel != nil) { + [titleLabel setFrame:CGRectMake(titleLeft, titleTop, titleWidth, titleHeight)]; + [wrapperView addSubview:titleLabel]; + } + + if(messageLabel != nil) { + [messageLabel setFrame:CGRectMake(messageLeft, messageTop, messageWidth, messageHeight)]; + [wrapperView addSubview:messageLabel]; + } + + if(imageView != nil) { + [wrapperView addSubview:imageView]; + } + + return wrapperView; +} + +@end diff --git a/EonaCatTools/Tools/Toast/toast.wav b/EonaCatTools/Tools/Toast/toast.wav new file mode 100644 index 0000000..ae55a36 Binary files /dev/null and b/EonaCatTools/Tools/Toast/toast.wav differ diff --git a/EonaCatTools/Tools/uniqueIdentifier/DeviceIdentifier.h b/EonaCatTools/Tools/uniqueIdentifier/DeviceIdentifier.h new file mode 100644 index 0000000..ad61d66 --- /dev/null +++ b/EonaCatTools/Tools/uniqueIdentifier/DeviceIdentifier.h @@ -0,0 +1,21 @@ +// +// DeviceIdentifier.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import + + +@interface UIDevice (IdentifierAddition) + +// Generate a sha1 hash of your MAC address with your bundle app identifier +- (NSString*) appIdentifier; + +// Generate a sha1 hash of your MAC address +- (NSString*) deviceIdentifier; + +// Get the MAC address +- (NSString*) macAddress; + +@end diff --git a/EonaCatTools/Tools/uniqueIdentifier/DeviceIdentifier.m b/EonaCatTools/Tools/uniqueIdentifier/DeviceIdentifier.m new file mode 100644 index 0000000..d0abe5e --- /dev/null +++ b/EonaCatTools/Tools/uniqueIdentifier/DeviceIdentifier.m @@ -0,0 +1,101 @@ +// +// DeviceIdentifier.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import "DeviceIdentifier.h" +#import "SHA1.h" + +#include +#include +#include +#include + +@interface UIDevice(Private) + +- (NSString*) macaddress; + +@end + +@implementation UIDevice (IdentifierAddition) + +// Get the local macaddress +- (NSString*) macaddress +{ + int mib[6]; + size_t len; + char *buf; + unsigned char *ptr; + struct if_msghdr *ifm; + struct sockaddr_dl *sdl; + + mib[0] = CTL_NET; + mib[1] = AF_ROUTE; + mib[2] = 0; + mib[3] = AF_LINK; + mib[4] = NET_RT_IFLIST; + + if ((mib[5] = if_nametoindex("en0")) == 0) + { + printf("Error: if_nametoindex error\n"); + return NULL; + } + + if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0) + { + printf("Error: sysctl, take 1\n"); + return NULL; + } + + if ((buf = malloc(len)) == NULL) + { + printf("Could not allocate memory. error!\n"); + return NULL; + } + + if (sysctl(mib, 6, buf, &len, NULL, 0) < 0) + { + printf("Error: sysctl, take 2"); + free(buf); + return NULL; + } + + ifm = (struct if_msghdr *)buf; + sdl = (struct sockaddr_dl *)(ifm + 1); + ptr = (unsigned char *)LLADDR(sdl); + NSString *outstring = [NSString stringWithFormat:@"%02X:%02X:%02X:%02X:%02X:%02X", + *ptr, *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4), *(ptr+5)]; + free(buf); + + return outstring; +} + +// Get the appIdentifier +- (NSString*) appIdentifier +{ + NSString *macaddress = [[UIDevice currentDevice] macaddress]; + NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; + + NSString *stringToHash = [NSString stringWithFormat:@"%@%@",macaddress,bundleIdentifier]; + NSString *uniqueIdentifier = [stringToHash stringFromSHA1:stringToHash]; + + return uniqueIdentifier; +} + +// Get the deviceIdentifier +- (NSString*) deviceIdentifier +{ + NSString *macaddress = [[UIDevice currentDevice] macaddress]; + NSString *uniqueIdentifier = [macaddress stringFromSHA1:macaddress]; + + return uniqueIdentifier; +} + +// Get the macAddress +- (NSString*) macAddress +{ + return [[UIDevice currentDevice] macaddress]; +} + +@end \ No newline at end of file diff --git a/EonaCatTools/Tools/uniqueIdentifier/SHA1.h b/EonaCatTools/Tools/uniqueIdentifier/SHA1.h new file mode 100644 index 0000000..ea7e4fa --- /dev/null +++ b/EonaCatTools/Tools/uniqueIdentifier/SHA1.h @@ -0,0 +1,13 @@ +// +// SHA1.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import + +@interface NSString(SHA1) + +-(NSString*) stringFromSHA1:(NSString*)input; + +@end diff --git a/EonaCatTools/Tools/uniqueIdentifier/SHA1.m b/EonaCatTools/Tools/uniqueIdentifier/SHA1.m new file mode 100644 index 0000000..dccb382 --- /dev/null +++ b/EonaCatTools/Tools/uniqueIdentifier/SHA1.m @@ -0,0 +1,29 @@ +// +// SHA1.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import "SHA1.h" +#import + +@implementation NSString(SHA1) + +-(NSString*) stringFromSHA1:(NSString*)input +{ + const char *charString = [input cStringUsingEncoding:NSUTF8StringEncoding]; + NSData *data = [NSData dataWithBytes:charString length:input.length]; + + uint8_t digest[CC_SHA1_DIGEST_LENGTH]; + + CC_SHA1(data.bytes, data.length, digest); + + NSMutableString *output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2]; + + for (int i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) + { + [output appendFormat:@"%02x", digest[i]]; + } + return output; +} +@end \ No newline at end of file diff --git a/EonaCatTools/ViewController.h b/EonaCatTools/ViewController.h new file mode 100644 index 0000000..5e0e226 --- /dev/null +++ b/EonaCatTools/ViewController.h @@ -0,0 +1,18 @@ +// +// ViewController.h +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import +#import "LockController.h" + +@interface ViewController : UIViewController + +@property (weak, nonatomic) IBOutlet UIButton *showExceptionsButton; +@property (weak, nonatomic) IBOutlet UIButton *throwException; +@property (weak, nonatomic) IBOutlet UIButton *showToastButton; +@property (weak, nonatomic) IBOutlet UIButton *showPopupButton; +@property (weak, nonatomic) IBOutlet UIButton *showLockScreenButton; + +@end diff --git a/EonaCatTools/ViewController.m b/EonaCatTools/ViewController.m new file mode 100644 index 0000000..8b05273 --- /dev/null +++ b/EonaCatTools/ViewController.m @@ -0,0 +1,89 @@ +// +// ViewController.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + +#import "ViewController.h" +#import "AppDelegate.h" +#import "Toast.h" +#import "Popup.h" +#import "LockController.h" +#import "ExceptionLogger.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (IBAction)showExceptionsAction:(UIButton *)sender +{ + // Show ExceptionLogger (Check for iPhone or iPad) + ExceptionLogger* exceptionLogger; + + if (Delegate.iPad) + { + exceptionLogger = [[ExceptionLogger alloc] initWithNibName:@"ExceptionLogger-iPad" bundle:nil]; + } + else + { + exceptionLogger = [[ExceptionLogger alloc] initWithNibName:@"ExceptionLogger" bundle:nil]; + } + exceptionLogger.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; + [self presentViewController:exceptionLogger animated:YES completion:nil]; +} + +- (void)lockControllerIncorrectPassword:(NSString*)incorrectPassword tag:(NSInteger)tag +{ + [[Popup getInstance] showAlert:@"Incorrect" message:@"All your base are belong to us" delegate:self cancelButtonText:@"OK" otherButtonText:nil tag:0]; + +} + +-(void)lockControllerDidFinish:(NSString *)passcode tag:(NSInteger)tag +{ + [[Popup getInstance] showAlert:@"Correct!" message:@"All your base belongs to you" delegate:self cancelButtonText:@"OK" otherButtonText:nil tag:0]; +} + +- (IBAction)throwExceptionAction:(UIButton *)sender +{ + @throw [[NSException alloc] initWithName:@"NSException thrown!" reason:@"Testing" userInfo:nil]; +} + +- (IBAction)showToastAction:(UIButton *)sender +{ + //[self.view makeToast:[NSString stringWithFormat:@"Toasted!"] duration:3.0 position:@"top"]; + [self.view makeToast:@"EonaCat Toast!" duration:3.0 position:@"top" title:@"Toasted!" image:[UIImage imageNamed:@"toast.png"]]; +} + +- (IBAction)showPopupAction:(UIButton *)sender +{ + [[Popup getInstance] showAlert:@"Popup!" message:@"EonaCat Popup" delegate:self cancelButtonText:@"OK" otherButtonText:nil tag:0]; +} + +- (IBAction)showLockScreenAction:(UIButton *)sender +{ + LockController *lockController = [[LockController alloc] init]; + + [lockController setDelegate:self]; + [lockController setTitle:@"EonaCat LOCK!"]; + [lockController setSubPrompt:@"Passcode => 0000"]; + [lockController setPasscode:@"0000"]; + + // [self presentViewController:lockController animated:true completion:nil]; + [[Popup getInstance] showAlert:@"Lock!" message:@"Doesn't work on iOS7 yet!" delegate:self cancelButtonText:@"OK" otherButtonText:nil tag:0]; +} + +@end diff --git a/EonaCatTools/en.lproj/InfoPlist.strings b/EonaCatTools/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/EonaCatTools/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/EonaCatTools/main.m b/EonaCatTools/main.m new file mode 100644 index 0000000..02e8ba3 --- /dev/null +++ b/EonaCatTools/main.m @@ -0,0 +1,17 @@ +// +// main.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/EonaCatToolsTests/.DS_Store b/EonaCatToolsTests/.DS_Store new file mode 100644 index 0000000..d5a14b1 Binary files /dev/null and b/EonaCatToolsTests/.DS_Store differ diff --git a/EonaCatToolsTests/EonaCatToolsTests-Info.plist b/EonaCatToolsTests/EonaCatToolsTests-Info.plist new file mode 100644 index 0000000..f01e55e --- /dev/null +++ b/EonaCatToolsTests/EonaCatToolsTests-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + nl.EonaCat.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/EonaCatToolsTests/EonaCatToolsTests.m b/EonaCatToolsTests/EonaCatToolsTests.m new file mode 100644 index 0000000..b2ca2f1 --- /dev/null +++ b/EonaCatToolsTests/EonaCatToolsTests.m @@ -0,0 +1,35 @@ +// +// EonaCatToolsTest.m +// Created by EonaCat +// Copyright 2013 EonaCat. All rights reserved. +// + + +#import + +@interface EonaCatToolsTests : XCTestCase + +@end + +@implementation EonaCatToolsTests + +- (void)setUp +{ + [super setUp]; + + // Set-up code here. +} + +- (void)tearDown +{ + // Tear-down code here. + + [super tearDown]; +} + +- (void)testExample +{ + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); +} + +@end diff --git a/EonaCatToolsTests/en.lproj/InfoPlist.strings b/EonaCatToolsTests/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/EonaCatToolsTests/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/README.md b/README.md index 3c437e7..82b58a2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ -# EonaCat-Tools +EonaCat-Tools +================= -EonaCat-Tools Objective-c \ No newline at end of file +This xcode project consist out of the following classes: + +Popup (Wrapper) +Toast +Exceptionslogger +Exceptionshandler + +These tools can be useful for anyone developing for the iOS devices.