From 638826a5f1cde3a28542b6d8bf051f491c558fe1 Mon Sep 17 00:00:00 2001 From: "Xuan Hu (Sean)" Date: Thu, 27 Apr 2017 15:19:02 +0800 Subject: [PATCH] Fix emotion most value error (#24) * Fix emotion most value error. * Set build ios version to 8.0. --- Example/Podfile.lock | 4 +-- .../project.pbxproj | 8 +++--- Pod/Classes/MPOFaceEmotion.m | 16 ++++++------ _Pods.xcodeproj/project.pbxproj | 26 +++++++++++-------- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 2ee156e..6607852 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - ProjectOxfordFace (1.2.5) + - ProjectOxfordFace (1.2.6) DEPENDENCIES: - ProjectOxfordFace (from `../`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - ProjectOxfordFace: 761eb5af9b3718fd969d1249c6ff83b6d33cf163 + ProjectOxfordFace: 8a82bd18dfd4a9e7df9afa9e93a56bd6c837c122 PODFILE CHECKSUM: a5d2c084667aa893cf7f8e0a5e76252611a40a74 diff --git a/Example/ProjectOxfordFace.xcodeproj/project.pbxproj b/Example/ProjectOxfordFace.xcodeproj/project.pbxproj index f8ec073..444dd29 100644 --- a/Example/ProjectOxfordFace.xcodeproj/project.pbxproj +++ b/Example/ProjectOxfordFace.xcodeproj/project.pbxproj @@ -781,7 +781,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -819,7 +819,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -840,7 +840,7 @@ GCC_PREFIX_HEADER = "ProjectOxfordFace/ProjectOxfordFace-Prefix.pch"; HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/FaceSDK/FaceSdkMobile.framework/Headers"; INFOPLIST_FILE = "ProjectOxfordFace/ProjectOxfordFace-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -863,7 +863,7 @@ GCC_PREFIX_HEADER = "ProjectOxfordFace/ProjectOxfordFace-Prefix.pch"; HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/FaceSDK/FaceSdkMobile.framework/Headers"; INFOPLIST_FILE = "ProjectOxfordFace/ProjectOxfordFace-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Pod/Classes/MPOFaceEmotion.m b/Pod/Classes/MPOFaceEmotion.m index a495044..ba67fc5 100644 --- a/Pod/Classes/MPOFaceEmotion.m +++ b/Pod/Classes/MPOFaceEmotion.m @@ -46,37 +46,37 @@ self.mostEmotion = @"anger"; self.mostEmotionValue = self.anger; - if (self.contempt > self.mostEmotionValue) + if ([self.contempt doubleValue] > [self.mostEmotionValue doubleValue]) { self.mostEmotion = @"contempt"; self.mostEmotionValue = self.contempt; } - if (self.disgust > self.mostEmotionValue) + if ([self.disgust doubleValue] > [self.mostEmotionValue doubleValue]) { self.mostEmotion = @"disgust"; self.mostEmotionValue = self.disgust; } - if (self.fear > self.mostEmotionValue) + if ([self.fear doubleValue] > [self.mostEmotionValue doubleValue]) { self.mostEmotion = @"fear"; self.mostEmotionValue = self.fear; } - if (self.happiness > self.mostEmotionValue) + if ([self.happiness doubleValue] > [self.mostEmotionValue doubleValue]) { self.mostEmotion = @"happiness"; self.mostEmotionValue = self.happiness; } - if (self.neutral > self.mostEmotionValue) + if ([self.neutral doubleValue] > [self.mostEmotionValue doubleValue]) { self.mostEmotion = @"neutral"; - self.mostEmotionValue = self.contempt; + self.mostEmotionValue = self.neutral; } - if (self.sadness > self.mostEmotionValue) + if ([self.sadness doubleValue] > [self.mostEmotionValue doubleValue]) { self.mostEmotion = @"sadness"; self.mostEmotionValue = self.sadness; } - if (self.surprise > self.mostEmotionValue) + if ([self.surprise doubleValue] > [self.mostEmotionValue doubleValue]) { self.mostEmotion = @"surprise"; self.mostEmotionValue = self.surprise; diff --git a/_Pods.xcodeproj/project.pbxproj b/_Pods.xcodeproj/project.pbxproj index c350256..865cee1 100644 --- a/_Pods.xcodeproj/project.pbxproj +++ b/_Pods.xcodeproj/project.pbxproj @@ -108,7 +108,7 @@ 3283700B1869A0C241C9327487DD2AE5 /* MPOFacialHair.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MPOFacialHair.h; sourceTree = ""; }; 3B4E4D940BC2599D341BB33E5AC14421 /* MPOGroupResult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MPOGroupResult.h; sourceTree = ""; }; 3BC35967CB6E902CCFCACF0233CBC7F4 /* Pods-ProjectOxfordFace_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-ProjectOxfordFace_Tests.modulemap"; sourceTree = ""; }; - 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 3E4E89230EF59BC255123B67864ACF77 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 42691A362AC71A914568E07E232D8975 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42A6AF8D26DF22B35A96408617E9F67C /* MPOFaceLandmarks.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MPOFaceLandmarks.m; sourceTree = ""; }; 44ECDB027EB6836B27B55260AA4EA58D /* MPOFaceHeadPose.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MPOFaceHeadPose.m; sourceTree = ""; }; @@ -512,7 +512,7 @@ LastSwiftUpdateCheck = 0700; LastUpgradeCheck = 0700; }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "_Pods" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -633,9 +633,11 @@ baseConfigurationReference = 174F2ACBE06C1A5F8B6AD8CC736BB1FB /* ProjectOxfordFace.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_NAME = ProjectOxfordFace; SDKROOT = iphoneos; SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = bundle; }; name = Release; @@ -672,7 +674,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; @@ -692,7 +694,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; INFOPLIST_FILE = "Target Support Files/Pods-ProjectOxfordFace_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-ProjectOxfordFace_Example/Pods-ProjectOxfordFace_Example.modulemap"; @@ -722,7 +724,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; INFOPLIST_FILE = "Target Support Files/Pods-ProjectOxfordFace_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-ProjectOxfordFace_Tests/Pods-ProjectOxfordFace_Tests.modulemap"; @@ -766,7 +768,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; VALIDATE_PRODUCT = YES; @@ -786,7 +788,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; INFOPLIST_FILE = "Target Support Files/Pods-ProjectOxfordFace_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-ProjectOxfordFace_Example/Pods-ProjectOxfordFace_Example.modulemap"; @@ -817,7 +819,7 @@ GCC_PREFIX_HEADER = "Target Support Files/ProjectOxfordFace/ProjectOxfordFace-prefix.pch"; INFOPLIST_FILE = "Target Support Files/ProjectOxfordFace/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/ProjectOxfordFace/ProjectOxfordFace.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; @@ -843,7 +845,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; INFOPLIST_FILE = "Target Support Files/Pods-ProjectOxfordFace_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-ProjectOxfordFace_Tests/Pods-ProjectOxfordFace_Tests.modulemap"; @@ -874,7 +876,7 @@ GCC_PREFIX_HEADER = "Target Support Files/ProjectOxfordFace/ProjectOxfordFace-prefix.pch"; INFOPLIST_FILE = "Target Support Files/ProjectOxfordFace/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/ProjectOxfordFace/ProjectOxfordFace.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; @@ -892,9 +894,11 @@ baseConfigurationReference = 174F2ACBE06C1A5F8B6AD8CC736BB1FB /* ProjectOxfordFace.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_NAME = ProjectOxfordFace; SDKROOT = iphoneos; SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = bundle; }; name = Debug; @@ -902,7 +906,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "_Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( 5CE5176205D06FF3FFE3DDDA9291E44B /* Debug */,