diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a249b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,79 @@ +## https://github.com/github/gitignore +  +## OS X +.DS_Store +  +## Build generated +build/ +DerivedData +  +## Various Xcode settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +  +## Xcode other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint +  +  +## Obj-C/Swift specific +*.hmap +*.ipa +  +  +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ +  +  +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts +Carthage/Build +  +  +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md +fastlane/report.xml +fastlane/screenshots +  +  +# Other temporary files +*.o +*.lo +*.la +*.al +#*# +.*.rej +*.rej +.*~ +*~ +.#* +*~.nib +.xvpics +.libs +*.so +*.so.[0-9]* +*.pyc +*.pyo +*.tmp +*.save +.*.swp \ No newline at end of file diff --git a/.swift-version b/.swift-version new file mode 100644 index 0000000..f398a20 --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +3.0 \ No newline at end of file diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj deleted file mode 100644 index 87052d7..0000000 --- a/Example/Example.xcodeproj/project.pbxproj +++ /dev/null @@ -1,524 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 754ACA9C1A954C5700E567DC /* MotionKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754ACA991A954C4F00E567DC /* MotionKit.framework */; }; - 754ACA9D1A954C5A00E567DC /* MotionKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754ACA991A954C4F00E567DC /* MotionKit.framework */; }; - 754ACA9E1A954C5A00E567DC /* MotionKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 754ACA991A954C4F00E567DC /* MotionKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 75FDEDB81A95476B00283A97 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FDEDB71A95476B00283A97 /* AppDelegate.swift */; }; - 75FDEDBB1A95476B00283A97 /* Example.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 75FDEDB91A95476B00283A97 /* Example.xcdatamodeld */; }; - 75FDEDBD1A95476B00283A97 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FDEDBC1A95476B00283A97 /* ViewController.swift */; }; - 75FDEDC01A95476B00283A97 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 75FDEDBE1A95476B00283A97 /* Main.storyboard */; }; - 75FDEDC21A95476B00283A97 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 75FDEDC11A95476B00283A97 /* Images.xcassets */; }; - 75FDEDC51A95476B00283A97 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 75FDEDC31A95476B00283A97 /* LaunchScreen.xib */; }; - 75FDEDD11A95476B00283A97 /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FDEDD01A95476B00283A97 /* ExampleTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 754ACA981A954C4F00E567DC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754ACA931A954C4F00E567DC /* MotionKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 75FDED551A9541F800283A97; - remoteInfo = MotionKit; - }; - 754ACA9A1A954C4F00E567DC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754ACA931A954C4F00E567DC /* MotionKit.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 75FDED601A9541F800283A97; - remoteInfo = MotionKitTests; - }; - 754ACA9F1A954C5A00E567DC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 754ACA931A954C4F00E567DC /* MotionKit.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 75FDED541A9541F800283A97; - remoteInfo = MotionKit; - }; - 75FDEDCB1A95476B00283A97 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 75FDEDAA1A95476B00283A97 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 75FDEDB11A95476B00283A97; - remoteInfo = Example; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 754ACAA11A954C5A00E567DC /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 754ACA9E1A954C5A00E567DC /* MotionKit.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 754ACA931A954C4F00E567DC /* MotionKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = MotionKit.xcodeproj; sourceTree = ""; }; - 75FDEDB21A95476B00283A97 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 75FDEDB61A95476B00283A97 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 75FDEDB71A95476B00283A97 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 75FDEDBA1A95476B00283A97 /* Example.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Example.xcdatamodel; sourceTree = ""; }; - 75FDEDBC1A95476B00283A97 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 75FDEDBF1A95476B00283A97 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 75FDEDC11A95476B00283A97 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 75FDEDC41A95476B00283A97 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 75FDEDCA1A95476B00283A97 /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 75FDEDCF1A95476B00283A97 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 75FDEDD01A95476B00283A97 /* ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleTests.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 75FDEDAF1A95476B00283A97 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 754ACA9C1A954C5700E567DC /* MotionKit.framework in Frameworks */, - 754ACA9D1A954C5A00E567DC /* MotionKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75FDEDC71A95476B00283A97 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 754ACA941A954C4F00E567DC /* Products */ = { - isa = PBXGroup; - children = ( - 754ACA991A954C4F00E567DC /* MotionKit.framework */, - 754ACA9B1A954C4F00E567DC /* MotionKitTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 75FDEDA91A95476B00283A97 = { - isa = PBXGroup; - children = ( - 754ACA931A954C4F00E567DC /* MotionKit.xcodeproj */, - 75FDEDB41A95476B00283A97 /* Example */, - 75FDEDCD1A95476B00283A97 /* ExampleTests */, - 75FDEDB31A95476B00283A97 /* Products */, - ); - sourceTree = ""; - }; - 75FDEDB31A95476B00283A97 /* Products */ = { - isa = PBXGroup; - children = ( - 75FDEDB21A95476B00283A97 /* Example.app */, - 75FDEDCA1A95476B00283A97 /* ExampleTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 75FDEDB41A95476B00283A97 /* Example */ = { - isa = PBXGroup; - children = ( - 75FDEDB71A95476B00283A97 /* AppDelegate.swift */, - 75FDEDBC1A95476B00283A97 /* ViewController.swift */, - 75FDEDBE1A95476B00283A97 /* Main.storyboard */, - 75FDEDC11A95476B00283A97 /* Images.xcassets */, - 75FDEDC31A95476B00283A97 /* LaunchScreen.xib */, - 75FDEDB91A95476B00283A97 /* Example.xcdatamodeld */, - 75FDEDB51A95476B00283A97 /* Supporting Files */, - ); - path = Example; - sourceTree = ""; - }; - 75FDEDB51A95476B00283A97 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 75FDEDB61A95476B00283A97 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 75FDEDCD1A95476B00283A97 /* ExampleTests */ = { - isa = PBXGroup; - children = ( - 75FDEDD01A95476B00283A97 /* ExampleTests.swift */, - 75FDEDCE1A95476B00283A97 /* Supporting Files */, - ); - path = ExampleTests; - sourceTree = ""; - }; - 75FDEDCE1A95476B00283A97 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 75FDEDCF1A95476B00283A97 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 75FDEDB11A95476B00283A97 /* Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 75FDEDD41A95476B00283A97 /* Build configuration list for PBXNativeTarget "Example" */; - buildPhases = ( - 75FDEDAE1A95476B00283A97 /* Sources */, - 75FDEDAF1A95476B00283A97 /* Frameworks */, - 75FDEDB01A95476B00283A97 /* Resources */, - 754ACAA11A954C5A00E567DC /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 754ACAA01A954C5A00E567DC /* PBXTargetDependency */, - ); - name = Example; - productName = Example; - productReference = 75FDEDB21A95476B00283A97 /* Example.app */; - productType = "com.apple.product-type.application"; - }; - 75FDEDC91A95476B00283A97 /* ExampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 75FDEDD71A95476B00283A97 /* Build configuration list for PBXNativeTarget "ExampleTests" */; - buildPhases = ( - 75FDEDC61A95476B00283A97 /* Sources */, - 75FDEDC71A95476B00283A97 /* Frameworks */, - 75FDEDC81A95476B00283A97 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 75FDEDCC1A95476B00283A97 /* PBXTargetDependency */, - ); - name = ExampleTests; - productName = ExampleTests; - productReference = 75FDEDCA1A95476B00283A97 /* ExampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 75FDEDAA1A95476B00283A97 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = MotionKit; - TargetAttributes = { - 75FDEDB11A95476B00283A97 = { - CreatedOnToolsVersion = 6.1.1; - }; - 75FDEDC91A95476B00283A97 = { - CreatedOnToolsVersion = 6.1.1; - TestTargetID = 75FDEDB11A95476B00283A97; - }; - }; - }; - buildConfigurationList = 75FDEDAD1A95476B00283A97 /* Build configuration list for PBXProject "Example" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 75FDEDA91A95476B00283A97; - productRefGroup = 75FDEDB31A95476B00283A97 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 754ACA941A954C4F00E567DC /* Products */; - ProjectRef = 754ACA931A954C4F00E567DC /* MotionKit.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 75FDEDB11A95476B00283A97 /* Example */, - 75FDEDC91A95476B00283A97 /* ExampleTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 754ACA991A954C4F00E567DC /* MotionKit.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = MotionKit.framework; - remoteRef = 754ACA981A954C4F00E567DC /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 754ACA9B1A954C4F00E567DC /* MotionKitTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = MotionKitTests.xctest; - remoteRef = 754ACA9A1A954C4F00E567DC /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 75FDEDB01A95476B00283A97 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDEDC01A95476B00283A97 /* Main.storyboard in Resources */, - 75FDEDC51A95476B00283A97 /* LaunchScreen.xib in Resources */, - 75FDEDC21A95476B00283A97 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75FDEDC81A95476B00283A97 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 75FDEDAE1A95476B00283A97 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDEDBD1A95476B00283A97 /* ViewController.swift in Sources */, - 75FDEDBB1A95476B00283A97 /* Example.xcdatamodeld in Sources */, - 75FDEDB81A95476B00283A97 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75FDEDC61A95476B00283A97 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDEDD11A95476B00283A97 /* ExampleTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 754ACAA01A954C5A00E567DC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = MotionKit; - targetProxy = 754ACA9F1A954C5A00E567DC /* PBXContainerItemProxy */; - }; - 75FDEDCC1A95476B00283A97 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 75FDEDB11A95476B00283A97 /* Example */; - targetProxy = 75FDEDCB1A95476B00283A97 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 75FDEDBE1A95476B00283A97 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 75FDEDBF1A95476B00283A97 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 75FDEDC31A95476B00283A97 /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 75FDEDC41A95476B00283A97 /* Base */, - ); - name = LaunchScreen.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 75FDEDD21A95476B00283A97 /* 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_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 75FDEDD31A95476B00283A97 /* 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_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 75FDEDD51A95476B00283A97 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - INFOPLIST_FILE = Example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 75FDEDD61A95476B00283A97 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; - INFOPLIST_FILE = Example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 75FDEDD81A95476B00283A97 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ExampleTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; - }; - name = Debug; - }; - 75FDEDD91A95476B00283A97 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = ExampleTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 75FDEDAD1A95476B00283A97 /* Build configuration list for PBXProject "Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75FDEDD21A95476B00283A97 /* Debug */, - 75FDEDD31A95476B00283A97 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 75FDEDD41A95476B00283A97 /* Build configuration list for PBXNativeTarget "Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75FDEDD51A95476B00283A97 /* Debug */, - 75FDEDD61A95476B00283A97 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 75FDEDD71A95476B00283A97 /* Build configuration list for PBXNativeTarget "ExampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75FDEDD81A95476B00283A97 /* Debug */, - 75FDEDD91A95476B00283A97 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCVersionGroup section */ - 75FDEDB91A95476B00283A97 /* Example.xcdatamodeld */ = { - isa = XCVersionGroup; - children = ( - 75FDEDBA1A95476B00283A97 /* Example.xcdatamodel */, - ); - currentVersion = 75FDEDBA1A95476B00283A97 /* Example.xcdatamodel */; - path = Example.xcdatamodeld; - sourceTree = ""; - versionGroupType = wrapper.xcdatamodel; - }; -/* End XCVersionGroup section */ - }; - rootObject = 75FDEDAA1A95476B00283A97 /* Project object */; -} diff --git a/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6d2a51b..0000000 --- a/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/Example.xccheckout b/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/Example.xccheckout deleted file mode 100644 index 4fe8c58..0000000 --- a/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/Example.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - BB1DB258-1B54-46F4-AB50-5526B71C1257 - IDESourceControlProjectName - Example - IDESourceControlProjectOriginsDictionary - - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - https://github.com/MHaroonBaig/MotionKit.git - - IDESourceControlProjectPath - Example/Example.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - ../../.. - - IDESourceControlProjectURL - https://github.com/MHaroonBaig/MotionKit.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - IDESourceControlWCCName - MotionKit - - - - diff --git a/Example/Example.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate b/Example/Example.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index a4dc027..0000000 Binary files a/Example/Example.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme deleted file mode 100644 index c81a0ae..0000000 --- a/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Example.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist b/Example/Example.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index c37ac7a..0000000 --- a/Example/Example.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SchemeUserState - - Example.xcscheme_^#shared#^_ - - orderHint - 0 - - - SuppressBuildableAutocreation - - 75FDEDB11A95476B00283A97 - - primary - - - 75FDEDC91A95476B00283A97 - - primary - - - - - diff --git a/Example/Example/AppDelegate.swift b/Example/Example/AppDelegate.swift deleted file mode 100644 index 5fc873e..0000000 --- a/Example/Example/AppDelegate.swift +++ /dev/null @@ -1,111 +0,0 @@ -// -// AppDelegate.swift -// Example -// -// Created by Haroon on 19/02/2015. -// Copyright (c) 2015 MotionKit. All rights reserved. -// - -import UIKit -import CoreData - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(application: UIApplication) { - // 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. - } - - func applicationDidEnterBackground(application: UIApplication) { - // 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. - } - - func applicationWillEnterForeground(application: UIApplication) { - // 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. - } - - func applicationDidBecomeActive(application: UIApplication) { - // 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. - } - - func applicationWillTerminate(application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - // Saves changes in the application's managed object context before the application terminates. - self.saveContext() - } - - // MARK: - Core Data stack - - lazy var applicationDocumentsDirectory: NSURL = { - // The directory the application uses to store the Core Data store file. This code uses a directory named "com.motionkit.Example" in the application's documents Application Support directory. - let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask) - return urls[urls.count-1] as NSURL - }() - - lazy var managedObjectModel: NSManagedObjectModel = { - // The managed object model for the application. This property is not optional. It is a fatal error for the application not to be able to find and load its model. - let modelURL = NSBundle.mainBundle().URLForResource("Example", withExtension: "momd")! - return NSManagedObjectModel(contentsOfURL: modelURL)! - }() - - lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = { - // The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail. - // Create the coordinator and store - var coordinator: NSPersistentStoreCoordinator? = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel) - let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("Example.sqlite") - var error: NSError? = nil - var failureReason = "There was an error creating or loading the application's saved data." - if coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil, error: &error) == nil { - coordinator = nil - // Report any error we got. - let dict = NSMutableDictionary() - dict[NSLocalizedDescriptionKey] = "Failed to initialize the application's saved data" - dict[NSLocalizedFailureReasonErrorKey] = failureReason - dict[NSUnderlyingErrorKey] = error - error = NSError(domain: "YOUR_ERROR_DOMAIN", code: 9999, userInfo: dict) - // Replace this with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - NSLog("Unresolved error \(error), \(error!.userInfo)") - abort() - } - - return coordinator - }() - - lazy var managedObjectContext: NSManagedObjectContext? = { - // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) This property is optional since there are legitimate error conditions that could cause the creation of the context to fail. - let coordinator = self.persistentStoreCoordinator - if coordinator == nil { - return nil - } - var managedObjectContext = NSManagedObjectContext() - managedObjectContext.persistentStoreCoordinator = coordinator - return managedObjectContext - }() - - // MARK: - Core Data Saving support - - func saveContext () { - if let moc = self.managedObjectContext { - var error: NSError? = nil - if moc.hasChanges && !moc.save(&error) { - // Replace this implementation with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - NSLog("Unresolved error \(error), \(error!.userInfo)") - abort() - } - } - } - -} - diff --git a/Example/Example/Base.lproj/LaunchScreen.xib b/Example/Example/Base.lproj/LaunchScreen.xib deleted file mode 100644 index e17e7b6..0000000 --- a/Example/Example/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Example/Base.lproj/Main.storyboard b/Example/Example/Base.lproj/Main.storyboard deleted file mode 100644 index 3a2a49b..0000000 --- a/Example/Example/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Example/Example.xcdatamodeld/.xccurrentversion b/Example/Example/Example.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 74c5c1b..0000000 --- a/Example/Example/Example.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ - - - - - _XCCurrentVersionName - Example.xcdatamodel - - diff --git a/Example/Example/Example.xcdatamodeld/Example.xcdatamodel/contents b/Example/Example/Example.xcdatamodeld/Example.xcdatamodel/contents deleted file mode 100644 index 193f33c..0000000 --- a/Example/Example/Example.xcdatamodeld/Example.xcdatamodel/contents +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 36d2c80..0000000 --- a/Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/Example/Info.plist b/Example/Example/Info.plist deleted file mode 100644 index 9019bb3..0000000 --- a/Example/Example/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.motionkit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Example/Example/ViewController.swift b/Example/Example/ViewController.swift deleted file mode 100644 index 1a226cd..0000000 --- a/Example/Example/ViewController.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// ViewController.swift -// Example -// -// Created by Haroon on 19/02/2015. -// Copyright (c) 2015 MotionKit. All rights reserved. -// - -import UIKit -import MotionKit - -class ViewController: UIViewController { - - let motionKit = MotionKit() - - override func viewDidLoad() { - super.viewDidLoad() - motionKit.getAccelerometerValues(interval: 1.0) { (x, y, z) -> () in - println(x) - } - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - -} - diff --git a/Example/ExampleTests/ExampleTests.swift b/Example/ExampleTests/ExampleTests.swift deleted file mode 100644 index 79d9dd8..0000000 --- a/Example/ExampleTests/ExampleTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// ExampleTests.swift -// ExampleTests -// -// Created by Haroon on 19/02/2015. -// Copyright (c) 2015 MotionKit. All rights reserved. -// - -import UIKit -import XCTest - -class ExampleTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measureBlock() { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/Example/ExampleTests/Info.plist b/Example/ExampleTests/Info.plist deleted file mode 100644 index 0e76198..0000000 --- a/Example/ExampleTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.motionkit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Example/MotionKit.xcodeproj/project.pbxproj b/Example/MotionKit.xcodeproj/project.pbxproj deleted file mode 100644 index f9980c2..0000000 --- a/Example/MotionKit.xcodeproj/project.pbxproj +++ /dev/null @@ -1,414 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 75FDED5B1A9541F800283A97 /* MotionKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 75FDED5A1A9541F800283A97 /* MotionKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 75FDED611A9541F800283A97 /* MotionKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75FDED551A9541F800283A97 /* MotionKit.framework */; }; - 75FDED681A9541F800283A97 /* MotionKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FDED671A9541F800283A97 /* MotionKitTests.swift */; }; - 75FDED721A95422200283A97 /* MotionKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FDED711A95422200283A97 /* MotionKit.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 75FDED621A9541F800283A97 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 75FDED4C1A9541F800283A97 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 75FDED541A9541F800283A97; - remoteInfo = MotionKit; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 75FDED551A9541F800283A97 /* MotionKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MotionKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 75FDED591A9541F800283A97 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 75FDED5A1A9541F800283A97 /* MotionKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MotionKit.h; sourceTree = ""; }; - 75FDED601A9541F800283A97 /* MotionKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MotionKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 75FDED661A9541F800283A97 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 75FDED671A9541F800283A97 /* MotionKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MotionKitTests.swift; sourceTree = ""; }; - 75FDED711A95422200283A97 /* MotionKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionKit.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 75FDED511A9541F800283A97 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75FDED5D1A9541F800283A97 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDED611A9541F800283A97 /* MotionKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 75FDED4B1A9541F800283A97 = { - isa = PBXGroup; - children = ( - 75FDED571A9541F800283A97 /* MotionKit */, - 75FDED641A9541F800283A97 /* MotionKitTests */, - 75FDED561A9541F800283A97 /* Products */, - ); - sourceTree = ""; - }; - 75FDED561A9541F800283A97 /* Products */ = { - isa = PBXGroup; - children = ( - 75FDED551A9541F800283A97 /* MotionKit.framework */, - 75FDED601A9541F800283A97 /* MotionKitTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 75FDED571A9541F800283A97 /* MotionKit */ = { - isa = PBXGroup; - children = ( - 75FDED5A1A9541F800283A97 /* MotionKit.h */, - 75FDED711A95422200283A97 /* MotionKit.swift */, - 75FDED581A9541F800283A97 /* Supporting Files */, - ); - path = MotionKit; - sourceTree = ""; - }; - 75FDED581A9541F800283A97 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 75FDED591A9541F800283A97 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 75FDED641A9541F800283A97 /* MotionKitTests */ = { - isa = PBXGroup; - children = ( - 75FDED671A9541F800283A97 /* MotionKitTests.swift */, - 75FDED651A9541F800283A97 /* Supporting Files */, - ); - path = MotionKitTests; - sourceTree = ""; - }; - 75FDED651A9541F800283A97 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 75FDED661A9541F800283A97 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 75FDED521A9541F800283A97 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDED5B1A9541F800283A97 /* MotionKit.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 75FDED541A9541F800283A97 /* MotionKit */ = { - isa = PBXNativeTarget; - buildConfigurationList = 75FDED6B1A9541F800283A97 /* Build configuration list for PBXNativeTarget "MotionKit" */; - buildPhases = ( - 75FDED501A9541F800283A97 /* Sources */, - 75FDED511A9541F800283A97 /* Frameworks */, - 75FDED521A9541F800283A97 /* Headers */, - 75FDED531A9541F800283A97 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MotionKit; - productName = MotionKit; - productReference = 75FDED551A9541F800283A97 /* MotionKit.framework */; - productType = "com.apple.product-type.framework"; - }; - 75FDED5F1A9541F800283A97 /* MotionKitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 75FDED6E1A9541F800283A97 /* Build configuration list for PBXNativeTarget "MotionKitTests" */; - buildPhases = ( - 75FDED5C1A9541F800283A97 /* Sources */, - 75FDED5D1A9541F800283A97 /* Frameworks */, - 75FDED5E1A9541F800283A97 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 75FDED631A9541F800283A97 /* PBXTargetDependency */, - ); - name = MotionKitTests; - productName = MotionKitTests; - productReference = 75FDED601A9541F800283A97 /* MotionKitTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 75FDED4C1A9541F800283A97 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = MotionKit; - TargetAttributes = { - 75FDED541A9541F800283A97 = { - CreatedOnToolsVersion = 6.1.1; - }; - 75FDED5F1A9541F800283A97 = { - CreatedOnToolsVersion = 6.1.1; - }; - }; - }; - buildConfigurationList = 75FDED4F1A9541F800283A97 /* Build configuration list for PBXProject "MotionKit" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 75FDED4B1A9541F800283A97; - productRefGroup = 75FDED561A9541F800283A97 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 75FDED541A9541F800283A97 /* MotionKit */, - 75FDED5F1A9541F800283A97 /* MotionKitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 75FDED531A9541F800283A97 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75FDED5E1A9541F800283A97 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 75FDED501A9541F800283A97 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDED721A95422200283A97 /* MotionKit.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75FDED5C1A9541F800283A97 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDED681A9541F800283A97 /* MotionKitTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 75FDED631A9541F800283A97 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 75FDED541A9541F800283A97 /* MotionKit */; - targetProxy = 75FDED621A9541F800283A97 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 75FDED691A9541F800283A97 /* 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_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 75FDED6A1A9541F800283A97 /* 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_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 1; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 75FDED6C1A9541F800283A97 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = MotionKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 75FDED6D1A9541F800283A97 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = MotionKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 75FDED6F1A9541F800283A97 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = MotionKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 75FDED701A9541F800283A97 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = MotionKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 75FDED4F1A9541F800283A97 /* Build configuration list for PBXProject "MotionKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75FDED691A9541F800283A97 /* Debug */, - 75FDED6A1A9541F800283A97 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 75FDED6B1A9541F800283A97 /* Build configuration list for PBXNativeTarget "MotionKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75FDED6C1A9541F800283A97 /* Debug */, - 75FDED6D1A9541F800283A97 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; - 75FDED6E1A9541F800283A97 /* Build configuration list for PBXNativeTarget "MotionKitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75FDED6F1A9541F800283A97 /* Debug */, - 75FDED701A9541F800283A97 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 75FDED4C1A9541F800283A97 /* Project object */; -} diff --git a/Example/MotionKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/MotionKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 9488daa..0000000 --- a/Example/MotionKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Example/MotionKit.xcodeproj/project.xcworkspace/xcshareddata/MotionKit.xccheckout b/Example/MotionKit.xcodeproj/project.xcworkspace/xcshareddata/MotionKit.xccheckout deleted file mode 100644 index bda6749..0000000 --- a/Example/MotionKit.xcodeproj/project.xcworkspace/xcshareddata/MotionKit.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - B2C25DDE-3EBB-4B73-A6E7-0C6873FBEC2C - IDESourceControlProjectName - MotionKit - IDESourceControlProjectOriginsDictionary - - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - https://github.com/MHaroonBaig/MotionKit.git - - IDESourceControlProjectPath - MotionKit.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - ../.. - - IDESourceControlProjectURL - https://github.com/MHaroonBaig/MotionKit.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - IDESourceControlWCCName - MotionKit - - - - diff --git a/Example/MotionKit.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate b/Example/MotionKit.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 4320fc1..0000000 Binary files a/Example/MotionKit.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Example/MotionKit.xcodeproj/xcshareddata/xcschemes/MotionKit.xcscheme b/Example/MotionKit.xcodeproj/xcshareddata/xcschemes/MotionKit.xcscheme deleted file mode 100644 index 09efd47..0000000 --- a/Example/MotionKit.xcodeproj/xcshareddata/xcschemes/MotionKit.xcscheme +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist b/Example/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 04037a4..0000000 --- a/Example/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SchemeUserState - - MotionKit.xcscheme_^#shared#^_ - - orderHint - 0 - - - SuppressBuildableAutocreation - - 75FDED541A9541F800283A97 - - primary - - - 75FDED5F1A9541F800283A97 - - primary - - - - - diff --git a/Example/MotionKit/Info.plist b/Example/MotionKit/Info.plist deleted file mode 100644 index c328732..0000000 --- a/Example/MotionKit/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.motionkit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Example/MotionKit/MotionKit.h b/Example/MotionKit/MotionKit.h deleted file mode 100644 index 3feca5b..0000000 --- a/Example/MotionKit/MotionKit.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// MotionKit.h -// MotionKit -// -// Created by Haroon on 19/02/2015. -// Copyright (c) 2015 MotionKit. All rights reserved. -// - -#import - -//! Project version number for MotionKit. -FOUNDATION_EXPORT double MotionKitVersionNumber; - -//! Project version string for MotionKit. -FOUNDATION_EXPORT const unsigned char MotionKitVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Example/MotionKit/MotionKit.swift b/Example/MotionKit/MotionKit.swift deleted file mode 100644 index 38fb9da..0000000 --- a/Example/MotionKit/MotionKit.swift +++ /dev/null @@ -1,456 +0,0 @@ -// -// MotionKit.swift -// MotionKit -// -// Created by Haroon on 14/02/2015. -// Launched under the Creative Commons License. You're free to use MotionKit. -// -// The original Github repository is https://github.com/MHaroonBaig/MotionKit -// The official blog post and documentation is https://medium.com/@PyBaig/motionkit-the-missing-ios-coremotion-wrapper-written-in-swift-99fcb83355d0 -// - -import Foundation -import CoreMotion - -//_______________________________________________________________________________________________________________ -// this helps retrieve values from the sensors. -@objc protocol MotionKitDelegate { - optional func retrieveAccelerometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveGyroscopeValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveDeviceMotionObject (deviceMotion: CMDeviceMotion) - optional func retrieveMagnetometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - - optional func getAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getGravityAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getRotationRateFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getMagneticFieldFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getAttitudeFromDeviceMotion (attitude: CMAttitude) -} - - -public class MotionKit { - - let manager = CMMotionManager() - var delegate: MotionKitDelegate? - - /* - * init:void: - * - * Discussion: - * Initialises the MotionKit class and throw a Log with a timestamp. - */ - public init(){ - NSLog("MotionKit has been initialised successfully") - } - - /* - * getAccelerometerValues:interval:values: - * - * Discussion: - * Starts accelerometer updates, providing data to the given handler through the given queue. - * Note that when the updates are stopped, all operations in the - * given NSOperationQueue will be cancelled. You can access the retrieved values either by a - * Trailing Closure or through a Delgate. - */ - public func getAccelerometerValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y: Double, z: Double) -> ())? ){ - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.accelerometerAvailable { - manager.accelerometerUpdateInterval = interval - manager.startAccelerometerUpdatesToQueue(NSOperationQueue()) { - (data: CMAccelerometerData!, error: NSError!) in - - if let isError = error { - NSLog("Error: %@", isError) - } - valX = data.acceleration.x - valY = data.acceleration.y - valZ = data.acceleration.z - - if values != nil{ - values!(x: valX,y: valY,z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveAccelerometerValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("The Accelerometer is not available") - } - } - - /* - * getGyroValues:interval:values: - * - * Discussion: - * Starts gyro updates, providing data to the given handler through the given queue. - * Note that when the updates are stopped, all operations in the - * given NSOperationQueue will be cancelled. You can access the retrieved values either by a - * Trailing Closure or through a Delegate. - */ - public func getGyroValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y: Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.gyroAvailable{ - manager.gyroUpdateInterval = interval - manager.startGyroUpdatesToQueue(NSOperationQueue()) { - (data: CMGyroData!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.rotationRate.x - valY = data.rotationRate.y - valZ = data.rotationRate.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveGyroscopeValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("The Gyroscope is not available") - } - } - - /* - * getMagnetometerValues:interval:values: - * - * Discussion: - * Starts magnetometer updates, providing data to the given handler through the given queue. - * You can access the retrieved values either by a Trailing Closure or through a Delegate. - */ - @availability(iOS, introduced=5.0) - public func getMagnetometerValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y:Double, z:Double) -> ())? ){ - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.magnetometerAvailable { - manager.magnetometerUpdateInterval = interval - manager.startMagnetometerUpdatesToQueue(NSOperationQueue()){ - (data: CMMagnetometerData!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.magneticField.x - valY = data.magneticField.y - valZ = data.magneticField.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveMagnetometerValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("Magnetometer is not available") - } - } - - /* MARK :- DEVICE MOTION APPROACH STARTS HERE */ - - /* - * getDeviceMotionValues:interval:values: - * - * Discussion: - * Starts device motion updates, providing data to the given handler through the given queue. - * Uses the default reference frame for the device. Examine CMMotionManager's - * attitudeReferenceFrame to determine this. You can access the retrieved values either by a - * Trailing Closure or through a Delegate. - */ - public func getDeviceMotionObject (interval: NSTimeInterval = 0.1, values: ((deviceMotion: CMDeviceMotion) -> ())? ) { - - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - if values != nil{ - values!(deviceMotion: data) - } - self.delegate?.retrieveDeviceMotionObject!(data) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getAccelerationFromDeviceMotion:interval:values: - * You can retrieve the processed user accelaration data from the device motion from this method. - */ - public func getAccelerationFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.userAcceleration.x - valY = data.userAcceleration.y - valZ = data.userAcceleration.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - self.delegate?.getAccelerationValFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is unavailable") - } - } - - /* - * getGravityAccelerationFromDeviceMotion:interval:values: - * You can retrieve the processed gravitational accelaration data from the device motion from this - * method. - */ - public func getGravityAccelerationFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.gravity.x - valY = data.gravity.y - valZ = data.gravity.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.getGravityAccelerationValFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getAttitudeFromDeviceMotion:interval:values: - * You can retrieve the processed attitude data from the device motion from this - * method. - */ - public func getAttitudeFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((attitude: CMAttitude) -> ())? ) { - - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - if values != nil{ - values!(attitude: data.attitude) - } - - self.delegate?.getAttitudeFromDeviceMotion!(data.attitude) - } - - } else { - NSLog("Device Motion is not available") - } - } - - /* - * getRotationRateFromDeviceMotion:interval:values: - * You can retrieve the processed rotation data from the device motion from this - * method. - */ - public func getRotationRateFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.rotationRate.x - valY = data.rotationRate.y - valZ = data.rotationRate.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.getRotationRateFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getMagneticFieldFromDeviceMotion:interval:values: - * You can retrieve the processed magnetic field data from the device motion from this - * method. - */ - public func getMagneticFieldFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double, accuracy: Int32) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - var valAccuracy: Int32! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.magneticField.field.x - valY = data.magneticField.field.y - valZ = data.magneticField.field.z - valAccuracy = data.magneticField.accuracy.value - - - if values != nil{ - values!(x: valX, y: valY, z: valZ, accuracy: valAccuracy) - } - - self.delegate?.getMagneticFieldFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - /* MARK :- DEVICE MOTION APPROACH ENDS HERE */ - - - /* - * From the methods hereafter, the sensor values could be retrieved at - * a particular instant, whenever needed, through a trailing closure. - */ - - /* MARK :- INSTANTANIOUS METHODS START HERE */ - - public func getAccelerationAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getAccelerationFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - public func getGravitationalAccelerationAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getGravityAccelerationFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - public func getAttitudeAtCurrentInstant (values: (attitude: CMAttitude) -> ()){ - self.getAttitudeFromDeviceMotion(interval: 0.5) { (attitude) -> () in - values(attitude: attitude) - self.stopDeviceMotionUpdates() - } - - } - - public func getMageticFieldAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getMagneticFieldFromDeviceMotion(interval: 0.5) { (x, y, z, accuracy) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - public func getGyroValuesAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getRotationRateFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - /* MARK :- INSTANTANIOUS METHODS END HERE */ - - - - /* - * stopAccelerometerUpdates - * - * Discussion: - * Stop accelerometer updates. - */ - public func stopAccelerometerUpdates(){ - self.manager.stopAccelerometerUpdates() - NSLog("Accelaration Updates Status - Stopped") - } - - /* - * stopGyroUpdates - * - * Discussion: - * Stops gyro updates. - */ - public func stopGyroUpdates(){ - self.manager.stopGyroUpdates() - NSLog("Gyroscope Updates Status - Stopped") - } - - /* - * stopDeviceMotionUpdates - * - * Discussion: - * Stops device motion updates. - */ - public func stopDeviceMotionUpdates() { - self.manager.stopDeviceMotionUpdates() - NSLog("Device Motion Updates Status - Stopped") - } - - /* - * stopMagnetometerUpdates - * - * Discussion: - * Stops magnetometer updates. - */ - @availability(iOS, introduced=5.0) - public func stopmagnetometerUpdates() { - self.manager.stopMagnetometerUpdates() - NSLog("Magnetometer Updates Status - Stopped") - } - -} \ No newline at end of file diff --git a/Example/MotionKitTests/Info.plist b/Example/MotionKitTests/Info.plist deleted file mode 100644 index 0e76198..0000000 --- a/Example/MotionKitTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.motionkit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Example/MotionKitTests/MotionKitTests.swift b/Example/MotionKitTests/MotionKitTests.swift deleted file mode 100644 index d78e1e7..0000000 --- a/Example/MotionKitTests/MotionKitTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// MotionKitTests.swift -// MotionKitTests -// -// Created by Haroon on 19/02/2015. -// Copyright (c) 2015 MotionKit. All rights reserved. -// - -import UIKit -import XCTest - -class MotionKitTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measureBlock() { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/MotionKit.swift b/MotionKit.swift deleted file mode 100644 index 06b7443..0000000 --- a/MotionKit.swift +++ /dev/null @@ -1,456 +0,0 @@ -// -// MotionKit.swift -// MotionKit -// -// Created by Haroon on 14/02/2015. -// Launched under the Creative Commons License. You're free to use MotionKit. -// -// The original Github repository is https://github.com/MHaroonBaig/MotionKit -// The official blog post and documentation is https://medium.com/@PyBaig/motionkit-the-missing-ios-coremotion-wrapper-written-in-swift-99fcb83355d0 -// - -import Foundation -import CoreMotion - -//_______________________________________________________________________________________________________________ -// this helps retrieve values from the sensors. -@objc protocol MotionKitDelegate { - optional func retrieveAccelerometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveGyroscopeValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveDeviceMotionObject (deviceMotion: CMDeviceMotion) - optional func retrieveMagnetometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - - optional func getAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getGravityAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getRotationRateFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getMagneticFieldFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getAttitudeFromDeviceMotion (attitude: CMAttitude) -} - - -class MotionKit { - - let manager = CMMotionManager() - var delegate: MotionKitDelegate? - - /* - * init:void: - * - * Discussion: - * Initialises the MotionKit class and throw a Log with a timestamp. - */ - init(){ - NSLog("MotionKit has been initialised successfully") - } - - /* - * getAccelerometerValues:interval:values: - * - * Discussion: - * Starts accelerometer updates, providing data to the given handler through the given queue. - * Note that when the updates are stopped, all operations in the - * given NSOperationQueue will be cancelled. You can access the retrieved values either by a - * Trailing Closure or through a Delgate. - */ - func getAccelerometerValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y: Double, z: Double) -> ())? ){ - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.accelerometerAvailable { - manager.accelerometerUpdateInterval = interval - manager.startAccelerometerUpdatesToQueue(NSOperationQueue()) { - (data: CMAccelerometerData!, error: NSError!) in - - if let isError = error { - NSLog("Error: %@", isError) - } - valX = data.acceleration.x - valY = data.acceleration.y - valZ = data.acceleration.z - - if values != nil{ - values!(x: valX,y: valY,z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveAccelerometerValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("The Accelerometer is not available") - } - } - - /* - * getGyroValues:interval:values: - * - * Discussion: - * Starts gyro updates, providing data to the given handler through the given queue. - * Note that when the updates are stopped, all operations in the - * given NSOperationQueue will be cancelled. You can access the retrieved values either by a - * Trailing Closure or through a Delegate. - */ - func getGyroValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y: Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.gyroAvailable{ - manager.gyroUpdateInterval = interval - manager.startGyroUpdatesToQueue(NSOperationQueue()) { - (data: CMGyroData!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.rotationRate.x - valY = data.rotationRate.y - valZ = data.rotationRate.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveGyroscopeValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("The Gyroscope is not available") - } - } - - /* - * getMagnetometerValues:interval:values: - * - * Discussion: - * Starts magnetometer updates, providing data to the given handler through the given queue. - * You can access the retrieved values either by a Trailing Closure or through a Delegate. - */ - @availability(iOS, introduced=5.0) - func getMagnetometerValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y:Double, z:Double) -> ())? ){ - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.magnetometerAvailable { - manager.magnetometerUpdateInterval = interval - manager.startMagnetometerUpdatesToQueue(NSOperationQueue()){ - (data: CMMagnetometerData!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.magneticField.x - valY = data.magneticField.y - valZ = data.magneticField.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveMagnetometerValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("Magnetometer is not available") - } - } - - /* MARK :- DEVICE MOTION APPROACH STARTS HERE */ - - /* - * getDeviceMotionValues:interval:values: - * - * Discussion: - * Starts device motion updates, providing data to the given handler through the given queue. - * Uses the default reference frame for the device. Examine CMMotionManager's - * attitudeReferenceFrame to determine this. You can access the retrieved values either by a - * Trailing Closure or through a Delegate. - */ - func getDeviceMotionObject (interval: NSTimeInterval = 0.1, values: ((deviceMotion: CMDeviceMotion) -> ())? ) { - - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - if values != nil{ - values!(deviceMotion: data) - } - self.delegate?.retrieveDeviceMotionObject!(data) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getAccelerationFromDeviceMotion:interval:values: - * You can retrieve the processed user accelaration data from the device motion from this method. - */ - func getAccelerationFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.userAcceleration.x - valY = data.userAcceleration.y - valZ = data.userAcceleration.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - self.delegate?.getAccelerationValFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is unavailable") - } - } - - /* - * getGravityAccelerationFromDeviceMotion:interval:values: - * You can retrieve the processed gravitational accelaration data from the device motion from this - * method. - */ - func getGravityAccelerationFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.gravity.x - valY = data.gravity.y - valZ = data.gravity.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.getGravityAccelerationValFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getAttitudeFromDeviceMotion:interval:values: - * You can retrieve the processed attitude data from the device motion from this - * method. - */ - func getAttitudeFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((attitude: CMAttitude) -> ())? ) { - - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - if values != nil{ - values!(attitude: data.attitude) - } - - self.delegate?.getAttitudeFromDeviceMotion!(data.attitude) - } - - } else { - NSLog("Device Motion is not available") - } - } - - /* - * getRotationRateFromDeviceMotion:interval:values: - * You can retrieve the processed rotation data from the device motion from this - * method. - */ - func getRotationRateFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.rotationRate.x - valY = data.rotationRate.y - valZ = data.rotationRate.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.getRotationRateFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getMagneticFieldFromDeviceMotion:interval:values: - * You can retrieve the processed magnetic field data from the device motion from this - * method. - */ - func getMagneticFieldFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double, accuracy: Int32) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - var valAccuracy: Int32! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.magneticField.field.x - valY = data.magneticField.field.y - valZ = data.magneticField.field.z - valAccuracy = data.magneticField.accuracy.value - - - if values != nil{ - values!(x: valX, y: valY, z: valZ, accuracy: valAccuracy) - } - - self.delegate?.getMagneticFieldFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - /* MARK :- DEVICE MOTION APPROACH ENDS HERE */ - - - /* - * From the methods hereafter, the sensor values could be retrieved at - * a particular instant, whenever needed, through a trailing closure. - */ - - /* MARK :- INSTANTANIOUS METHODS START HERE */ - - func getAccelerationAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getAccelerationFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - func getGravitationalAccelerationAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getGravityAccelerationFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - func getAttitudeAtCurrentInstant (values: (attitude: CMAttitude) -> ()){ - self.getAttitudeFromDeviceMotion(interval: 0.5) { (attitude) -> () in - values(attitude: attitude) - self.stopDeviceMotionUpdates() - } - - } - - func getMageticFieldAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getMagneticFieldFromDeviceMotion(interval: 0.5) { (x, y, z, accuracy) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - func getGyroValuesAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getRotationRateFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - /* MARK :- INSTANTANIOUS METHODS END HERE */ - - - - /* - * stopAccelerometerUpdates - * - * Discussion: - * Stop accelerometer updates. - */ - func stopAccelerometerUpdates(){ - self.manager.stopAccelerometerUpdates() - NSLog("Accelaration Updates Status - Stopped") - } - - /* - * stopGyroUpdates - * - * Discussion: - * Stops gyro updates. - */ - func stopGyroUpdates(){ - self.manager.stopGyroUpdates() - NSLog("Gyroscope Updates Status - Stopped") - } - - /* - * stopDeviceMotionUpdates - * - * Discussion: - * Stops device motion updates. - */ - func stopDeviceMotionUpdates() { - self.manager.stopDeviceMotionUpdates() - NSLog("Device Motion Updates Status - Stopped") - } - - /* - * stopMagnetometerUpdates - * - * Discussion: - * Stops magnetometer updates. - */ - @availability(iOS, introduced=5.0) - func stopmagnetometerUpdates() { - self.manager.stopMagnetometerUpdates() - NSLog("Magnetometer Updates Status - Stopped") - } - -} \ No newline at end of file diff --git a/MotionKit.xcodeproj/project.pbxproj b/MotionKit.xcodeproj/project.pbxproj index f9980c2..478b497 100644 --- a/MotionKit.xcodeproj/project.pbxproj +++ b/MotionKit.xcodeproj/project.pbxproj @@ -7,126 +7,76 @@ objects = { /* Begin PBXBuildFile section */ - 75FDED5B1A9541F800283A97 /* MotionKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 75FDED5A1A9541F800283A97 /* MotionKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 75FDED611A9541F800283A97 /* MotionKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75FDED551A9541F800283A97 /* MotionKit.framework */; }; - 75FDED681A9541F800283A97 /* MotionKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FDED671A9541F800283A97 /* MotionKitTests.swift */; }; - 75FDED721A95422200283A97 /* MotionKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75FDED711A95422200283A97 /* MotionKit.swift */; }; + 4829612B1D9FC4B000199FC3 /* MotionKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 482961291D9FC4B000199FC3 /* MotionKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 482961301D9FC4E000199FC3 /* MotionKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4829612F1D9FC4E000199FC3 /* MotionKit.swift */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 75FDED621A9541F800283A97 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 75FDED4C1A9541F800283A97 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 75FDED541A9541F800283A97; - remoteInfo = MotionKit; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ - 75FDED551A9541F800283A97 /* MotionKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MotionKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 75FDED591A9541F800283A97 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 75FDED5A1A9541F800283A97 /* MotionKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MotionKit.h; sourceTree = ""; }; - 75FDED601A9541F800283A97 /* MotionKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MotionKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 75FDED661A9541F800283A97 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 75FDED671A9541F800283A97 /* MotionKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MotionKitTests.swift; sourceTree = ""; }; - 75FDED711A95422200283A97 /* MotionKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionKit.swift; sourceTree = ""; }; + 482961261D9FC4B000199FC3 /* MotionKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MotionKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 482961291D9FC4B000199FC3 /* MotionKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MotionKit.h; sourceTree = ""; }; + 4829612A1D9FC4B000199FC3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4829612F1D9FC4E000199FC3 /* MotionKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MotionKit.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 75FDED511A9541F800283A97 /* Frameworks */ = { + 482961221D9FC4B000199FC3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 75FDED5D1A9541F800283A97 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDED611A9541F800283A97 /* MotionKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 75FDED4B1A9541F800283A97 = { + 4829611A1D9FC3C800199FC3 = { isa = PBXGroup; children = ( - 75FDED571A9541F800283A97 /* MotionKit */, - 75FDED641A9541F800283A97 /* MotionKitTests */, - 75FDED561A9541F800283A97 /* Products */, + 482961281D9FC4B000199FC3 /* MotionKit */, + 482961271D9FC4B000199FC3 /* Products */, ); sourceTree = ""; }; - 75FDED561A9541F800283A97 /* Products */ = { + 482961271D9FC4B000199FC3 /* Products */ = { isa = PBXGroup; children = ( - 75FDED551A9541F800283A97 /* MotionKit.framework */, - 75FDED601A9541F800283A97 /* MotionKitTests.xctest */, + 482961261D9FC4B000199FC3 /* MotionKit.framework */, ); name = Products; sourceTree = ""; }; - 75FDED571A9541F800283A97 /* MotionKit */ = { + 482961281D9FC4B000199FC3 /* MotionKit */ = { isa = PBXGroup; children = ( - 75FDED5A1A9541F800283A97 /* MotionKit.h */, - 75FDED711A95422200283A97 /* MotionKit.swift */, - 75FDED581A9541F800283A97 /* Supporting Files */, + 482961291D9FC4B000199FC3 /* MotionKit.h */, + 4829612A1D9FC4B000199FC3 /* Info.plist */, + 4829612F1D9FC4E000199FC3 /* MotionKit.swift */, ); path = MotionKit; sourceTree = ""; }; - 75FDED581A9541F800283A97 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 75FDED591A9541F800283A97 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 75FDED641A9541F800283A97 /* MotionKitTests */ = { - isa = PBXGroup; - children = ( - 75FDED671A9541F800283A97 /* MotionKitTests.swift */, - 75FDED651A9541F800283A97 /* Supporting Files */, - ); - path = MotionKitTests; - sourceTree = ""; - }; - 75FDED651A9541F800283A97 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 75FDED661A9541F800283A97 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 75FDED521A9541F800283A97 /* Headers */ = { + 482961231D9FC4B000199FC3 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 75FDED5B1A9541F800283A97 /* MotionKit.h in Headers */, + 4829612B1D9FC4B000199FC3 /* MotionKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 75FDED541A9541F800283A97 /* MotionKit */ = { + 482961251D9FC4B000199FC3 /* MotionKit */ = { isa = PBXNativeTarget; - buildConfigurationList = 75FDED6B1A9541F800283A97 /* Build configuration list for PBXNativeTarget "MotionKit" */; + buildConfigurationList = 4829612C1D9FC4B000199FC3 /* Build configuration list for PBXNativeTarget "MotionKit" */; buildPhases = ( - 75FDED501A9541F800283A97 /* Sources */, - 75FDED511A9541F800283A97 /* Frameworks */, - 75FDED521A9541F800283A97 /* Headers */, - 75FDED531A9541F800283A97 /* Resources */, + 482961211D9FC4B000199FC3 /* Sources */, + 482961221D9FC4B000199FC3 /* Frameworks */, + 482961231D9FC4B000199FC3 /* Headers */, + 482961241D9FC4B000199FC3 /* Resources */, ); buildRules = ( ); @@ -134,71 +84,43 @@ ); name = MotionKit; productName = MotionKit; - productReference = 75FDED551A9541F800283A97 /* MotionKit.framework */; + productReference = 482961261D9FC4B000199FC3 /* MotionKit.framework */; productType = "com.apple.product-type.framework"; }; - 75FDED5F1A9541F800283A97 /* MotionKitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 75FDED6E1A9541F800283A97 /* Build configuration list for PBXNativeTarget "MotionKitTests" */; - buildPhases = ( - 75FDED5C1A9541F800283A97 /* Sources */, - 75FDED5D1A9541F800283A97 /* Frameworks */, - 75FDED5E1A9541F800283A97 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 75FDED631A9541F800283A97 /* PBXTargetDependency */, - ); - name = MotionKitTests; - productName = MotionKitTests; - productReference = 75FDED601A9541F800283A97 /* MotionKitTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 75FDED4C1A9541F800283A97 /* Project object */ = { + 4829611B1D9FC3C800199FC3 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = MotionKit; + LastUpgradeCheck = 0800; TargetAttributes = { - 75FDED541A9541F800283A97 = { - CreatedOnToolsVersion = 6.1.1; - }; - 75FDED5F1A9541F800283A97 = { - CreatedOnToolsVersion = 6.1.1; + 482961251D9FC4B000199FC3 = { + CreatedOnToolsVersion = 8.0; + LastSwiftMigration = 0800; + ProvisioningStyle = Automatic; }; }; }; - buildConfigurationList = 75FDED4F1A9541F800283A97 /* Build configuration list for PBXProject "MotionKit" */; + buildConfigurationList = 4829611E1D9FC3C800199FC3 /* Build configuration list for PBXProject "MotionKit" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 75FDED4B1A9541F800283A97; - productRefGroup = 75FDED561A9541F800283A97 /* Products */; + mainGroup = 4829611A1D9FC3C800199FC3; + productRefGroup = 482961271D9FC4B000199FC3 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 75FDED541A9541F800283A97 /* MotionKit */, - 75FDED5F1A9541F800283A97 /* MotionKitTests */, + 482961251D9FC4B000199FC3 /* MotionKit */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 75FDED531A9541F800283A97 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75FDED5E1A9541F800283A97 /* Resources */ = { + 482961241D9FC4B000199FC3 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -208,37 +130,36 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 75FDED501A9541F800283A97 /* Sources */ = { + 482961211D9FC4B000199FC3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 75FDED721A95422200283A97 /* MotionKit.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75FDED5C1A9541F800283A97 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 75FDED681A9541F800283A97 /* MotionKitTests.swift in Sources */, + 482961301D9FC4E000199FC3 /* MotionKit.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 75FDED631A9541F800283A97 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 75FDED541A9541F800283A97 /* MotionKit */; - targetProxy = 75FDED621A9541F800283A97 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ - 75FDED691A9541F800283A97 /* Debug */ = { + 4829611F1D9FC3C800199FC3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + }; + name = Debug; + }; + 482961201D9FC3C800199FC3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + IPHONEOS_DEPLOYMENT_TARGET = 8.1; + }; + name = Release; + }; + 4829612D1D9FC4B000199FC3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -246,45 +167,63 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + INFOPLIST_FILE = MotionKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.MotionKit; + PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 75FDED6A1A9541F800283A97 /* Release */ = { + 4829612E1D9FC4B000199FC3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -292,27 +231,44 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + INFOPLIST_FILE = MotionKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.MotionKit; + PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -320,95 +276,28 @@ }; name = Release; }; - 75FDED6C1A9541F800283A97 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = MotionKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 75FDED6D1A9541F800283A97 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = MotionKit/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 75FDED6F1A9541F800283A97 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = MotionKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 75FDED701A9541F800283A97 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = MotionKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 75FDED4F1A9541F800283A97 /* Build configuration list for PBXProject "MotionKit" */ = { + 4829611E1D9FC3C800199FC3 /* Build configuration list for PBXProject "MotionKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - 75FDED691A9541F800283A97 /* Debug */, - 75FDED6A1A9541F800283A97 /* Release */, + 4829611F1D9FC3C800199FC3 /* Debug */, + 482961201D9FC3C800199FC3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 75FDED6B1A9541F800283A97 /* Build configuration list for PBXNativeTarget "MotionKit" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 75FDED6C1A9541F800283A97 /* Debug */, - 75FDED6D1A9541F800283A97 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; - 75FDED6E1A9541F800283A97 /* Build configuration list for PBXNativeTarget "MotionKitTests" */ = { + 4829612C1D9FC4B000199FC3 /* Build configuration list for PBXNativeTarget "MotionKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - 75FDED6F1A9541F800283A97 /* Debug */, - 75FDED701A9541F800283A97 /* Release */, + 4829612D1D9FC4B000199FC3 /* Debug */, + 4829612E1D9FC4B000199FC3 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 75FDED4C1A9541F800283A97 /* Project object */; + rootObject = 4829611B1D9FC3C800199FC3 /* Project object */; } diff --git a/MotionKit.xcodeproj/project.xcworkspace/xcshareddata/MotionKit.xccheckout b/MotionKit.xcodeproj/project.xcworkspace/xcshareddata/MotionKit.xccheckout deleted file mode 100644 index bda6749..0000000 --- a/MotionKit.xcodeproj/project.xcworkspace/xcshareddata/MotionKit.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - B2C25DDE-3EBB-4B73-A6E7-0C6873FBEC2C - IDESourceControlProjectName - MotionKit - IDESourceControlProjectOriginsDictionary - - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - https://github.com/MHaroonBaig/MotionKit.git - - IDESourceControlProjectPath - MotionKit.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - ../.. - - IDESourceControlProjectURL - https://github.com/MHaroonBaig/MotionKit.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 0AD0CF4CC579879FDDE65582CCF9532E9A9D1D6E - IDESourceControlWCCName - MotionKit - - - - diff --git a/MotionKit.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate b/MotionKit.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index f7dcdd3..0000000 Binary files a/MotionKit.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/Pods-MotionKit.xcscheme b/MotionKit.xcodeproj/xcshareddata/xcschemes/MotionKit.xcscheme similarity index 60% rename from Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/Pods-MotionKit.xcscheme rename to MotionKit.xcodeproj/xcshareddata/xcschemes/MotionKit.xcscheme index 3608b3a..4dd12ac 100644 --- a/Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/Pods-MotionKit.xcscheme +++ b/MotionKit.xcodeproj/xcshareddata/xcschemes/MotionKit.xcscheme @@ -1,6 +1,6 @@ + BlueprintName = "MotionKit" + ReferencedContainer = "container:MotionKit.xcodeproj"> + shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + + + + + + diff --git a/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/MotionKit.xcscheme b/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/MotionKit.xcscheme deleted file mode 100644 index 09efd47..0000000 --- a/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/MotionKit.xcscheme +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist b/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index d78602b..0000000 --- a/MotionKit.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SchemeUserState - - MotionKit.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 75FDED541A9541F800283A97 - - primary - - - 75FDED5F1A9541F800283A97 - - primary - - - - - diff --git a/MotionKit/Info.plist b/MotionKit/Info.plist index c328732..fbe1e6b 100644 --- a/MotionKit/Info.plist +++ b/MotionKit/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.motionkit.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -16,8 +16,6 @@ FMWK CFBundleShortVersionString 1.0 - CFBundleSignature - ???? CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/MotionKit/MotionKit.h b/MotionKit/MotionKit.h index 3feca5b..e6256ec 100644 --- a/MotionKit/MotionKit.h +++ b/MotionKit/MotionKit.h @@ -2,8 +2,8 @@ // MotionKit.h // MotionKit // -// Created by Haroon on 19/02/2015. -// Copyright (c) 2015 MotionKit. All rights reserved. +// Created by Pawel Kania on 01/10/2016. +// // #import diff --git a/MotionKit/MotionKit.swift b/MotionKit/MotionKit.swift index eb0860c..33a33e7 100644 --- a/MotionKit/MotionKit.swift +++ b/MotionKit/MotionKit.swift @@ -3,11 +3,13 @@ // MotionKit // // Created by Haroon on 14/02/2015. -// Launched under the Creative Commons License. You're free to use MotionKit. +// Launched under the Creative Commons License. You're free to use MotionKit. // // The original Github repository is https://github.com/MHaroonBaig/MotionKit // The official blog post and documentation is https://medium.com/@PyBaig/motionkit-the-missing-ios-coremotion-wrapper-written-in-swift-99fcb83355d0 // +// Modified by Yang Liu on 21/09/2016 +// import Foundation import CoreMotion @@ -15,34 +17,34 @@ import CoreMotion //_______________________________________________________________________________________________________________ // this helps retrieve values from the sensors. @objc protocol MotionKitDelegate { - optional func retrieveAccelerometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveGyroscopeValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveDeviceMotionObject (deviceMotion: CMDeviceMotion) - optional func retrieveMagnetometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - - optional func getAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getGravityAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getRotationRateFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getMagneticFieldFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getAttitudeFromDeviceMotion (attitude: CMAttitude) + @objc optional func retrieveAccelerometerValues (_ x: Double, y:Double, z:Double, absoluteValue: Double) + @objc optional func retrieveGyroscopeValues (_ x: Double, y:Double, z:Double, absoluteValue: Double) + @objc optional func retrieveDeviceMotionObject (_ deviceMotion: CMDeviceMotion) + @objc optional func retrieveMagnetometerValues (_ x: Double, y:Double, z:Double, absoluteValue: Double) + + @objc optional func getAccelerationValFromDeviceMotion (_ x: Double, y:Double, z:Double) + @objc optional func getGravityAccelerationValFromDeviceMotion (_ x: Double, y:Double, z:Double) + @objc optional func getRotationRateFromDeviceMotion (_ x: Double, y:Double, z:Double) + @objc optional func getMagneticFieldFromDeviceMotion (_ x: Double, y:Double, z:Double) + @objc optional func getAttitudeFromDeviceMotion (_ attitude: CMAttitude) } -@objc(MotionKit) public class MotionKit :NSObject{ - +@objc(MotionKit) open class MotionKit :NSObject{ + let manager = CMMotionManager() var delegate: MotionKitDelegate? - + /* - * init:void: + * init:void: * * Discussion: * Initialises the MotionKit class and throw a Log with a timestamp. */ public override init(){ - NSLog("MotionKit has been initialised successfully") + print("MotionKit has been initialised successfully") } - + /* * getAccelerometerValues:interval:values: * @@ -52,33 +54,33 @@ import CoreMotion * given NSOperationQueue will be cancelled. You can access the retrieved values either by a * Trailing Closure or through a Delgate. */ - public func getAccelerometerValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y: Double, z: Double) -> ())? ){ + open func getAccelerometerValues (_ interval: TimeInterval = 0.1, values: ((_ x: Double, _ y: Double, _ z: Double) -> ())? ){ var valX: Double! var valY: Double! var valZ: Double! - if manager.accelerometerAvailable { + if manager.isAccelerometerAvailable { manager.accelerometerUpdateInterval = interval - manager.startAccelerometerUpdatesToQueue(NSOperationQueue(), withHandler: { + manager.startAccelerometerUpdates(to: OperationQueue(), withHandler: { (data, error) in - - if let isError = error { - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } valX = data!.acceleration.x valY = data!.acceleration.y valZ = data!.acceleration.z - - if values != nil{ - values!(x: valX,y: valY,z: valZ) + + if values != nil { + values!(valX, valY, valZ) } - let absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) + let absoluteVal = sqrt(Double(valX * valX + valY * valY) + valZ * valZ) self.delegate?.retrieveAccelerometerValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) }) } else { - NSLog("The Accelerometer is not available") + print("The Accelerometer is not available") } } - + /* * getGyroValues:interval:values: * @@ -88,35 +90,35 @@ import CoreMotion * given NSOperationQueue will be cancelled. You can access the retrieved values either by a * Trailing Closure or through a Delegate. */ - public func getGyroValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y: Double, z:Double) -> ())? ) { - + open func getGyroValues (_ interval: TimeInterval = 0.1, values: ((_ x: Double, _ y: Double, _ z:Double) -> ())? ) { + var valX: Double! var valY: Double! var valZ: Double! - if manager.gyroAvailable{ + if manager.isGyroAvailable{ manager.gyroUpdateInterval = interval - manager.startGyroUpdatesToQueue(NSOperationQueue(), withHandler: { + manager.startGyroUpdates(to: OperationQueue(), withHandler: { (data, error) in - - if let isError = error{ - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } valX = data!.rotationRate.x valY = data!.rotationRate.y valZ = data!.rotationRate.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) + + if values != nil { + values!(valX, valY, valZ) } - let absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) + let absoluteVal = sqrt(Double(valX * valX + valY * valY) + valZ * valZ) self.delegate?.retrieveGyroscopeValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) }) - + } else { - NSLog("The Gyroscope is not available") + print("The Gyroscope is not available") } } - + /* * getMagnetometerValues:interval:values: * @@ -124,38 +126,38 @@ import CoreMotion * Starts magnetometer updates, providing data to the given handler through the given queue. * You can access the retrieved values either by a Trailing Closure or through a Delegate. */ - @available(iOS, introduced=5.0) - public func getMagnetometerValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y:Double, z:Double) -> ())? ){ - + @available(iOS, introduced: 5.0) + open func getMagnetometerValues (_ interval: TimeInterval = 0.1, values: ((_ x: Double, _ y:Double, _ z:Double) -> ())? ){ + var valX: Double! var valY: Double! var valZ: Double! - if manager.magnetometerAvailable { + if manager.isMagnetometerAvailable { manager.magnetometerUpdateInterval = interval - manager.startMagnetometerUpdatesToQueue(NSOperationQueue()){ + manager.startMagnetometerUpdates(to: OperationQueue()){ (data, error) in - - if let isError = error{ - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } valX = data!.magneticField.x valY = data!.magneticField.y valZ = data!.magneticField.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) + + if values != nil { + values!(valX, valY, valZ) } - let absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) + let absoluteVal = sqrt(Double(valX * valX + valY * valY) + valZ * valZ) self.delegate?.retrieveMagnetometerValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) } - + } else { - NSLog("Magnetometer is not available") + print("Magnetometer is not available") } } - + /* MARK :- DEVICE MOTION APPROACH STARTS HERE */ - + /* * getDeviceMotionValues:interval:values: * @@ -165,289 +167,288 @@ import CoreMotion * attitudeReferenceFrame to determine this. You can access the retrieved values either by a * Trailing Closure or through a Delegate. */ - public func getDeviceMotionObject (interval: NSTimeInterval = 0.1, values: ((deviceMotion: CMDeviceMotion) -> ())? ) { - - if manager.deviceMotionAvailable{ + open func getDeviceMotionObject (_ interval: TimeInterval = 0.1, values: ((_ deviceMotion: CMDeviceMotion) -> ())? ) { + + if manager.isDeviceMotionAvailable{ manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ + manager.startDeviceMotionUpdates(to: OperationQueue()){ (data, error) in - - if let isError = error{ - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } - if values != nil{ - values!(deviceMotion: data!) + if values != nil { + values!(data!) } self.delegate?.retrieveDeviceMotionObject!(data!) } - + } else { - NSLog("Device Motion is not available") + print("Device Motion is not available") } } - - + + /* * getAccelerationFromDeviceMotion:interval:values: * You can retrieve the processed user accelaration data from the device motion from this method. */ - public func getAccelerationFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - + open func getAccelerationFromDeviceMotion (_ interval: TimeInterval = 0.1, values: ((_ x:Double, _ y:Double, _ z:Double) -> ())? ) { + var valX: Double! var valY: Double! var valZ: Double! - if manager.deviceMotionAvailable{ + if manager.isDeviceMotionAvailable{ manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ + manager.startDeviceMotionUpdates(to: OperationQueue()){ (data, error) in - - if let isError = error{ - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } valX = data!.userAcceleration.x valY = data!.userAcceleration.y valZ = data!.userAcceleration.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) + + if values != nil { + values!(valX, valY, valZ) } - + self.delegate?.getAccelerationValFromDeviceMotion!(valX, y: valY, z: valZ) } - + } else { - NSLog("Device Motion is unavailable") + print("Device Motion is unavailable") } } - + /* * getGravityAccelerationFromDeviceMotion:interval:values: * You can retrieve the processed gravitational accelaration data from the device motion from this * method. */ - public func getGravityAccelerationFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - + open func getGravityAccelerationFromDeviceMotion (_ interval: TimeInterval = 0.1, values: ((_ x:Double, _ y:Double, _ z:Double) -> ())? ) { + var valX: Double! var valY: Double! var valZ: Double! - if manager.deviceMotionAvailable{ + if manager.isDeviceMotionAvailable{ manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ + manager.startDeviceMotionUpdates(to: OperationQueue()){ (data, error) in - - if let isError = error{ - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } valX = data!.gravity.x valY = data!.gravity.y valZ = data!.gravity.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) + + if values != nil { + values!(valX, valY, valZ) } - - let absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) + +// let absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) self.delegate?.getGravityAccelerationValFromDeviceMotion!(valX, y: valY, z: valZ) } - + } else { - NSLog("Device Motion is not available") + print("Device Motion is not available") } } - - + + /* * getAttitudeFromDeviceMotion:interval:values: * You can retrieve the processed attitude data from the device motion from this * method. */ - public func getAttitudeFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((attitude: CMAttitude) -> ())? ) { - - if manager.deviceMotionAvailable{ + open func getAttitudeFromDeviceMotion (_ interval: TimeInterval = 0.1, values: ((_ attitude: CMAttitude) -> ())? ) { + + if manager.isDeviceMotionAvailable{ manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ + manager.startDeviceMotionUpdates(to: OperationQueue()){ (data, error) in - - if let isError = error{ - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } - if values != nil{ - values!(attitude: data!.attitude) + if values != nil { + values!(data!.attitude) } - + self.delegate?.getAttitudeFromDeviceMotion!(data!.attitude) } - + } else { - NSLog("Device Motion is not available") + print("Device Motion is not available") } } - + /* * getRotationRateFromDeviceMotion:interval:values: * You can retrieve the processed rotation data from the device motion from this * method. */ - public func getRotationRateFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - + open func getRotationRateFromDeviceMotion (_ interval: TimeInterval = 0.1, values: ((_ x:Double, _ y:Double, _ z:Double) -> ())? ) { + var valX: Double! var valY: Double! var valZ: Double! - if manager.deviceMotionAvailable{ + if manager.isDeviceMotionAvailable{ manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ + manager.startDeviceMotionUpdates(to: OperationQueue()){ (data, error) in - - if let isError = error{ - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } valX = data!.rotationRate.x valY = data!.rotationRate.y valZ = data!.rotationRate.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) + + if values != nil { + values!(valX, valY, valZ) } - - let absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) + +// let absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) self.delegate?.getRotationRateFromDeviceMotion!(valX, y: valY, z: valZ) } - + } else { - NSLog("Device Motion is not available") + print("Device Motion is not available") } } - - + + /* * getMagneticFieldFromDeviceMotion:interval:values: * You can retrieve the processed magnetic field data from the device motion from this * method. */ - public func getMagneticFieldFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double, accuracy: Int32) -> ())? ) { - + open func getMagneticFieldFromDeviceMotion (_ interval: TimeInterval = 0.1, values: ((_ x:Double, _ y:Double, _ z:Double, _ accuracy: Int32) -> ())? ) { + var valX: Double! var valY: Double! var valZ: Double! var valAccuracy: Int32! - if manager.deviceMotionAvailable{ + if manager.isDeviceMotionAvailable{ manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ + manager.startDeviceMotionUpdates(to: OperationQueue()){ (data, error) in - - if let isError = error{ - NSLog("Error: %@", isError) + + if error != nil { + print("Error: %@", error) } valX = data!.magneticField.field.x valY = data!.magneticField.field.y valZ = data!.magneticField.field.z valAccuracy = data!.magneticField.accuracy.rawValue - - if values != nil{ - values!(x: valX, y: valY, z: valZ, accuracy: valAccuracy) + + if values != nil { + values!(valX, valY, valZ, valAccuracy) } - + self.delegate?.getMagneticFieldFromDeviceMotion!(valX, y: valY, z: valZ) } - + } else { - NSLog("Device Motion is not available") + print("Device Motion is not available") } } - + /* MARK :- DEVICE MOTION APPROACH ENDS HERE */ - - + + /* * From the methods hereafter, the sensor values could be retrieved at * a particular instant, whenever needed, through a trailing closure. */ - + /* MARK :- INSTANTANIOUS METHODS START HERE */ - - public func getAccelerationAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ + + open func getAccelerationAtCurrentInstant (_ values: @escaping (_ x:Double, _ y:Double, _ z:Double) -> ()){ self.getAccelerationFromDeviceMotion(0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) + values(x, y, z) self.stopDeviceMotionUpdates() } } - - public func getGravitationalAccelerationAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ + + open func getGravitationalAccelerationAtCurrentInstant (_ values: @escaping (_ x:Double, _ y:Double, _ z:Double) -> ()){ self.getGravityAccelerationFromDeviceMotion(0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) + values(x, y, z) self.stopDeviceMotionUpdates() } } - - public func getAttitudeAtCurrentInstant (values: (attitude: CMAttitude) -> ()){ + + open func getAttitudeAtCurrentInstant (_ values: @escaping (_ attitude: CMAttitude) -> ()){ self.getAttitudeFromDeviceMotion(0.5) { (attitude) -> () in - values(attitude: attitude) + values(attitude) self.stopDeviceMotionUpdates() } - } - - public func getMageticFieldAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ + + open func getMageticFieldAtCurrentInstant (_ values: @escaping (_ x:Double, _ y:Double, _ z:Double) -> ()){ self.getMagneticFieldFromDeviceMotion(0.5) { (x, y, z, accuracy) -> () in - values(x: x,y: y,z: z) + values(x, y, z) self.stopDeviceMotionUpdates() } } - - public func getGyroValuesAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ + + open func getGyroValuesAtCurrentInstant (_ values: @escaping (_ x:Double, _ y:Double, _ z:Double) -> ()){ self.getRotationRateFromDeviceMotion(0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) + values(x, y, z) self.stopDeviceMotionUpdates() } } - + /* MARK :- INSTANTANIOUS METHODS END HERE */ - - - + + + /* * stopAccelerometerUpdates * * Discussion: * Stop accelerometer updates. */ - public func stopAccelerometerUpdates(){ + open func stopAccelerometerUpdates(){ self.manager.stopAccelerometerUpdates() - NSLog("Accelaration Updates Status - Stopped") + print("Accelaration Updates Status - Stopped") } - + /* * stopGyroUpdates * * Discussion: * Stops gyro updates. */ - public func stopGyroUpdates(){ + open func stopGyroUpdates(){ self.manager.stopGyroUpdates() - NSLog("Gyroscope Updates Status - Stopped") + print("Gyroscope Updates Status - Stopped") } - + /* * stopDeviceMotionUpdates * * Discussion: * Stops device motion updates. */ - public func stopDeviceMotionUpdates() { + open func stopDeviceMotionUpdates() { self.manager.stopDeviceMotionUpdates() - NSLog("Device Motion Updates Status - Stopped") + print("Device Motion Updates Status - Stopped") } - + /* * stopMagnetometerUpdates * * Discussion: * Stops magnetometer updates. */ - @available(iOS, introduced=5.0) - public func stopmagnetometerUpdates() { + @available(iOS, introduced: 5.0) + open func stopmagnetometerUpdates() { self.manager.stopMagnetometerUpdates() - NSLog("Magnetometer Updates Status - Stopped") + print("Magnetometer Updates Status - Stopped") } - + } diff --git a/MotionKitTests/Info.plist b/MotionKitTests/Info.plist deleted file mode 100644 index 0e76198..0000000 --- a/MotionKitTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.motionkit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/MotionKitTests/MotionKitTests.swift b/MotionKitTests/MotionKitTests.swift deleted file mode 100644 index d78e1e7..0000000 --- a/MotionKitTests/MotionKitTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// MotionKitTests.swift -// MotionKitTests -// -// Created by Haroon on 19/02/2015. -// Copyright (c) 2015 MotionKit. All rights reserved. -// - -import UIKit -import XCTest - -class MotionKitTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measureBlock() { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/Objective-C example/test/Podfile.lock b/Objective-C example/test/Podfile.lock deleted file mode 100644 index a1cc0ed..0000000 --- a/Objective-C example/test/Podfile.lock +++ /dev/null @@ -1,19 +0,0 @@ -PODS: - - MotionKit (0.7) - -DEPENDENCIES: - - MotionKit (from `https://github.com/MHaroonBaig/MotionKit.git`) - -EXTERNAL SOURCES: - MotionKit: - :git: https://github.com/MHaroonBaig/MotionKit.git - -CHECKOUT OPTIONS: - MotionKit: - :commit: 70238a68f16ec55082f8779a4365f69cd7af2f24 - :git: https://github.com/MHaroonBaig/MotionKit.git - -SPEC CHECKSUMS: - MotionKit: 05f62b8cf0ff804a2ee0fc968ef244ba0810e73b - -COCOAPODS: 0.36.0.beta.2 diff --git a/Objective-C example/test/Pods/Local Podspecs/MotionKit.podspec.json b/Objective-C example/test/Pods/Local Podspecs/MotionKit.podspec.json deleted file mode 100644 index 8afd89f..0000000 --- a/Objective-C example/test/Pods/Local Podspecs/MotionKit.podspec.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "MotionKit", - "version": "0.7", - "license": "MIT", - "summary": "CoreMotion Made insanely simple", - "homepage": "https://github.com/MHaroonBaig/MotionKit", - "social_media_url": "https://twitter.com/PyBaig", - "authors": { - "Haroon Baig": "haroon.prog@gmail.com" - }, - "source": { - "git": "https://github.com/MHaroonBaig/MotionKit.git", - "tag": "0.7" - }, - "platforms": { - "ios": "8.0" - }, - "source_files": "MotionKit/*.swift", - "requires_arc": true -} diff --git a/Objective-C example/test/Pods/Manifest.lock b/Objective-C example/test/Pods/Manifest.lock deleted file mode 100644 index a1cc0ed..0000000 --- a/Objective-C example/test/Pods/Manifest.lock +++ /dev/null @@ -1,19 +0,0 @@ -PODS: - - MotionKit (0.7) - -DEPENDENCIES: - - MotionKit (from `https://github.com/MHaroonBaig/MotionKit.git`) - -EXTERNAL SOURCES: - MotionKit: - :git: https://github.com/MHaroonBaig/MotionKit.git - -CHECKOUT OPTIONS: - MotionKit: - :commit: 70238a68f16ec55082f8779a4365f69cd7af2f24 - :git: https://github.com/MHaroonBaig/MotionKit.git - -SPEC CHECKSUMS: - MotionKit: 05f62b8cf0ff804a2ee0fc968ef244ba0810e73b - -COCOAPODS: 0.36.0.beta.2 diff --git a/Objective-C example/test/Pods/MotionKit/LICENSE b/Objective-C example/test/Pods/MotionKit/LICENSE deleted file mode 100644 index f7daeed..0000000 --- a/Objective-C example/test/Pods/MotionKit/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 MotionKit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Objective-C example/test/Pods/MotionKit/MotionKit/MotionKit.swift b/Objective-C example/test/Pods/MotionKit/MotionKit/MotionKit.swift deleted file mode 100644 index 61f19b0..0000000 --- a/Objective-C example/test/Pods/MotionKit/MotionKit/MotionKit.swift +++ /dev/null @@ -1,456 +0,0 @@ -// -// MotionKit.swift -// MotionKit -// -// Created by Haroon on 14/02/2015. -// Launched under the Creative Commons License. You're free to use MotionKit. -// -// The original Github repository is https://github.com/MHaroonBaig/MotionKit -// The official blog post and documentation is https://medium.com/@PyBaig/motionkit-the-missing-ios-coremotion-wrapper-written-in-swift-99fcb83355d0 -// - -import Foundation -import CoreMotion - -//_______________________________________________________________________________________________________________ -// this helps retrieve values from the sensors. -@objc protocol MotionKitDelegate { - optional func retrieveAccelerometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveGyroscopeValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveDeviceMotionObject (deviceMotion: CMDeviceMotion) - optional func retrieveMagnetometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - - optional func getAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getGravityAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getRotationRateFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getMagneticFieldFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getAttitudeFromDeviceMotion (attitude: CMAttitude) -} - - -@objc(MotionKit) public class MotionKit { - - let manager = CMMotionManager() - var delegate: MotionKitDelegate? - - /* - * init:void: - * - * Discussion: - * Initialises the MotionKit class and throw a Log with a timestamp. - */ - public init(){ - NSLog("MotionKit has been initialised successfully") - } - - /* - * getAccelerometerValues:interval:values: - * - * Discussion: - * Starts accelerometer updates, providing data to the given handler through the given queue. - * Note that when the updates are stopped, all operations in the - * given NSOperationQueue will be cancelled. You can access the retrieved values either by a - * Trailing Closure or through a Delgate. - */ - public func getAccelerometerValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y: Double, z: Double) -> ())? ){ - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.accelerometerAvailable { - manager.accelerometerUpdateInterval = interval - manager.startAccelerometerUpdatesToQueue(NSOperationQueue()) { - (data: CMAccelerometerData!, error: NSError!) in - - if let isError = error { - NSLog("Error: %@", isError) - } - valX = data.acceleration.x - valY = data.acceleration.y - valZ = data.acceleration.z - - if values != nil{ - values!(x: valX,y: valY,z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveAccelerometerValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("The Accelerometer is not available") - } - } - - /* - * getGyroValues:interval:values: - * - * Discussion: - * Starts gyro updates, providing data to the given handler through the given queue. - * Note that when the updates are stopped, all operations in the - * given NSOperationQueue will be cancelled. You can access the retrieved values either by a - * Trailing Closure or through a Delegate. - */ - public func getGyroValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y: Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.gyroAvailable{ - manager.gyroUpdateInterval = interval - manager.startGyroUpdatesToQueue(NSOperationQueue()) { - (data: CMGyroData!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.rotationRate.x - valY = data.rotationRate.y - valZ = data.rotationRate.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveGyroscopeValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("The Gyroscope is not available") - } - } - - /* - * getMagnetometerValues:interval:values: - * - * Discussion: - * Starts magnetometer updates, providing data to the given handler through the given queue. - * You can access the retrieved values either by a Trailing Closure or through a Delegate. - */ - @availability(iOS, introduced=5.0) - public func getMagnetometerValues (interval: NSTimeInterval = 0.1, values: ((x: Double, y:Double, z:Double) -> ())? ){ - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.magnetometerAvailable { - manager.magnetometerUpdateInterval = interval - manager.startMagnetometerUpdatesToQueue(NSOperationQueue()){ - (data: CMMagnetometerData!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.magneticField.x - valY = data.magneticField.y - valZ = data.magneticField.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.retrieveMagnetometerValues!(valX, y: valY, z: valZ, absoluteValue: absoluteVal) - } - - } else { - NSLog("Magnetometer is not available") - } - } - - /* MARK :- DEVICE MOTION APPROACH STARTS HERE */ - - /* - * getDeviceMotionValues:interval:values: - * - * Discussion: - * Starts device motion updates, providing data to the given handler through the given queue. - * Uses the default reference frame for the device. Examine CMMotionManager's - * attitudeReferenceFrame to determine this. You can access the retrieved values either by a - * Trailing Closure or through a Delegate. - */ - public func getDeviceMotionObject (interval: NSTimeInterval = 0.1, values: ((deviceMotion: CMDeviceMotion) -> ())? ) { - - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - if values != nil{ - values!(deviceMotion: data) - } - self.delegate?.retrieveDeviceMotionObject!(data) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getAccelerationFromDeviceMotion:interval:values: - * You can retrieve the processed user accelaration data from the device motion from this method. - */ - public func getAccelerationFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.userAcceleration.x - valY = data.userAcceleration.y - valZ = data.userAcceleration.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - self.delegate?.getAccelerationValFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is unavailable") - } - } - - /* - * getGravityAccelerationFromDeviceMotion:interval:values: - * You can retrieve the processed gravitational accelaration data from the device motion from this - * method. - */ - public func getGravityAccelerationFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.gravity.x - valY = data.gravity.y - valZ = data.gravity.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.getGravityAccelerationValFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getAttitudeFromDeviceMotion:interval:values: - * You can retrieve the processed attitude data from the device motion from this - * method. - */ - public func getAttitudeFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((attitude: CMAttitude) -> ())? ) { - - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - if values != nil{ - values!(attitude: data.attitude) - } - - self.delegate?.getAttitudeFromDeviceMotion!(data.attitude) - } - - } else { - NSLog("Device Motion is not available") - } - } - - /* - * getRotationRateFromDeviceMotion:interval:values: - * You can retrieve the processed rotation data from the device motion from this - * method. - */ - public func getRotationRateFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.rotationRate.x - valY = data.rotationRate.y - valZ = data.rotationRate.z - - if values != nil{ - values!(x: valX, y: valY, z: valZ) - } - - var absoluteVal = sqrt(valX * valX + valY * valY + valZ * valZ) - self.delegate?.getRotationRateFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - - /* - * getMagneticFieldFromDeviceMotion:interval:values: - * You can retrieve the processed magnetic field data from the device motion from this - * method. - */ - public func getMagneticFieldFromDeviceMotion (interval: NSTimeInterval = 0.1, values: ((x:Double, y:Double, z:Double, accuracy: Int32) -> ())? ) { - - var valX: Double! - var valY: Double! - var valZ: Double! - var valAccuracy: Int32! - if manager.deviceMotionAvailable{ - manager.deviceMotionUpdateInterval = interval - manager.startDeviceMotionUpdatesToQueue(NSOperationQueue()){ - (data: CMDeviceMotion!, error: NSError!) in - - if let isError = error{ - NSLog("Error: %@", isError) - } - valX = data.magneticField.field.x - valY = data.magneticField.field.y - valZ = data.magneticField.field.z - valAccuracy = data.magneticField.accuracy.value - - - if values != nil{ - values!(x: valX, y: valY, z: valZ, accuracy: valAccuracy) - } - - self.delegate?.getMagneticFieldFromDeviceMotion!(valX, y: valY, z: valZ) - } - - } else { - NSLog("Device Motion is not available") - } - } - - /* MARK :- DEVICE MOTION APPROACH ENDS HERE */ - - - /* - * From the methods hereafter, the sensor values could be retrieved at - * a particular instant, whenever needed, through a trailing closure. - */ - - /* MARK :- INSTANTANIOUS METHODS START HERE */ - - public func getAccelerationAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getAccelerationFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - public func getGravitationalAccelerationAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getGravityAccelerationFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - public func getAttitudeAtCurrentInstant (values: (attitude: CMAttitude) -> ()){ - self.getAttitudeFromDeviceMotion(interval: 0.5) { (attitude) -> () in - values(attitude: attitude) - self.stopDeviceMotionUpdates() - } - - } - - public func getMageticFieldAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getMagneticFieldFromDeviceMotion(interval: 0.5) { (x, y, z, accuracy) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - public func getGyroValuesAtCurrentInstant (values: (x:Double, y:Double, z:Double) -> ()){ - self.getRotationRateFromDeviceMotion(interval: 0.5) { (x, y, z) -> () in - values(x: x,y: y,z: z) - self.stopDeviceMotionUpdates() - } - } - - /* MARK :- INSTANTANIOUS METHODS END HERE */ - - - - /* - * stopAccelerometerUpdates - * - * Discussion: - * Stop accelerometer updates. - */ - public func stopAccelerometerUpdates(){ - self.manager.stopAccelerometerUpdates() - NSLog("Accelaration Updates Status - Stopped") - } - - /* - * stopGyroUpdates - * - * Discussion: - * Stops gyro updates. - */ - public func stopGyroUpdates(){ - self.manager.stopGyroUpdates() - NSLog("Gyroscope Updates Status - Stopped") - } - - /* - * stopDeviceMotionUpdates - * - * Discussion: - * Stops device motion updates. - */ - public func stopDeviceMotionUpdates() { - self.manager.stopDeviceMotionUpdates() - NSLog("Device Motion Updates Status - Stopped") - } - - /* - * stopMagnetometerUpdates - * - * Discussion: - * Stops magnetometer updates. - */ - @availability(iOS, introduced=5.0) - public func stopmagnetometerUpdates() { - self.manager.stopMagnetometerUpdates() - NSLog("Magnetometer Updates Status - Stopped") - } - -} \ No newline at end of file diff --git a/Objective-C example/test/Pods/MotionKit/README.md b/Objective-C example/test/Pods/MotionKit/README.md deleted file mode 100644 index bc216a1..0000000 --- a/Objective-C example/test/Pods/MotionKit/README.md +++ /dev/null @@ -1,288 +0,0 @@ -#[MotionKit] (http://goo.gl/bpXBlO) — The missing iOS wrapper :notes: - -[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat -)](https://developer.apple.com/iphone/index.action) -[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat -)](https://developer.apple.com/swift) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Version](https://img.shields.io/cocoapods/v/MotionKit.svg?style=flat)](http://cocoadocs.org/docsets/MotionKit) -[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat -)](http://mit-license.org) -[![Issues](https://img.shields.io/github/issues/MHaroonBaig/MotionKit.svg?style=flat -)](https://github.com/MHaroonBaig/MotionKit/issues?state=open) - -Now you can grab the data from Accelerometer, Magnetometer, Gyroscope and Device Motion in a magical way, with just a Two or a few lines of code. - -A nice and clean wrapper around the **CoreMotion Framework** written entirely in Swift. The Core Motion framework lets your application receive motion data from device hardware and process that data. -The data can be retrieved from **Accelerometer**, **Gyroscope** and **Magnetometer**. -You can also get the **refined and processed gyroscope and accelerometer data** from the `deviceMotion` datatype itself instead of getting the raw values. - -**Articles accompanying MotionKit:** [Link1](https://medium.com/@PyBaig/distribute-your-swift-code-libraries-and-frameworks-using-cocoapods-b41c62cd7c94) — [Link2](https://medium.com/@PyBaig/build-your-own-cocoa-touch-frameworks-in-swift-d4ea3d1f9ca3) — [Link3](https://medium.com/@PyBaig/motionkit-the-missing-ios-coremotion-wrapper-written-in-swift-99fcb83355d0) -#How does it work -You can retrieve all the values either by a trailing closure or by a delegate method. Both the approaches are fully supported. - -*__Note:__* All the provided methods are Asynchronous and operate in their own Queue so that your app could run smoothly and efficiently. - -##Initialise -First, initialise the MotionKit instance. Its a Must. -```swift - let motionKit = MotionKit() -``` - -##Getting Accelerometer Values -You can get the accelerometer values using just a few lines of code. - -```swift - motionKit.getAccelerometerValues(interval: 1.0){ - (x, y, z) in - //Interval is in seconds. And now you have got the x, y and z values here - .... - } - -``` -##Getting Gyroscope Values -Gyroscope values could be retrieved by the following few lines of code. - -```swift - motionKit.getGyroValues(interval: 1.0){ - (x, y, z) in - //Your processing will go here - .... - } - -``` -##Getting Magnetometer Values -Getting Magnetometer values is as easy as grabbing a cookie. - -```swift - motionKit.getMagnetometerValues(interval: 1.0){ - (x, y, z) in - //Do something with the retrieved values - .... - } - -``` -#Installation -Embedded frameworks require a minimum deployment target of iOS 8. -###Using CocoaPods -Just add this to your Podfile. -```ruby -pod 'MotionKit' -``` -Note that you have to use CocoaPods version 0.36, the pre-released version which supports swift. If you don't already have it, you can grab it with a single command. -```bash -[sudo] gem install cocoapods --pre -``` - - -###Using Carthage -You can use [Carthage](https://github.com/Carthage/Carthage) to install `MotionKit` by adding the following line to your `Cartfile`. -```ruby - github "MHaroonBaig/MotionKit" -``` - -###Manual Installation -Just copy the `MotionKit.swift` file into your Xcode project folder, and you're ready to go. - -#CMDeviceMotion - as easy as pie -In case if you want to get the processed values of Accelerometer or Gyroscope, you can access the deviceMotion object directly to get those values, or, you can access the individual values from the standalone methods which work seamlessly with Trailing Closures and Delegates. - -The deviceMotion object includes: -- Acceleration Data - - userAcceleration - - gravity -- Calibrated Magnetic Field - - magneticField -- Attitude and Rotation Rate - - attitude - - rotationRate - -All of the values can be retrieved either by individual methods or by getting the deviceMotion object itself. - -###Getting the whole CMDeviceMotion Object -```swift - - motionKit.getDeviceMotionObject(interval: 1.0){ - (deviceMotion) -> () in - var accelerationX = deviceMotion.userAcceleration.x - var gravityX = deviceMotion.gravity.x - var rotationX = deviceMotion.rotationRate.x - var magneticFieldX = deviceMotion.magneticField.x - var attitideYaw = deviceMotion.attitude.yaw - .... - } - -``` -###Getting refined values of Acceleration -You can get the refined and processed userAccelaration through the Device Motion service by just a few lines of code, either by a Trailing Closure or through Delegation method. -```swift - - motionKit.getAccelerationFromDeviceMotion(interval: 1.0){ - (x, y, z) -> () in - // Grab the x, y and z values - .... - } - -``` -###Getting Gravitational Acceleration -Again, you can access it through the Device Motion service as well. -```swift - motionKit.getGravityAccelerationFromDeviceMotion(interval: 1.0) { - (x, y, z) -> () in - // x, y and z values are here - .... - } -``` -###Getting Magnetic Field around your device -Interesting, Get it in a magical way. -```swift - motionKit.getMagneticFieldFromDeviceMotion(interval: 1.0) { - (x, y, z, accuracy) -> () in - // Get the values with accuracy - .... - } - -``` -###Getting the Attitude metrics -```swift - motionKit.getAttitudeFromDeviceMotion(interval: 1.0) { - (attitude) -> () in - var roll = attitude.roll - var pitch = attitude.pitch - var yaw = attitude.yaw - var rotationMatrix = attitude.rotationMatrix - var quaternion = attitude.quaternion - .... - } - -``` -###Getting Rotation Rate of your device -```swift - motionKit.getRotationRateFromDeviceMotion(interval: 1.0) { - (x, y, z) -> () in - // There you go, grab the x, y and z values - .... - } - -``` - - - -##Precautions -For performance issues, it is suggested that you should use only one instance of CMMotionManager throughout the app. Make sure to stop receiving updates from the sensors as soon as you get your work done. -You can do this in MotionKit like this. -```swift - - //Make sure to call the required function when you're done - motionKit.stopAccelerometerUpdates() - motionKit.stopGyroUpdates() - motionKit.stopDeviceMotionUpdates() - motionKit.stopmagnetometerUpdates() - -``` - -##Delegates -In case if you dont want to use the trailing closures, we've got you covered. MotionKit supports the following Delegate methods to retrieve the sensor values. -```swift - optional func retrieveAccelerometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveGyroscopeValues (x: Double, y:Double, z:Double, absoluteValue: Double) - optional func retrieveDeviceMotionObject (deviceMotion: CMDeviceMotion) - optional func retrieveMagnetometerValues (x: Double, y:Double, z:Double, absoluteValue: Double) - - - optional func getAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getGravityAccelerationValFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getRotationRateFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getMagneticFieldFromDeviceMotion (x: Double, y:Double, z:Double) - optional func getAttitudeFromDeviceMotion (attitude: CMAttitude) - -``` -To use the above delegate methods, you have to add the MotionKit delegate to your ViewController. -```swift - class ViewController: UIViewController, MotionKitDelegate { - ... - } -``` -And in the ViewDidLoad method, you simply have to add this. -```swift - override func viewDidLoad() { - super.viewDidLoad() - motionKit.delegate = self - ...... - } - -``` -Having that done, you'd probably want to implement a delegate method like this. -```swift - func retrieveAccelerometerValues (x: Double, y:Double, z:Double, absoluteValue: Double){ - //Do whatever you want with the x, y and z values. The absolute value is calculated through vector mathematics - ...... - } - - func retrieveGyroscopeValues (x: Double, y:Double, z:Double, absoluteValue: Double){ - //Do whatever you want with the x, y and z values. The absolute value is calculated through vector mathematics - ...... - } - -``` - -##Getting just a single value at an instant -if you want to get just a single value of any of the available sensors at a given time, you could probably use some of the our handy methods provided in MotionKit. - -###Accelerometer -```swift - motionKit.getAccelerationAtCurrentInstant { - (x, y, z) -> () in - .... - } -``` -###Gravitational Acceleration -```swift - motionKit.getAccelerationAtCurrentInstant { - (x, y, z) -> () in - .... - } -``` -###Attitude -```swift - motionKit.getAttitudeAtCurrentInstant { - (x, y, z) -> () in - .... - } -``` -###Magnetic Field -```swift - motionKit.getMageticFieldAtCurrentInstant { - (x, y, z) -> () in - .... - } -``` -###Gyroscope Values -```swift - motionKit.getGyroValuesAtCurrentInstant { - (x, y, z) -> () in - .... - } -``` - - -#Discussion -- You can join our [Reddit] (https://www.reddit.com/r/MotionKit/) channel to discuss anything. - -- You can also open an issue here for any kind of feature set that you want. We would love to hear from you. - -- Don't forget to subscribe our Reddit channel, which is [/r/MotionKit] (https://www.reddit.com/r/MotionKit/) - -- Our StackOverflow tag is 'MotionKit' - - -#Requirements -* iOS 7.0+ -* Xcode 6.1 - -#TODO -- [ ] Add More Methods -- [ ] Adding Background Functionality - -#License -Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. diff --git a/Objective-C example/test/Pods/Pods.xcodeproj/project.pbxproj b/Objective-C example/test/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index e607305..0000000 --- a/Objective-C example/test/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1131 +0,0 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 022BE211CFAF1348F78F3F72 - - children - - 5052006614DC2497506898AB - - isa - PBXGroup - name - iOS - sourceTree - <group> - - 03FF33CFF4AF5C7C9D87C36D - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.swift - name - MotionKit.swift - path - MotionKit/MotionKit.swift - sourceTree - <group> - - 05802786B546E60CDBE6C6CA - - fileRef - E127E45D7E91E07657BBD4B2 - isa - PBXBuildFile - settings - - ATTRIBUTES - - Public - - - - 0F294831653FDF268F0D5999 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-MotionKit-Private.xcconfig - sourceTree - <group> - - 0F9DADFAB20E40D44B7E35F3 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text - path - Pods-acknowledgements.markdown - sourceTree - <group> - - 19D8B9D5DC2B6E5023CCBB83 - - children - - C46EDF5E1092A62CA55B0228 - - isa - PBXGroup - name - Targets Support Files - sourceTree - <group> - - 208D4C87321229E8F4AC428C - - buildConfigurationList - 32B81134762A7F276B27A93F - buildPhases - - B6A8E01BF920B7F90031D4E9 - D1EDDBC37166FB74C72E88F8 - 620737C3875595DC717B6792 - - buildRules - - dependencies - - E812E5DB7A0FF7B61659A454 - - isa - PBXNativeTarget - name - Pods - productName - Pods - productReference - FC3BB60A3938A11EAB0016D1 - productType - com.apple.product-type.framework - - 20B8460608F4B09A53162C76 - - buildConfigurations - - DAE15535BE6EC559E2E78C46 - 93DF2BD95DF661A7D2405C08 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 2A06D9361C4BD04AADE8B678 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Pods-acknowledgements.plist - sourceTree - <group> - - 314022AB11470B593CFE9458 - - buildActionMask - 2147483647 - files - - B5B4A0CCD95F9A603F7705F7 - 9106C67B9E16BDF49DE7CF70 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 32B81134762A7F276B27A93F - - buildConfigurations - - 36B86F6B68AD7EB7D859DD43 - 817FD7CAA0309892A3C263D7 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 32FE296E9259FE1202D2F3A3 - - fileRef - 5052006614DC2497506898AB - isa - PBXBuildFile - - 340999BFA06162D79DD57FAA - - children - - E8CFEC8E82CB8A10B8988D48 - - isa - PBXGroup - name - Pods - sourceTree - <group> - - 36B86F6B68AD7EB7D859DD43 - - baseConfigurationReference - C7DE118F6AEB591E911FE0E9 - buildSettings - - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - CURRENT_PROJECT_VERSION - 1 - DEFINES_MODULE - YES - DYLIB_COMPATIBILITY_VERSION - 1 - DYLIB_CURRENT_VERSION - 1 - DYLIB_INSTALL_NAME_BASE - @rpath - ENABLE_STRICT_OBJC_MSGSEND - YES - INFOPLIST_FILE - Target Support Files/Pods/Info.plist - INSTALL_PATH - $(LOCAL_LIBRARY_DIR)/Frameworks - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - LD_RUNPATH_SEARCH_PATHS - - $(inherited) - @executable_path/Frameworks - @loader_path/Frameworks - - MODULEMAP_FILE - Target Support Files/Pods/Pods.modulemap - MTL_ENABLE_DEBUG_INFO - YES - OTHER_LDFLAGS - - OTHER_LIBTOOLFLAGS - - PODS_ROOT - $(SRCROOT) - PRODUCT_NAME - Pods - SDKROOT - iphoneos - SKIP_INSTALL - YES - TARGETED_DEVICE_FAMILY - 1,2 - VERSIONING_SYSTEM - apple-generic - VERSION_INFO_PREFIX - - - isa - XCBuildConfiguration - name - Debug - - 4351C5E6283C2CA623B7F314 - - buildActionMask - 2147483647 - files - - 32FE296E9259FE1202D2F3A3 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 45AF17968F6A45079B44E4F5 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Pods-environment.h - sourceTree - <group> - - 49E0F4955B4D8CAA7A23E191 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods-MotionKit.xcconfig - sourceTree - <group> - - 4C188D7C35313ECBA9870A63 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.script.sh - path - Pods-frameworks.sh - sourceTree - <group> - - 4F59B6250504002DFE8B4F6C - - buildActionMask - 2147483647 - files - - 05802786B546E60CDBE6C6CA - - isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 5052006614DC2497506898AB - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - Foundation.framework - path - Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework - sourceTree - DEVELOPER_DIR - - 620737C3875595DC717B6792 - - buildActionMask - 2147483647 - files - - F7509450F5AB58F2C3A9B538 - - isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 624AA76378B093C1F3443BBA - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Pods-MotionKit-prefix.pch - sourceTree - <group> - - 635EA3C483EB109B84BD43A1 - - children - - AA17606CA7369A7329B55839 - 786CAAD25C517DA69B6273A4 - 49E0F4955B4D8CAA7A23E191 - 0F294831653FDF268F0D5999 - E9B13D9CF460DD1E4C30726E - 624AA76378B093C1F3443BBA - E127E45D7E91E07657BBD4B2 - - isa - PBXGroup - name - Support Files - path - ../Target Support Files/Pods-MotionKit - sourceTree - <group> - - 63D683472EB33A5BDDAA592C - - children - - 022BE211CFAF1348F78F3F72 - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 74A96466245C6258299C2806 - - children - - 79D3F328A93F63FB7CDFD77D - FC3BB60A3938A11EAB0016D1 - - isa - PBXGroup - name - Products - sourceTree - <group> - - 77201AF5628CFCE05869A4D3 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Pods-dummy.m - sourceTree - <group> - - 786CAAD25C517DA69B6273A4 - - includeInIndex - 1 - isa - PBXFileReference - path - Pods-MotionKit.modulemap - sourceTree - <group> - - 78B2EEA8B5E523575125AFB2 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Info.plist - sourceTree - <group> - - 79D3F328A93F63FB7CDFD77D - - explicitFileType - wrapper.framework - includeInIndex - 0 - isa - PBXFileReference - name - MotionKit.framework - path - MotionKit.framework - sourceTree - BUILT_PRODUCTS_DIR - - 817FD7CAA0309892A3C263D7 - - baseConfigurationReference - C49AEC0F72DCEE4B6C2F41C1 - buildSettings - - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - CURRENT_PROJECT_VERSION - 1 - DEFINES_MODULE - YES - DYLIB_COMPATIBILITY_VERSION - 1 - DYLIB_CURRENT_VERSION - 1 - DYLIB_INSTALL_NAME_BASE - @rpath - ENABLE_STRICT_OBJC_MSGSEND - YES - INFOPLIST_FILE - Target Support Files/Pods/Info.plist - INSTALL_PATH - $(LOCAL_LIBRARY_DIR)/Frameworks - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - LD_RUNPATH_SEARCH_PATHS - - $(inherited) - @executable_path/Frameworks - @loader_path/Frameworks - - MODULEMAP_FILE - Target Support Files/Pods/Pods.modulemap - MTL_ENABLE_DEBUG_INFO - NO - OTHER_LDFLAGS - - OTHER_LIBTOOLFLAGS - - PODS_ROOT - $(SRCROOT) - PRODUCT_NAME - Pods - SDKROOT - iphoneos - SKIP_INSTALL - YES - TARGETED_DEVICE_FAMILY - 1,2 - VERSIONING_SYSTEM - apple-generic - VERSION_INFO_PREFIX - - - isa - XCBuildConfiguration - name - Release - - 8B17551DBE146D857AC99E57 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text - name - Podfile - path - ../Podfile - sourceTree - SOURCE_ROOT - xcLanguageSpecificationIdentifier - xcode.lang.ruby - - 8F407C8901C62E4A4A491D47 - - children - - 8B17551DBE146D857AC99E57 - 63D683472EB33A5BDDAA592C - 340999BFA06162D79DD57FAA - 74A96466245C6258299C2806 - 19D8B9D5DC2B6E5023CCBB83 - - isa - PBXGroup - sourceTree - <group> - - 9106C67B9E16BDF49DE7CF70 - - fileRef - E9B13D9CF460DD1E4C30726E - isa - PBXBuildFile - - 93DF2BD95DF661A7D2405C08 - - 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 - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES - CLANG_WARN_UNREACHABLE_CODE - YES - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - COPY_PHASE_STRIP - NO - ENABLE_NS_ASSERTIONS - NO - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_PREPROCESSOR_DEFINITIONS - - RELEASE=1 - - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - STRIP_INSTALLED_PRODUCT - NO - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - 95CE1FCD048338D876330060 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.script.sh - path - Pods-resources.sh - sourceTree - <group> - - A5BC164A47EFF44A3609FE92 - - buildConfigurationList - D5F132528E8E60BEE995AFDF - buildPhases - - 314022AB11470B593CFE9458 - 4351C5E6283C2CA623B7F314 - 4F59B6250504002DFE8B4F6C - - buildRules - - dependencies - - isa - PBXNativeTarget - name - Pods-MotionKit - productName - Pods-MotionKit - productReference - 79D3F328A93F63FB7CDFD77D - productType - com.apple.product-type.framework - - AA17606CA7369A7329B55839 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Info.plist - sourceTree - <group> - - B45ADC6277C1BC1157D0F82C - - attributes - - LastUpgradeCheck - 0510 - - buildConfigurationList - 20B8460608F4B09A53162C76 - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - - mainGroup - 8F407C8901C62E4A4A491D47 - productRefGroup - 74A96466245C6258299C2806 - projectDirPath - - projectReferences - - projectRoot - - targets - - 208D4C87321229E8F4AC428C - A5BC164A47EFF44A3609FE92 - - - B48E41F5CB6E50411997FA8C - - includeInIndex - 1 - isa - PBXFileReference - path - Pods.modulemap - sourceTree - <group> - - B5B4A0CCD95F9A603F7705F7 - - fileRef - 03FF33CFF4AF5C7C9D87C36D - isa - PBXBuildFile - - B6A8E01BF920B7F90031D4E9 - - buildActionMask - 2147483647 - files - - D2C51A1B7AC225A8FD77D7EA - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - C2DBD36004C8CBB27CBDE36D - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Pods-umbrella.h - sourceTree - <group> - - C46EDF5E1092A62CA55B0228 - - children - - 78B2EEA8B5E523575125AFB2 - B48E41F5CB6E50411997FA8C - 0F9DADFAB20E40D44B7E35F3 - 2A06D9361C4BD04AADE8B678 - 77201AF5628CFCE05869A4D3 - 45AF17968F6A45079B44E4F5 - 4C188D7C35313ECBA9870A63 - 95CE1FCD048338D876330060 - C2DBD36004C8CBB27CBDE36D - C7DE118F6AEB591E911FE0E9 - C49AEC0F72DCEE4B6C2F41C1 - - isa - PBXGroup - name - Pods - path - Target Support Files/Pods - sourceTree - <group> - - C49AEC0F72DCEE4B6C2F41C1 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods.release.xcconfig - sourceTree - <group> - - C6D78E47E6C531EB3B898B93 - - fileRef - 5052006614DC2497506898AB - isa - PBXBuildFile - - C7DE118F6AEB591E911FE0E9 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Pods.debug.xcconfig - sourceTree - <group> - - D1EDDBC37166FB74C72E88F8 - - buildActionMask - 2147483647 - files - - C6D78E47E6C531EB3B898B93 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - D2C51A1B7AC225A8FD77D7EA - - fileRef - 77201AF5628CFCE05869A4D3 - isa - PBXBuildFile - - D33AD370FFBF40D3BBEC315E - - containerPortal - B45ADC6277C1BC1157D0F82C - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - A5BC164A47EFF44A3609FE92 - remoteInfo - Pods-MotionKit - - D5F132528E8E60BEE995AFDF - - buildConfigurations - - E724C11CFF18DAA186393538 - EAF46A78E6E26878B168EEE0 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - DAE15535BE6EC559E2E78C46 - - 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 - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_OBJC_ROOT_CLASS - YES - CLANG_WARN_UNREACHABLE_CODE - YES - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - COPY_PHASE_STRIP - YES - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - ONLY_ACTIVE_ARCH - YES - STRIP_INSTALLED_PRODUCT - NO - - isa - XCBuildConfiguration - name - Debug - - E127E45D7E91E07657BBD4B2 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - Pods-MotionKit-umbrella.h - sourceTree - <group> - - E724C11CFF18DAA186393538 - - baseConfigurationReference - 0F294831653FDF268F0D5999 - buildSettings - - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - CURRENT_PROJECT_VERSION - 1 - DEFINES_MODULE - YES - DYLIB_COMPATIBILITY_VERSION - 1 - DYLIB_CURRENT_VERSION - 1 - DYLIB_INSTALL_NAME_BASE - @rpath - ENABLE_STRICT_OBJC_MSGSEND - YES - GCC_PREFIX_HEADER - Target Support Files/Pods-MotionKit/Pods-MotionKit-prefix.pch - INFOPLIST_FILE - Target Support Files/Pods-MotionKit/Info.plist - INSTALL_PATH - $(LOCAL_LIBRARY_DIR)/Frameworks - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - LD_RUNPATH_SEARCH_PATHS - - $(inherited) - @executable_path/Frameworks - @loader_path/Frameworks - - MODULEMAP_FILE - Target Support Files/Pods-MotionKit/Pods-MotionKit.modulemap - MTL_ENABLE_DEBUG_INFO - YES - PRODUCT_NAME - MotionKit - SDKROOT - iphoneos - SKIP_INSTALL - YES - TARGETED_DEVICE_FAMILY - 1,2 - VERSIONING_SYSTEM - apple-generic - VERSION_INFO_PREFIX - - - isa - XCBuildConfiguration - name - Debug - - E812E5DB7A0FF7B61659A454 - - isa - PBXTargetDependency - name - Pods-MotionKit - target - A5BC164A47EFF44A3609FE92 - targetProxy - D33AD370FFBF40D3BBEC315E - - E8CFEC8E82CB8A10B8988D48 - - children - - 03FF33CFF4AF5C7C9D87C36D - 635EA3C483EB109B84BD43A1 - - isa - PBXGroup - name - MotionKit - path - MotionKit - sourceTree - <group> - - E9B13D9CF460DD1E4C30726E - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - Pods-MotionKit-dummy.m - sourceTree - <group> - - EAF46A78E6E26878B168EEE0 - - baseConfigurationReference - 0F294831653FDF268F0D5999 - buildSettings - - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - CURRENT_PROJECT_VERSION - 1 - DEFINES_MODULE - YES - DYLIB_COMPATIBILITY_VERSION - 1 - DYLIB_CURRENT_VERSION - 1 - DYLIB_INSTALL_NAME_BASE - @rpath - ENABLE_STRICT_OBJC_MSGSEND - YES - GCC_PREFIX_HEADER - Target Support Files/Pods-MotionKit/Pods-MotionKit-prefix.pch - INFOPLIST_FILE - Target Support Files/Pods-MotionKit/Info.plist - INSTALL_PATH - $(LOCAL_LIBRARY_DIR)/Frameworks - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - LD_RUNPATH_SEARCH_PATHS - - $(inherited) - @executable_path/Frameworks - @loader_path/Frameworks - - MODULEMAP_FILE - Target Support Files/Pods-MotionKit/Pods-MotionKit.modulemap - MTL_ENABLE_DEBUG_INFO - NO - PRODUCT_NAME - MotionKit - SDKROOT - iphoneos - SKIP_INSTALL - YES - TARGETED_DEVICE_FAMILY - 1,2 - VERSIONING_SYSTEM - apple-generic - VERSION_INFO_PREFIX - - - isa - XCBuildConfiguration - name - Release - - F7509450F5AB58F2C3A9B538 - - fileRef - C2DBD36004C8CBB27CBDE36D - isa - PBXBuildFile - settings - - ATTRIBUTES - - Public - - - - FC3BB60A3938A11EAB0016D1 - - explicitFileType - wrapper.framework - includeInIndex - 0 - isa - PBXFileReference - name - Pods.framework - path - Pods.framework - sourceTree - BUILT_PRODUCTS_DIR - - - rootObject - B45ADC6277C1BC1157D0F82C - - diff --git a/Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/Pods.xcscheme b/Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/Pods.xcscheme deleted file mode 100644 index ea77570..0000000 --- a/Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/Pods.xcscheme +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist b/Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index e6f06e7..0000000 --- a/Objective-C example/test/Pods/Pods.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - SchemeUserState - - Pods-MotionKit.xcscheme - - isShown - - - Pods.xcscheme - - isShown - - - - SuppressBuildableAutocreation - - 208D4C87321229E8F4AC428C - - primary - - - A5BC164A47EFF44A3609FE92 - - primary - - - - - diff --git a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Info.plist b/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Info.plist deleted file mode 100644 index 78361b5..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.7 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-Private.xcconfig b/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-Private.xcconfig deleted file mode 100644 index 3de086f..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-Private.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -#include "Pods-MotionKit.xcconfig" -CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH -FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MotionKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/MotionKit" -OTHER_LDFLAGS = -ObjC -OTHER_SWIFT_FLAGS = "-D COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods -PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-dummy.m b/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-dummy.m deleted file mode 100644 index 70292cc..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_MotionKit : NSObject -@end -@implementation PodsDummy_Pods_MotionKit -@end diff --git a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-prefix.pch b/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-prefix.pch deleted file mode 100644 index 95cf11d..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-prefix.pch +++ /dev/null @@ -1,5 +0,0 @@ -#ifdef __OBJC__ -#import -#endif - -#import "Pods-environment.h" diff --git a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-umbrella.h b/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-umbrella.h deleted file mode 100644 index b88c465..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double MotionKitVersionNumber; -FOUNDATION_EXPORT const unsigned char MotionKitVersionString[]; - diff --git a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit.modulemap b/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit.modulemap deleted file mode 100644 index 9bbd9c8..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module MotionKit { - umbrella header "Pods-MotionKit-umbrella.h" - - export * - module * { export * } -} diff --git a/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit.xcconfig b/Objective-C example/test/Pods/Target Support Files/Pods-MotionKit/Pods-MotionKit.xcconfig deleted file mode 100644 index e69de29..0000000 diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Info.plist b/Objective-C example/test/Pods/Target Support Files/Pods/Info.plist deleted file mode 100644 index 6974542..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Objective-C example/test/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown deleted file mode 100644 index 21bcfc2..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown +++ /dev/null @@ -1,26 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## MotionKit - -Copyright (c) 2015 MotionKit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Generated by CocoaPods - http://cocoapods.org diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Objective-C example/test/Pods/Target Support Files/Pods/Pods-acknowledgements.plist deleted file mode 100644 index 43453a0..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-acknowledgements.plist +++ /dev/null @@ -1,56 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2015 MotionKit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - Title - MotionKit - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - http://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-dummy.m b/Objective-C example/test/Pods/Target Support Files/Pods/Pods-dummy.m deleted file mode 100644 index ade64bd..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods : NSObject -@end -@implementation PodsDummy_Pods -@end diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-environment.h b/Objective-C example/test/Pods/Target Support Files/Pods/Pods-environment.h deleted file mode 100644 index 2b35350..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-environment.h +++ /dev/null @@ -1,14 +0,0 @@ - -// To check if a library is compiled with CocoaPods you -// can use the `COCOAPODS` macro definition which is -// defined in the xcconfigs so it is available in -// headers also when they are imported in the client -// project. - - -// MotionKit -#define COCOAPODS_POD_AVAILABLE_MotionKit -#define COCOAPODS_VERSION_MAJOR_MotionKit 0 -#define COCOAPODS_VERSION_MINOR_MotionKit 7 -#define COCOAPODS_VERSION_PATCH_MotionKit 0 - diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-frameworks.sh b/Objective-C example/test/Pods/Target Support Files/Pods/Pods-frameworks.sh deleted file mode 100755 index 41c8e3a..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-frameworks.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -set -e - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -install_framework() -{ - local source="${BUILT_PRODUCTS_DIR}/Pods/$1" - local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L ${source} ]; then - echo "Symlinked..." - source=$(readlink "${source}") - fi - - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" ${source} ${destination}" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" "${source}" "${destination}" - # Resign the code if required by the build settings to avoid unstable apps - if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then - code_sign "${destination}/$1" - fi - - # Embed linked Swift runtime libraries - local basename - basename=$(echo $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]}) - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -av \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -av "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then - code_sign "${destination}/${lib}" - fi - done -} - -# Signs a framework with the provided identity -code_sign() { - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" -} - - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework 'MotionKit.framework' -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework 'MotionKit.framework' -fi diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-resources.sh b/Objective-C example/test/Pods/Target Support Files/Pods/Pods-resources.sh deleted file mode 100755 index e149064..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-resources.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -install_resource() -{ - case $1 in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" - ;; - *.framework) - echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" - xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ;; - /*) - echo "$1" - echo "$1" >> "$RESOURCES_TO_COPY" - ;; - *) - echo "${PODS_ROOT}/$1" - echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]]; then - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] -then - case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; - esac - find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-umbrella.h b/Objective-C example/test/Pods/Target Support Files/Pods/Pods-umbrella.h deleted file mode 100644 index 21dcfd2..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double PodsVersionNumber; -FOUNDATION_EXPORT const unsigned char PodsVersionString[]; - diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Objective-C example/test/Pods/Target Support Files/Pods/Pods.debug.xcconfig deleted file mode 100644 index 2057b61..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods.debug.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/MotionKit.framework/Headers" -OTHER_LDFLAGS = $(inherited) -ObjC -framework "MotionKit" -OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) -OTHER_SWIFT_FLAGS = "-D COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods.modulemap b/Objective-C example/test/Pods/Target Support Files/Pods/Pods.modulemap deleted file mode 100644 index 8413413..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods { - umbrella header "Pods-umbrella.h" - - export * - module * { export * } -} diff --git a/Objective-C example/test/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Objective-C example/test/Pods/Target Support Files/Pods/Pods.release.xcconfig deleted file mode 100644 index 2057b61..0000000 --- a/Objective-C example/test/Pods/Target Support Files/Pods/Pods.release.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/MotionKit.framework/Headers" -OTHER_LDFLAGS = $(inherited) -ObjC -framework "MotionKit" -OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) -OTHER_SWIFT_FLAGS = "-D COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Objective-C example/test/podfile b/Objective-C example/test/podfile deleted file mode 100644 index b508934..0000000 --- a/Objective-C example/test/podfile +++ /dev/null @@ -1 +0,0 @@ -pod 'MotionKit', :git => 'https://github.com/MHaroonBaig/MotionKit.git' diff --git a/Objective-C example/test/test.xcodeproj/project.pbxproj b/Objective-C example/test/test.xcodeproj/project.pbxproj deleted file mode 100644 index 5b255c8..0000000 --- a/Objective-C example/test/test.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1024 +0,0 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 2AC570F5A8FE58BBEFE4DF17 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Check Pods Manifest.lock - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null -if [[ $? != 0 ]] ; then - cat << EOM -error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. -EOM - exit 1 -fi - - showEnvVarsInLog - 0 - - 2FF2E83651E56623205C1DCC - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" - - showEnvVarsInLog - 0 - - 39C6A0B2E95E7A682F8086FE - - children - - 419C442F6188595806595BBC - 867C738D296B8AD12A9C8442 - - isa - PBXGroup - name - Pods - sourceTree - <group> - - 3B142843B9BBF4509824048D - - children - - 8555B56C823F33CCEEFF5B68 - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 419C442F6188595806595BBC - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods.debug.xcconfig - path - Pods/Target Support Files/Pods/Pods.debug.xcconfig - sourceTree - <group> - - 7562D1241A9798D100C7E4C7 - - children - - 7562D12F1A9798D100C7E4C7 - 7562D14C1A9798D100C7E4C7 - 7562D12E1A9798D100C7E4C7 - 39C6A0B2E95E7A682F8086FE - 3B142843B9BBF4509824048D - - isa - PBXGroup - sourceTree - <group> - - 7562D1251A9798D100C7E4C7 - - attributes - - LastUpgradeCheck - 0610 - ORGANIZATIONNAME - MotionKitsasv - TargetAttributes - - 7562D12C1A9798D100C7E4C7 - - CreatedOnToolsVersion - 6.1.1 - - 7562D1481A9798D100C7E4C7 - - CreatedOnToolsVersion - 6.1.1 - TestTargetID - 7562D12C1A9798D100C7E4C7 - - - - buildConfigurationList - 7562D1281A9798D100C7E4C7 - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - Base - - mainGroup - 7562D1241A9798D100C7E4C7 - productRefGroup - 7562D12E1A9798D100C7E4C7 - projectDirPath - - projectReferences - - projectRoot - - targets - - 7562D12C1A9798D100C7E4C7 - 7562D1481A9798D100C7E4C7 - - - 7562D1281A9798D100C7E4C7 - - buildConfigurations - - 7562D1511A9798D100C7E4C7 - 7562D1521A9798D100C7E4C7 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - 7562D1291A9798D100C7E4C7 - - buildActionMask - 2147483647 - files - - 7562D1361A9798D100C7E4C7 - 7562D1331A9798D100C7E4C7 - 7562D13C1A9798D100C7E4C7 - 7562D1391A9798D100C7E4C7 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 7562D12A1A9798D100C7E4C7 - - buildActionMask - 2147483647 - files - - B56D427EC37025FA3D56CFC6 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 7562D12B1A9798D100C7E4C7 - - buildActionMask - 2147483647 - files - - 7562D13F1A9798D100C7E4C7 - 7562D1441A9798D100C7E4C7 - 7562D1411A9798D100C7E4C7 - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 7562D12C1A9798D100C7E4C7 - - buildConfigurationList - 7562D1531A9798D100C7E4C7 - buildPhases - - 2AC570F5A8FE58BBEFE4DF17 - 7562D1291A9798D100C7E4C7 - 7562D12A1A9798D100C7E4C7 - 7562D12B1A9798D100C7E4C7 - 2FF2E83651E56623205C1DCC - 79DAA173FA0D23768D93563E - - buildRules - - dependencies - - isa - PBXNativeTarget - name - test - productName - test - productReference - 7562D12D1A9798D100C7E4C7 - productType - com.apple.product-type.application - - 7562D12D1A9798D100C7E4C7 - - explicitFileType - wrapper.application - includeInIndex - 0 - isa - PBXFileReference - path - test.app - sourceTree - BUILT_PRODUCTS_DIR - - 7562D12E1A9798D100C7E4C7 - - children - - 7562D12D1A9798D100C7E4C7 - 7562D1491A9798D100C7E4C7 - - isa - PBXGroup - name - Products - sourceTree - <group> - - 7562D12F1A9798D100C7E4C7 - - children - - 7562D1341A9798D100C7E4C7 - 7562D1351A9798D100C7E4C7 - 7562D13A1A9798D100C7E4C7 - 7562D13B1A9798D100C7E4C7 - 7562D13D1A9798D100C7E4C7 - 7562D1401A9798D100C7E4C7 - 7562D1421A9798D100C7E4C7 - 7562D1371A9798D100C7E4C7 - 7562D1301A9798D100C7E4C7 - - isa - PBXGroup - path - test - sourceTree - <group> - - 7562D1301A9798D100C7E4C7 - - children - - 7562D1311A9798D100C7E4C7 - 7562D1321A9798D100C7E4C7 - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 7562D1311A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Info.plist - sourceTree - <group> - - 7562D1321A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - main.m - sourceTree - <group> - - 7562D1331A9798D100C7E4C7 - - fileRef - 7562D1321A9798D100C7E4C7 - isa - PBXBuildFile - - 7562D1341A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AppDelegate.h - sourceTree - <group> - - 7562D1351A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - AppDelegate.m - sourceTree - <group> - - 7562D1361A9798D100C7E4C7 - - fileRef - 7562D1351A9798D100C7E4C7 - isa - PBXBuildFile - - 7562D1371A9798D100C7E4C7 - - children - - 7562D1381A9798D100C7E4C7 - - currentVersion - 7562D1381A9798D100C7E4C7 - isa - XCVersionGroup - path - test.xcdatamodeld - sourceTree - <group> - versionGroupType - wrapper.xcdatamodel - - 7562D1381A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - wrapper.xcdatamodel - path - test.xcdatamodel - sourceTree - <group> - - 7562D1391A9798D100C7E4C7 - - fileRef - 7562D1371A9798D100C7E4C7 - isa - PBXBuildFile - - 7562D13A1A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ViewController.h - sourceTree - <group> - - 7562D13B1A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ViewController.m - sourceTree - <group> - - 7562D13C1A9798D100C7E4C7 - - fileRef - 7562D13B1A9798D100C7E4C7 - isa - PBXBuildFile - - 7562D13D1A9798D100C7E4C7 - - children - - 7562D13E1A9798D100C7E4C7 - - isa - PBXVariantGroup - name - Main.storyboard - sourceTree - <group> - - 7562D13E1A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - file.storyboard - name - Base - path - Base.lproj/Main.storyboard - sourceTree - <group> - - 7562D13F1A9798D100C7E4C7 - - fileRef - 7562D13D1A9798D100C7E4C7 - isa - PBXBuildFile - - 7562D1401A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - folder.assetcatalog - path - Images.xcassets - sourceTree - <group> - - 7562D1411A9798D100C7E4C7 - - fileRef - 7562D1401A9798D100C7E4C7 - isa - PBXBuildFile - - 7562D1421A9798D100C7E4C7 - - children - - 7562D1431A9798D100C7E4C7 - - isa - PBXVariantGroup - name - LaunchScreen.xib - sourceTree - <group> - - 7562D1431A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - file.xib - name - Base - path - Base.lproj/LaunchScreen.xib - sourceTree - <group> - - 7562D1441A9798D100C7E4C7 - - fileRef - 7562D1421A9798D100C7E4C7 - isa - PBXBuildFile - - 7562D1451A9798D100C7E4C7 - - buildActionMask - 2147483647 - files - - 7562D1501A9798D100C7E4C7 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 7562D1461A9798D100C7E4C7 - - buildActionMask - 2147483647 - files - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 7562D1471A9798D100C7E4C7 - - buildActionMask - 2147483647 - files - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 7562D1481A9798D100C7E4C7 - - buildConfigurationList - 7562D1561A9798D100C7E4C7 - buildPhases - - 7562D1451A9798D100C7E4C7 - 7562D1461A9798D100C7E4C7 - 7562D1471A9798D100C7E4C7 - - buildRules - - dependencies - - 7562D14B1A9798D100C7E4C7 - - isa - PBXNativeTarget - name - testTests - productName - testTests - productReference - 7562D1491A9798D100C7E4C7 - productType - com.apple.product-type.bundle.unit-test - - 7562D1491A9798D100C7E4C7 - - explicitFileType - wrapper.cfbundle - includeInIndex - 0 - isa - PBXFileReference - path - testTests.xctest - sourceTree - BUILT_PRODUCTS_DIR - - 7562D14A1A9798D100C7E4C7 - - containerPortal - 7562D1251A9798D100C7E4C7 - isa - PBXContainerItemProxy - proxyType - 1 - remoteGlobalIDString - 7562D12C1A9798D100C7E4C7 - remoteInfo - test - - 7562D14B1A9798D100C7E4C7 - - isa - PBXTargetDependency - target - 7562D12C1A9798D100C7E4C7 - targetProxy - 7562D14A1A9798D100C7E4C7 - - 7562D14C1A9798D100C7E4C7 - - children - - 7562D14F1A9798D100C7E4C7 - 7562D14D1A9798D100C7E4C7 - - isa - PBXGroup - path - testTests - sourceTree - <group> - - 7562D14D1A9798D100C7E4C7 - - children - - 7562D14E1A9798D100C7E4C7 - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - 7562D14E1A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Info.plist - sourceTree - <group> - - 7562D14F1A9798D100C7E4C7 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - testTests.m - sourceTree - <group> - - 7562D1501A9798D100C7E4C7 - - fileRef - 7562D14F1A9798D100C7E4C7 - isa - PBXBuildFile - - 7562D1511A9798D100C7E4C7 - - 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_UNREACHABLE_CODE - YES - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - COPY_PHASE_STRIP - NO - ENABLE_STRICT_OBJC_MSGSEND - YES - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - GCC_SYMBOLS_PRIVATE_EXTERN - NO - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES_AGGRESSIVE - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - MTL_ENABLE_DEBUG_INFO - YES - ONLY_ACTIVE_ARCH - YES - SDKROOT - iphoneos - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Debug - - 7562D1521A9798D100C7E4C7 - - 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_UNREACHABLE_CODE - YES - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CODE_SIGN_IDENTITY[sdk=iphoneos*] - iPhone Developer - COPY_PHASE_STRIP - YES - ENABLE_NS_ASSERTIONS - NO - ENABLE_STRICT_OBJC_MSGSEND - YES - GCC_C_LANGUAGE_STANDARD - gnu99 - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_ABOUT_RETURN_TYPE - YES_ERROR - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNINITIALIZED_AUTOS - YES_AGGRESSIVE - GCC_WARN_UNUSED_FUNCTION - YES - GCC_WARN_UNUSED_VARIABLE - YES - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - MTL_ENABLE_DEBUG_INFO - NO - SDKROOT - iphoneos - TARGETED_DEVICE_FAMILY - 1,2 - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - 7562D1531A9798D100C7E4C7 - - buildConfigurations - - 7562D1541A9798D100C7E4C7 - 7562D1551A9798D100C7E4C7 - - defaultConfigurationIsVisible - 0 - isa - XCConfigurationList - - 7562D1541A9798D100C7E4C7 - - baseConfigurationReference - 419C442F6188595806595BBC - buildSettings - - ASSETCATALOG_COMPILER_APPICON_NAME - AppIcon - INFOPLIST_FILE - test/Info.plist - LD_RUNPATH_SEARCH_PATHS - $(inherited) @executable_path/Frameworks - PRODUCT_NAME - $(TARGET_NAME) - - isa - XCBuildConfiguration - name - Debug - - 7562D1551A9798D100C7E4C7 - - baseConfigurationReference - 867C738D296B8AD12A9C8442 - buildSettings - - ASSETCATALOG_COMPILER_APPICON_NAME - AppIcon - INFOPLIST_FILE - test/Info.plist - LD_RUNPATH_SEARCH_PATHS - $(inherited) @executable_path/Frameworks - PRODUCT_NAME - $(TARGET_NAME) - - isa - XCBuildConfiguration - name - Release - - 7562D1561A9798D100C7E4C7 - - buildConfigurations - - 7562D1571A9798D100C7E4C7 - 7562D1581A9798D100C7E4C7 - - defaultConfigurationIsVisible - 0 - isa - XCConfigurationList - - 7562D1571A9798D100C7E4C7 - - buildSettings - - BUNDLE_LOADER - $(TEST_HOST) - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - - GCC_PREPROCESSOR_DEFINITIONS - - DEBUG=1 - $(inherited) - - INFOPLIST_FILE - testTests/Info.plist - LD_RUNPATH_SEARCH_PATHS - $(inherited) @executable_path/Frameworks @loader_path/Frameworks - PRODUCT_NAME - $(TARGET_NAME) - TEST_HOST - $(BUILT_PRODUCTS_DIR)/test.app/test - - isa - XCBuildConfiguration - name - Debug - - 7562D1581A9798D100C7E4C7 - - buildSettings - - BUNDLE_LOADER - $(TEST_HOST) - FRAMEWORK_SEARCH_PATHS - - $(SDKROOT)/Developer/Library/Frameworks - $(inherited) - - INFOPLIST_FILE - testTests/Info.plist - LD_RUNPATH_SEARCH_PATHS - $(inherited) @executable_path/Frameworks @loader_path/Frameworks - PRODUCT_NAME - $(TARGET_NAME) - TEST_HOST - $(BUILT_PRODUCTS_DIR)/test.app/test - - isa - XCBuildConfiguration - name - Release - - 79DAA173FA0D23768D93563E - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Copy Pods Resources - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" - - showEnvVarsInLog - 0 - - 8555B56C823F33CCEEFF5B68 - - explicitFileType - wrapper.framework - includeInIndex - 0 - isa - PBXFileReference - path - Pods.framework - sourceTree - BUILT_PRODUCTS_DIR - - 867C738D296B8AD12A9C8442 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods.release.xcconfig - path - Pods/Target Support Files/Pods/Pods.release.xcconfig - sourceTree - <group> - - B56D427EC37025FA3D56CFC6 - - fileRef - 8555B56C823F33CCEEFF5B68 - isa - PBXBuildFile - settings - - ATTRIBUTES - - Weak - - - - - rootObject - 7562D1251A9798D100C7E4C7 - - diff --git a/Objective-C example/test/test.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Objective-C example/test/test.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index d683bc9..0000000 --- a/Objective-C example/test/test.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Objective-C example/test/test.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate b/Objective-C example/test/test.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 740f6c6..0000000 Binary files a/Objective-C example/test/test.xcodeproj/project.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Objective-C example/test/test.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/test.xcscheme b/Objective-C example/test/test.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/test.xcscheme deleted file mode 100644 index 76b82ec..0000000 --- a/Objective-C example/test/test.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/test.xcscheme +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Objective-C example/test/test.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist b/Objective-C example/test/test.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 72f1879..0000000 --- a/Objective-C example/test/test.xcodeproj/xcuserdata/ibraheem.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SchemeUserState - - test.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 7562D12C1A9798D100C7E4C7 - - primary - - - 7562D1481A9798D100C7E4C7 - - primary - - - - - diff --git a/Objective-C example/test/test.xcworkspace/contents.xcworkspacedata b/Objective-C example/test/test.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 2cd647a..0000000 --- a/Objective-C example/test/test.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Objective-C example/test/test.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate b/Objective-C example/test/test.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index c87f1fa..0000000 Binary files a/Objective-C example/test/test.xcworkspace/xcuserdata/ibraheem.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Objective-C example/test/test/AppDelegate.h b/Objective-C example/test/test/AppDelegate.h deleted file mode 100644 index 7686a1c..0000000 --- a/Objective-C example/test/test/AppDelegate.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// AppDelegate.h -// test -// -// Created by Haroon on 20/02/2015. -// Copyright (c) 2015 MotionKitsasv. All rights reserved. -// - -#import -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; -@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; -@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; - -- (void)saveContext; -- (NSURL *)applicationDocumentsDirectory; - - -@end - diff --git a/Objective-C example/test/test/AppDelegate.m b/Objective-C example/test/test/AppDelegate.m deleted file mode 100644 index 34d0003..0000000 --- a/Objective-C example/test/test/AppDelegate.m +++ /dev/null @@ -1,127 +0,0 @@ -// -// AppDelegate.m -// test -// -// Created by Haroon on 20/02/2015. -// Copyright (c) 2015 MotionKitsasv. All rights reserved. -// - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and 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:. - // Saves changes in the application's managed object context before the application terminates. - [self saveContext]; -} - -#pragma mark - Core Data stack - -@synthesize managedObjectContext = _managedObjectContext; -@synthesize managedObjectModel = _managedObjectModel; -@synthesize persistentStoreCoordinator = _persistentStoreCoordinator; - -- (NSURL *)applicationDocumentsDirectory { - // The directory the application uses to store the Core Data store file. This code uses a directory named "com.motionkitdv.test" in the application's documents directory. - return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; -} - -- (NSManagedObjectModel *)managedObjectModel { - // The managed object model for the application. It is a fatal error for the application not to be able to find and load its model. - if (_managedObjectModel != nil) { - return _managedObjectModel; - } - NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"test" withExtension:@"momd"]; - _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; - return _managedObjectModel; -} - -- (NSPersistentStoreCoordinator *)persistentStoreCoordinator { - // The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. - if (_persistentStoreCoordinator != nil) { - return _persistentStoreCoordinator; - } - - // Create the coordinator and store - - _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; - NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"test.sqlite"]; - NSError *error = nil; - NSString *failureReason = @"There was an error creating or loading the application's saved data."; - if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { - // Report any error we got. - NSMutableDictionary *dict = [NSMutableDictionary dictionary]; - dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data"; - dict[NSLocalizedFailureReasonErrorKey] = failureReason; - dict[NSUnderlyingErrorKey] = error; - error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict]; - // Replace this with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - NSLog(@"Unresolved error %@, %@", error, [error userInfo]); - abort(); - } - - return _persistentStoreCoordinator; -} - - -- (NSManagedObjectContext *)managedObjectContext { - // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) - if (_managedObjectContext != nil) { - return _managedObjectContext; - } - - NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; - if (!coordinator) { - return nil; - } - _managedObjectContext = [[NSManagedObjectContext alloc] init]; - [_managedObjectContext setPersistentStoreCoordinator:coordinator]; - return _managedObjectContext; -} - -#pragma mark - Core Data Saving support - -- (void)saveContext { - NSManagedObjectContext *managedObjectContext = self.managedObjectContext; - if (managedObjectContext != nil) { - NSError *error = nil; - if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { - // Replace this implementation with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - NSLog(@"Unresolved error %@, %@", error, [error userInfo]); - abort(); - } - } -} - -@end diff --git a/Objective-C example/test/test/Base.lproj/LaunchScreen.xib b/Objective-C example/test/test/Base.lproj/LaunchScreen.xib deleted file mode 100644 index ff28f27..0000000 --- a/Objective-C example/test/test/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Objective-C example/test/test/Base.lproj/Main.storyboard b/Objective-C example/test/test/Base.lproj/Main.storyboard deleted file mode 100644 index f56d2f3..0000000 --- a/Objective-C example/test/test/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Objective-C example/test/test/Images.xcassets/AppIcon.appiconset/Contents.json b/Objective-C example/test/test/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 36d2c80..0000000 --- a/Objective-C example/test/test/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" - }, - { - "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Objective-C example/test/test/Info.plist b/Objective-C example/test/test/Info.plist deleted file mode 100644 index 351aaec..0000000 --- a/Objective-C example/test/test/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.motionkitdv.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Objective-C example/test/test/ViewController.h b/Objective-C example/test/test/ViewController.h deleted file mode 100644 index 6d439e0..0000000 --- a/Objective-C example/test/test/ViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// ViewController.h -// test -// -// Created by Haroon on 20/02/2015. -// Copyright (c) 2015 MotionKitsasv. All rights reserved. -// - -#import - - -@interface ViewController : UIViewController - - -@end - diff --git a/Objective-C example/test/test/ViewController.m b/Objective-C example/test/test/ViewController.m deleted file mode 100644 index 1da55d8..0000000 --- a/Objective-C example/test/test/ViewController.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// ViewController.m -// test -// -// Created by Haroon on 20/02/2015. -// Copyright (c) 2015 MotionKitsasv. All rights reserved. -// - -#import "ViewController.h" -#import - -@interface ViewController () - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - MotionKit *motionKit = [[NSClassFromString(@"MotionKit") alloc] init]; - [motionKit getAccelerometerValuesWithInterval:1.0 values:^(double x, double y, double z) { - printf("%f", x); - }]; - [motionKit getAttitudeFromDeviceMotionWithInterval:1.0 values:^(CMAttitude *attitude) { - // Your values here - }]; - - [motionKit getAccelerationAtCurrentInstant:^(double x, double y, double z) { - //Your values here - }]; - [motionKit getDeviceMotionObjectWithInterval:1.0 values:^(CMDeviceMotion *deviceMotion) { - // Your values here - }]; - // Do any additional setup after loading the view, typically from a nib. -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/Objective-C example/test/test/main.m b/Objective-C example/test/test/main.m deleted file mode 100644 index de65809..0000000 --- a/Objective-C example/test/test/main.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// main.m -// test -// -// Created by Haroon on 20/02/2015. -// Copyright (c) 2015 MotionKitsasv. 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/Objective-C example/test/test/test.xcdatamodeld/.xccurrentversion b/Objective-C example/test/test/test.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 816997b..0000000 --- a/Objective-C example/test/test/test.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ - - - - - _XCCurrentVersionName - test.xcdatamodel - - diff --git a/Objective-C example/test/test/test.xcdatamodeld/test.xcdatamodel/contents b/Objective-C example/test/test/test.xcdatamodeld/test.xcdatamodel/contents deleted file mode 100644 index 193f33c..0000000 --- a/Objective-C example/test/test/test.xcdatamodeld/test.xcdatamodel/contents +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Objective-C example/test/testTests/Info.plist b/Objective-C example/test/testTests/Info.plist deleted file mode 100644 index d8c20f8..0000000 --- a/Objective-C example/test/testTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.motionkitdv.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Objective-C example/test/testTests/testTests.m b/Objective-C example/test/testTests/testTests.m deleted file mode 100644 index e116842..0000000 --- a/Objective-C example/test/testTests/testTests.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// testTests.m -// testTests -// -// Created by Haroon on 20/02/2015. -// Copyright (c) 2015 MotionKitsasv. All rights reserved. -// - -#import -#import - -@interface testTests : XCTestCase - -@end - -@implementation testTests - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testExample { - // This is an example of a functional test case. - XCTAssert(YES, @"Pass"); -} - -- (void)testPerformanceExample { - // This is an example of a performance test case. - [self measureBlock:^{ - // Put the code you want to measure the time of here. - }]; -} - -@end