Parcourir la source

First version

tags/v1.3.3
iot_user il y a 5 ans
révision
fd90cece18
36 fichiers modifiés avec 2109 ajouts et 0 suppressions
  1. BIN
      iFreshDemo_1.0/iFresh ReleaseNotes-en.docx
  2. BIN
      iFreshDemo_1.0/iFresh ReleaseNotes-zh.doc
  3. 348
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.pbxproj
  4. 7
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  5. 8
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  6. 8
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  7. BIN
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/inet_iot_zxw.xcuserdatad/UserInterfaceState.xcuserstate
  8. BIN
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/iot_imac.xcuserdatad/UserInterfaceState.xcuserstate
  9. BIN
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/iot_user.xcuserdatad/UserInterfaceState.xcuserstate
  10. 18
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/iot_user.xcuserdatad/WorkspaceSettings.xcsettings
  11. BIN
      iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/zhang.xcuserdatad/UserInterfaceState.xcuserstate
  12. 5
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/inet_iot_zxw.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  13. 14
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/inet_iot_zxw.xcuserdatad/xcschemes/xcschememanagement.plist
  14. 14
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/iot_imac.xcuserdatad/xcschemes/xcschememanagement.plist
  15. 5
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/iot_user.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  16. 91
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/iot_user.xcuserdatad/xcschemes/iFreshDemo.xcscheme
  17. 22
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/iot_user.xcuserdatad/xcschemes/xcschememanagement.plist
  18. 5
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/zhang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  19. 91
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/zhang.xcuserdatad/xcschemes/iFreshDemo.xcscheme
  20. 22
    0
      iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/zhang.xcuserdatad/xcschemes/xcschememanagement.plist
  21. 17
    0
      iFreshDemo_1.0/iFreshDemo/AppDelegate.h
  22. 47
    0
      iFreshDemo_1.0/iFreshDemo/AppDelegate.m
  23. 53
    0
      iFreshDemo_1.0/iFreshDemo/Assets.xcassets/AppIcon.appiconset/Contents.json
  24. 27
    0
      iFreshDemo_1.0/iFreshDemo/Base.lproj/LaunchScreen.storyboard
  25. 434
    0
      iFreshDemo_1.0/iFreshDemo/Base.lproj/Main.storyboard
  26. 47
    0
      iFreshDemo_1.0/iFreshDemo/Info.plist
  27. 27
    0
      iFreshDemo_1.0/iFreshDemo/ViewController.h
  28. 438
    0
      iFreshDemo_1.0/iFreshDemo/ViewController.m
  29. 69
    0
      iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/Headers/iFreshModel.h
  30. 270
    0
      iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/Headers/iFreshSDK.h
  31. BIN
      iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/Info.plist
  32. 6
    0
      iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/Modules/module.modulemap
  33. BIN
      iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/iFreshSDK
  34. 16
    0
      iFreshDemo_1.0/iFreshDemo/main.m
  35. BIN
      iFreshDemo_1.0/iFreshSDK instructions-en.docx
  36. BIN
      iFreshDemo_1.0/iFreshSDK instructions-zh.docx

BIN
iFreshDemo_1.0/iFresh ReleaseNotes-en.docx Voir le fichier


BIN
iFreshDemo_1.0/iFresh ReleaseNotes-zh.doc Voir le fichier


+ 348
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.pbxproj Voir le fichier

@@ -0,0 +1,348 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
1F4E2E381DA8C7F800253C00 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4E2E371DA8C7F800253C00 /* main.m */; };
1F4E2E3B1DA8C7F800253C00 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4E2E3A1DA8C7F800253C00 /* AppDelegate.m */; };
1F4E2E3E1DA8C7F800253C00 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4E2E3D1DA8C7F800253C00 /* ViewController.m */; };
1F4E2E411DA8C7F800253C00 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F4E2E3F1DA8C7F800253C00 /* Main.storyboard */; };
1F4E2E431DA8C7F800253C00 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1F4E2E421DA8C7F800253C00 /* Assets.xcassets */; };
1F4E2E461DA8C7F800253C00 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F4E2E441DA8C7F800253C00 /* LaunchScreen.storyboard */; };
E64A7F0024405DE000D22B84 /* iFreshSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E64A7EFF24405DE000D22B84 /* iFreshSDK.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1F4E2E331DA8C7F800253C00 /* iFreshDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iFreshDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
1F4E2E371DA8C7F800253C00 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
1F4E2E391DA8C7F800253C00 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
1F4E2E3A1DA8C7F800253C00 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
1F4E2E3C1DA8C7F800253C00 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
1F4E2E3D1DA8C7F800253C00 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
1F4E2E401DA8C7F800253C00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
1F4E2E421DA8C7F800253C00 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
1F4E2E451DA8C7F800253C00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
1F4E2E471DA8C7F800253C00 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E64A7EFF24405DE000D22B84 /* iFreshSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = iFreshSDK.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
1F4E2E301DA8C7F800253C00 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E64A7F0024405DE000D22B84 /* iFreshSDK.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
1F4E2E2A1DA8C7F800253C00 = {
isa = PBXGroup;
children = (
1F4E2E351DA8C7F800253C00 /* iFreshDemo */,
1F4E2E341DA8C7F800253C00 /* Products */,
);
sourceTree = "<group>";
};
1F4E2E341DA8C7F800253C00 /* Products */ = {
isa = PBXGroup;
children = (
1F4E2E331DA8C7F800253C00 /* iFreshDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
1F4E2E351DA8C7F800253C00 /* iFreshDemo */ = {
isa = PBXGroup;
children = (
E64A7EFF24405DE000D22B84 /* iFreshSDK.framework */,
1F4E2E391DA8C7F800253C00 /* AppDelegate.h */,
1F4E2E3A1DA8C7F800253C00 /* AppDelegate.m */,
1F4E2E3C1DA8C7F800253C00 /* ViewController.h */,
1F4E2E3D1DA8C7F800253C00 /* ViewController.m */,
1F4E2E3F1DA8C7F800253C00 /* Main.storyboard */,
1F4E2E421DA8C7F800253C00 /* Assets.xcassets */,
1F4E2E441DA8C7F800253C00 /* LaunchScreen.storyboard */,
1F4E2E471DA8C7F800253C00 /* Info.plist */,
1F4E2E361DA8C7F800253C00 /* Supporting Files */,
);
path = iFreshDemo;
sourceTree = "<group>";
};
1F4E2E361DA8C7F800253C00 /* Supporting Files */ = {
isa = PBXGroup;
children = (
1F4E2E371DA8C7F800253C00 /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
1F4E2E321DA8C7F800253C00 /* iFreshDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1F4E2E4A1DA8C7F800253C00 /* Build configuration list for PBXNativeTarget "iFreshDemo" */;
buildPhases = (
1F4E2E2F1DA8C7F800253C00 /* Sources */,
1F4E2E301DA8C7F800253C00 /* Frameworks */,
1F4E2E311DA8C7F800253C00 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = iFreshDemo;
productName = iFreshDemo;
productReference = 1F4E2E331DA8C7F800253C00 /* iFreshDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
1F4E2E2B1DA8C7F800253C00 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = taolei;
TargetAttributes = {
1F4E2E321DA8C7F800253C00 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = YEU77XR292;
};
};
};
buildConfigurationList = 1F4E2E2E1DA8C7F800253C00 /* Build configuration list for PBXProject "iFreshDemo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = 1F4E2E2A1DA8C7F800253C00;
productRefGroup = 1F4E2E341DA8C7F800253C00 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
1F4E2E321DA8C7F800253C00 /* iFreshDemo */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
1F4E2E311DA8C7F800253C00 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1F4E2E461DA8C7F800253C00 /* LaunchScreen.storyboard in Resources */,
1F4E2E431DA8C7F800253C00 /* Assets.xcassets in Resources */,
1F4E2E411DA8C7F800253C00 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
1F4E2E2F1DA8C7F800253C00 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1F4E2E3E1DA8C7F800253C00 /* ViewController.m in Sources */,
1F4E2E3B1DA8C7F800253C00 /* AppDelegate.m in Sources */,
1F4E2E381DA8C7F800253C00 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
1F4E2E3F1DA8C7F800253C00 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
1F4E2E401DA8C7F800253C00 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
1F4E2E441DA8C7F800253C00 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
1F4E2E451DA8C7F800253C00 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
1F4E2E481DA8C7F800253C00 /* 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;
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_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
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_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 = 9.3;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
1F4E2E491DA8C7F800253C00 /* 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;
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_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
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 = 9.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
1F4E2E4B1DA8C7F800253C00 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = YEU77XR292;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/iFreshDemo",
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = iFreshDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/iFreshSDK",
"$(PROJECT_DIR)/libiFreshSDK",
);
PRODUCT_BUNDLE_IDENTIFIER = raytao.pingwang.iFreshDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
};
name = Debug;
};
1F4E2E4C1DA8C7F800253C00 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = YEU77XR292;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/iFreshDemo",
"$(PROJECT_DIR)",
);
INFOPLIST_FILE = iFreshDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/iFreshSDK",
"$(PROJECT_DIR)/libiFreshSDK",
);
PRODUCT_BUNDLE_IDENTIFIER = raytao.pingwang.iFreshDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
1F4E2E2E1DA8C7F800253C00 /* Build configuration list for PBXProject "iFreshDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1F4E2E481DA8C7F800253C00 /* Debug */,
1F4E2E491DA8C7F800253C00 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1F4E2E4A1DA8C7F800253C00 /* Build configuration list for PBXNativeTarget "iFreshDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1F4E2E4B1DA8C7F800253C00 /* Debug */,
1F4E2E4C1DA8C7F800253C00 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 1F4E2E2B1DA8C7F800253C00 /* Project object */;
}

+ 7
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata Voir le fichier

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:iFreshDemo.xcodeproj">
</FileRef>
</Workspace>

+ 8
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Voir le fichier

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

+ 8
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings Voir le fichier

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>

BIN
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/inet_iot_zxw.xcuserdatad/UserInterfaceState.xcuserstate Voir le fichier


BIN
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/iot_imac.xcuserdatad/UserInterfaceState.xcuserstate Voir le fichier


BIN
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/iot_user.xcuserdatad/UserInterfaceState.xcuserstate Voir le fichier


+ 18
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/iot_user.xcuserdatad/WorkspaceSettings.xcsettings Voir le fichier

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>EnabledFullIndexStoreVisibility</key>
<false/>
<key>IssueFilterStyle</key>
<string>ShowActiveSchemeOnly</string>
<key>LiveSourceIssuesEnabled</key>
<true/>
</dict>
</plist>

BIN
iFreshDemo_1.0/iFreshDemo.xcodeproj/project.xcworkspace/xcuserdata/zhang.xcuserdatad/UserInterfaceState.xcuserstate Voir le fichier


+ 5
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/inet_iot_zxw.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist Voir le fichier

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>

+ 14
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/inet_iot_zxw.xcuserdatad/xcschemes/xcschememanagement.plist Voir le fichier

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>iFreshDemo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

+ 14
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/iot_imac.xcuserdatad/xcschemes/xcschememanagement.plist Voir le fichier

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>iFreshDemo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

+ 5
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/iot_user.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist Voir le fichier

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>

+ 91
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/iot_user.xcuserdatad/xcschemes/iFreshDemo.xcscheme Voir le fichier

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F4E2E321DA8C7F800253C00"
BuildableName = "iFreshDemo.app"
BlueprintName = "iFreshDemo"
ReferencedContainer = "container:iFreshDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F4E2E321DA8C7F800253C00"
BuildableName = "iFreshDemo.app"
BlueprintName = "iFreshDemo"
ReferencedContainer = "container:iFreshDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F4E2E321DA8C7F800253C00"
BuildableName = "iFreshDemo.app"
BlueprintName = "iFreshDemo"
ReferencedContainer = "container:iFreshDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F4E2E321DA8C7F800253C00"
BuildableName = "iFreshDemo.app"
BlueprintName = "iFreshDemo"
ReferencedContainer = "container:iFreshDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Release">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 22
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/iot_user.xcuserdatad/xcschemes/xcschememanagement.plist Voir le fichier

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>iFreshDemo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>1F4E2E321DA8C7F800253C00</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

+ 5
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/zhang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist Voir le fichier

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>

+ 91
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/zhang.xcuserdatad/xcschemes/iFreshDemo.xcscheme Voir le fichier

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F4E2E321DA8C7F800253C00"
BuildableName = "iFreshDemo.app"
BlueprintName = "iFreshDemo"
ReferencedContainer = "container:iFreshDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F4E2E321DA8C7F800253C00"
BuildableName = "iFreshDemo.app"
BlueprintName = "iFreshDemo"
ReferencedContainer = "container:iFreshDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F4E2E321DA8C7F800253C00"
BuildableName = "iFreshDemo.app"
BlueprintName = "iFreshDemo"
ReferencedContainer = "container:iFreshDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F4E2E321DA8C7F800253C00"
BuildableName = "iFreshDemo.app"
BlueprintName = "iFreshDemo"
ReferencedContainer = "container:iFreshDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

+ 22
- 0
iFreshDemo_1.0/iFreshDemo.xcodeproj/xcuserdata/zhang.xcuserdatad/xcschemes/xcschememanagement.plist Voir le fichier

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>iFreshDemo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>1F4E2E321DA8C7F800253C00</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

+ 17
- 0
iFreshDemo_1.0/iFreshDemo/AppDelegate.h Voir le fichier

@@ -0,0 +1,17 @@
//
// AppDelegate.h
// iFreshDemo
//
// Created by zhang on 16/10/8.
// Copyright © 2016年 taolei. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end


+ 47
- 0
iFreshDemo_1.0/iFreshDemo/AppDelegate.m Voir le fichier

@@ -0,0 +1,47 @@
//
// AppDelegate.m
// iFreshDemo
//
// Created by zhang on 16/10/8.
// Copyright © 2016年 taolei. All rights reserved.
//

#import "AppDelegate.h"
#import <iFreshSDK/iFreshSDK.h>

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[iFreshSDK setAppKey:@"83d29ded03f2644d" appSecret:@"00a2008abda8e1f1a2e8bd4f5e"];
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:.
}

@end

+ 53
- 0
iFreshDemo_1.0/iFreshDemo/Assets.xcassets/AppIcon.appiconset/Contents.json Voir le fichier

@@ -0,0 +1,53 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"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" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

+ 27
- 0
iFreshDemo_1.0/iFreshDemo/Base.lproj/LaunchScreen.storyboard Voir le fichier

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

+ 434
- 0
iFreshDemo_1.0/iFreshDemo/Base.lproj/Main.storyboard Voir le fichier

@@ -0,0 +1,434 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Unit" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fmz-Up-oVz">
<rect key="frame" x="157.5" y="40" width="60" height="35"/>
<color key="backgroundColor" red="0.16862745100000001" green="0.5568627451" blue="0.75294117650000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="7Rz-lB-cl4"/>
<constraint firstAttribute="height" constant="35" id="DFB-tq-8xi"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lta-jT-th5">
<rect key="frame" x="299" y="40" width="57" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.16862745100000001" green="0.5568627451" blue="0.75294117650000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="zero">
<color key="titleColor" red="0.98823529409999999" green="0.99215686270000003" blue="0.99607843139999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="zeroClick:" destination="BYZ-38-t0r" eventType="touchUpInside" id="5zL-qr-dOS"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="B7N-F7-BA1">
<rect key="frame" x="20" y="40" width="129.5" height="35"/>
<color key="backgroundColor" red="0.16862745100000001" green="0.5568627451" blue="0.75294117650000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="35" id="rU5-23-9sE"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="8"/>
<state key="normal" title="disconnect and stop scan">
<color key="titleColor" red="0.98823529409999999" green="0.99215686270000003" blue="0.99607843139999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="breakConnect:" destination="BYZ-38-t0r" eventType="touchUpInside" id="39x-By-0PS"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Not Connected" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UZz-VA-4Ie">
<rect key="frame" x="224.5" y="40" width="71" height="35"/>
<color key="backgroundColor" red="0.16862745100000001" green="0.5568627451" blue="0.75294117650000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" staticText="YES" adjustable="YES"/>
</accessibility>
<constraints>
<constraint firstAttribute="height" constant="35" id="ELH-zL-gAe"/>
<constraint firstAttribute="width" constant="71" id="igt-ey-5lV"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Weight" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hnA-sg-00L">
<rect key="frame" x="19.5" y="87" width="336" height="93"/>
<color key="backgroundColor" red="0.16862745100000001" green="0.5568627451" blue="0.75294117650000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="336" id="ch8-HK-xxE"/>
<constraint firstAttribute="height" constant="93" id="gde-Pm-oI2"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="K9U-Cb-Dss">
<rect key="frame" x="244" y="188" width="112" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.16862745100000001" green="0.5568627451" blue="0.75294117650000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="scan and connect">
<color key="titleColor" red="0.98823529409999999" green="0.99215686270000003" blue="0.99607843139999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="linkBle:" destination="BYZ-38-t0r" eventType="touchUpInside" id="d12-LP-reJ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QN0-5x-oiW">
<rect key="frame" x="198" y="316" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="total calorie"/>
<connections>
<action selector="setTotalKcal:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Egm-sA-ekB"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dYC-aI-DOb">
<rect key="frame" x="19" y="316" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" title="set weight"/>
<connections>
<action selector="setweight:" destination="BYZ-38-t0r" eventType="touchUpInside" id="EnA-89-Ksr"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tjj-JY-AcA">
<rect key="frame" x="281" y="316" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="total fat"/>
<connections>
<action selector="setTotalFat:" destination="BYZ-38-t0r" eventType="touchUpInside" id="W1i-RB-pCP"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aHd-SV-ClN">
<rect key="frame" x="197" y="358" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="total fiber"/>
<connections>
<action selector="setTotalFiber:" destination="BYZ-38-t0r" eventType="touchUpInside" id="3BP-b7-CBe"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bB7-ch-hEd">
<rect key="frame" x="184" y="316" width="6" height="160"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="setweight:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Sxa-0n-d5J"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jNP-VH-9Hs">
<rect key="frame" x="102" y="358" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="8"/>
<state key="normal" title="total carbohydrate"/>
<connections>
<action selector="setTotalCarbohydrates:" destination="BYZ-38-t0r" eventType="touchUpInside" id="DHh-1Q-DRV"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Zhs-16-laT">
<rect key="frame" x="18" y="358" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="total protein"/>
<connections>
<action selector="setTotalProtein:" destination="BYZ-38-t0r" eventType="touchUpInside" id="pSY-OV-hWL"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yav-W6-U1P">
<rect key="frame" x="280" y="358" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="8"/>
<state key="normal" title="total cholestenone"/>
<connections>
<action selector="setTotalCholesterol:" destination="BYZ-38-t0r" eventType="touchUpInside" id="F61-ss-WUg"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="62R-0M-lRo">
<rect key="frame" x="197" y="400" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="fat"/>
<connections>
<action selector="setFat:" destination="BYZ-38-t0r" eventType="touchUpInside" id="nrd-fc-7Sx"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pfA-SF-uWV">
<rect key="frame" x="101" y="400" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="total sugar"/>
<connections>
<action selector="setTotalSuger:" destination="BYZ-38-t0r" eventType="touchUpInside" id="1ou-ar-TDc"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Adl-yc-RgY">
<rect key="frame" x="18" y="400" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="total Na"/>
<connections>
<action selector="setTotalSodium:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Ofn-kU-I0p"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BuN-Kd-HBC">
<rect key="frame" x="280" y="400" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="protein"/>
<connections>
<action selector="setProtein:" destination="BYZ-38-t0r" eventType="touchUpInside" id="hTn-Ue-LoY"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GDF-5S-qGW">
<rect key="frame" x="198" y="442" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="Na"/>
<connections>
<action selector="setSodium:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Qle-4d-ETI"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RDh-a4-8UP">
<rect key="frame" x="102" y="442" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="fiber"/>
<connections>
<action selector="setFiber:" destination="BYZ-38-t0r" eventType="touchUpInside" id="EAX-Wh-O58"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Hn-mG-UCU">
<rect key="frame" x="19" y="442" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<state key="normal" title="carbohydrate"/>
<connections>
<action selector="setCarbohydrates:" destination="BYZ-38-t0r" eventType="touchUpInside" id="fm4-4o-aqf"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5sx-HA-qoK">
<rect key="frame" x="281" y="442" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="sugar"/>
<connections>
<action selector="setSuger:" destination="BYZ-38-t0r" eventType="touchUpInside" id="MmL-Ts-Uk7"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uP5-Uj-qbZ">
<rect key="frame" x="20" y="484" width="73" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<state key="normal" title="cholestenone"/>
<connections>
<action selector="setCholesterol:" destination="BYZ-38-t0r" eventType="touchUpInside" id="pyd-cM-3tQ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EH8-Dz-J4n">
<rect key="frame" x="102" y="316" width="75" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="calorie"/>
<connections>
<action selector="setKcal:" destination="BYZ-38-t0r" eventType="touchUpInside" id="8Qc-yN-dq8"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="4rd-kO-TDn">
<rect key="frame" x="20" y="232" width="90" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="WeightInput_one:" destination="BYZ-38-t0r" eventType="editingDidEnd" id="eBa-7L-0Cf"/>
</connections>
</textField>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dlV-Cm-f68">
<rect key="frame" x="185" y="232" width="95" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="WeightInput_two:" destination="BYZ-38-t0r" eventType="editingDidEnd" id="cd8-FT-1Wb"/>
</connections>
</textField>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="tNy-T9-sEZ">
<rect key="frame" x="20" y="270" width="90" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="WeightInput_three:" destination="BYZ-38-t0r" eventType="editingDidEnd" id="gvp-u6-iKa"/>
</connections>
</textField>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="OQ7-iN-9kk">
<rect key="frame" x="185" y="270" width="95" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="WeightInput_four:" destination="BYZ-38-t0r" eventType="editingDidEnd" id="DeN-ii-EPS"/>
</connections>
</textField>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oWY-3L-Jt2">
<rect key="frame" x="124" y="231" width="53" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="set"/>
<connections>
<action selector="setWeight_one:" destination="BYZ-38-t0r" eventType="touchUpInside" id="LoH-pc-WXb"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mcy-pN-j9I">
<rect key="frame" x="288" y="232" width="68" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="set"/>
<connections>
<action selector="setWeight_two:" destination="BYZ-38-t0r" eventType="touchUpInside" id="719-iY-Cc5"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qUs-lm-aZz">
<rect key="frame" x="125" y="269" width="52" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="set"/>
<connections>
<action selector="SetWeight_three:" destination="BYZ-38-t0r" eventType="touchUpInside" id="YuA-cb-qe0"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ySq-f6-v6H">
<rect key="frame" x="288" y="269" width="68" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="set"/>
<connections>
<action selector="setWeight_four:" destination="BYZ-38-t0r" eventType="touchUpInside" id="XvD-kk-jff"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter the number and click thebutton to set" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gEn-KV-DuW">
<rect key="frame" x="105" y="488" width="250" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="inputData:" destination="BYZ-38-t0r" eventType="editingDidEnd" id="BGk-vl-biE"/>
</connections>
</textField>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="weight" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="TNU-bA-lwN">
<rect key="frame" x="20" y="526" width="97" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="ForWeight:" destination="BYZ-38-t0r" eventType="editingDidEnd" id="wQf-PB-uuc"/>
</connections>
</textField>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="totalKCAL" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Xq7-S2-1m0">
<rect key="frame" x="140" y="526" width="97" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="ForKcal:" destination="BYZ-38-t0r" eventType="editingDidEnd" id="dzs-in-g4h"/>
</connections>
</textField>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ssw-HO-QB3">
<rect key="frame" x="20" y="564" width="74" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.0078431372550000003" green="0.59999999999999998" blue="0.76078431369999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="开始设置"/>
<connections>
<action selector="StartSet:" destination="BYZ-38-t0r" eventType="touchUpInside" id="udE-5m-GnR"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Kcal" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="zR6-bk-7KI">
<rect key="frame" x="258" y="526" width="97" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="ForTotalKcal:" destination="BYZ-38-t0r" eventType="editingDidEnd" id="wzH-CT-iHA"/>
</connections>
</textField>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="fmz-Up-oVz" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="3GX-95-Fu8"/>
<constraint firstItem="fmz-Up-oVz" firstAttribute="leading" secondItem="B7N-F7-BA1" secondAttribute="trailing" constant="8" id="KQm-4Q-6bo"/>
<constraint firstItem="hnA-sg-00L" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="N4g-42-oBP"/>
<constraint firstItem="fmz-Up-oVz" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="20" id="PVK-DK-o7G"/>
<constraint firstItem="B7N-F7-BA1" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="20" id="SDq-0X-wvl"/>
<constraint firstItem="UZz-VA-4Ie" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="20" id="XET-gw-t3U"/>
<constraint firstItem="hnA-sg-00L" firstAttribute="top" secondItem="fmz-Up-oVz" secondAttribute="bottom" constant="12" id="eR6-TW-5dN"/>
<constraint firstItem="B7N-F7-BA1" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="20" id="kSY-yP-gMn"/>
<constraint firstItem="UZz-VA-4Ie" firstAttribute="leading" secondItem="fmz-Up-oVz" secondAttribute="trailing" constant="7" id="t0G-e4-Ec0"/>
</constraints>
</view>
<connections>
<outlet property="ForKcal_TF" destination="Xq7-S2-1m0" id="wMp-KC-4Rw"/>
<outlet property="ForTotalKcal_TF" destination="zR6-bk-7KI" id="RYG-2V-rFC"/>
<outlet property="ForWeight_TF" destination="TNU-bA-lwN" id="t6B-KG-8a4"/>
<outlet property="WeightTF_four" destination="OQ7-iN-9kk" id="cAp-gL-9eF"/>
<outlet property="WeightTF_one" destination="4rd-kO-TDn" id="a7f-mm-8yJ"/>
<outlet property="WeightTF_three" destination="tNy-T9-sEZ" id="I74-VR-g4b"/>
<outlet property="WeightTF_two" destination="dlV-Cm-f68" id="SOi-aW-tq9"/>
<outlet property="bleStatus" destination="UZz-VA-4Ie" id="dvX-e2-gdR"/>
<outlet property="dataTextFiled" destination="gEn-KV-DuW" id="NJc-qb-5JH"/>
<outlet property="unitLabel" destination="fmz-Up-oVz" id="9ad-UK-kig"/>
<outlet property="weightLabel" destination="hnA-sg-00L" id="YvR-3h-yRj"/>
<outlet property="zerobutton" destination="Lta-jT-th5" id="f3P-g3-nBO"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="285.60000000000002" y="344.97751124437787"/>
</scene>
</scenes>
</document>

+ 47
- 0
iFreshDemo_1.0/iFreshDemo/Info.plist Voir le fichier

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>iFreshDemo</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>201904191155</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

+ 27
- 0
iFreshDemo_1.0/iFreshDemo/ViewController.h Voir le fichier

@@ -0,0 +1,27 @@
//
// ViewController.h
// iFreshDemo
//
// Created by zhang on 16/10/8.
// Copyright © 2016年 taolei. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController

@property (weak, nonatomic) IBOutlet UITextField *WeightTF_one;
@property (weak, nonatomic) IBOutlet UITextField *WeightTF_two;
@property (weak, nonatomic) IBOutlet UITextField *WeightTF_three;
@property (weak, nonatomic) IBOutlet UITextField *WeightTF_four;
@property (weak, nonatomic) IBOutlet UITextField *dataTextFiled;



@property (weak, nonatomic) IBOutlet UITextField *ForWeight_TF;

@property (weak, nonatomic) IBOutlet UITextField *ForKcal_TF;
@property (weak, nonatomic) IBOutlet UITextField *ForTotalKcal_TF;

@end


+ 438
- 0
iFreshDemo_1.0/iFreshDemo/ViewController.m Voir le fichier

@@ -0,0 +1,438 @@
//
// ViewController.m
// iFreshDemo
//
// Created by zhang on 16/10/8.
// Copyright © 2016年 taolei. All rights reserved.
//

#import "ViewController.h"
#import <iFreshSDK/iFreshSDK.h>


@interface ViewController ()<UITableViewDelegate,UITableViewDataSource,BleReturnValueDelegate>
{
NSIndexPath *selectIndexPath; //Record the currently selected location
NSString *unit;
}

@property (weak, nonatomic) IBOutlet UILabel *unitLabel;


@property (weak, nonatomic) IBOutlet UILabel *bleStatus;


@property (weak, nonatomic) IBOutlet UILabel *weightLabel;


@property (weak, nonatomic) IBOutlet UITableView *unitTabView;


@property (weak, nonatomic) IBOutlet UIButton *zerobutton;

@property (nonatomic,strong) NSArray *unitArray;

@property (nonatomic,assign) NSInteger weightCount;

@end

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
self.unitArray = @[@"g",@"ml",@"lb",@"oz",@"kg",@"斤"];
[[iFreshSDK shareManager] setbleReturnValueDelegate:self];
[[iFreshSDK shareManager] bleDoScan];
_bleStatus.adjustsFontSizeToFitWidth = YES;
_weightLabel.userInteractionEnabled = NO;
//
UIButton * button = [UIButton buttonWithType:(UIButtonTypeCustom)];
button.frame = CGRectMake(20, self.view.frame.size.height - 50, self.view.frame.size.width-40, 40);
[button setTitle:@"Unit setting" forState:(UIControlStateNormal)];
[button setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
button.backgroundColor = [UIColor blueColor];
button.titleLabel.font = [UIFont systemFontOfSize:15];
[self.view addSubview:button];
[button addTarget:self action:@selector(buttonAction:) forControlEvents:(UIControlEventTouchUpInside)];
}
-(void)buttonAction:(UIButton *)sender{
UIAlertController * contrl = [UIAlertController alertControllerWithTitle:@"Please choose" message:@"" preferredStyle:(UIAlertControllerStyleAlert)];
UIAlertAction * action1 = [UIAlertAction actionWithTitle:@"g" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
[[iFreshSDK shareManager] insertTheUnit:(UNIT_g)];
}];
[contrl addAction:action1];
UIAlertAction * action2 = [UIAlertAction actionWithTitle:@"ml" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
[[iFreshSDK shareManager] insertTheUnit:(UNIT_ml)];
}];
[contrl addAction:action2];
UIAlertAction * action3 = [UIAlertAction actionWithTitle:@"lb" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
[[iFreshSDK shareManager] insertTheUnit:(UNIT_lb)];
}];
[contrl addAction:action3];
UIAlertAction * action4 = [UIAlertAction actionWithTitle:@"oz" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
[[iFreshSDK shareManager] insertTheUnit:(UNIT_oz)];
}];
[contrl addAction:action4];
UIAlertAction * action5 = [UIAlertAction actionWithTitle:@"kg" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
[[iFreshSDK shareManager] insertTheUnit:(UNIT_kg)];
}];
[contrl addAction:action5];
UIAlertAction * action6 = [UIAlertAction actionWithTitle:@"斤" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
[[iFreshSDK shareManager] insertTheUnit:(UNIT_jin)];
}];
[contrl addAction:action6];
UIAlertAction * action7 = [UIAlertAction actionWithTitle:@"Cancel" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
}];
[contrl addAction:action7];
[self presentViewController:contrl animated:YES completion:nil];

}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
[self.view endEditing:YES];
}

#pragma mark ============ 蓝牙回调代理 ==============
-(void)bluetoothManagerReturePenetrateData:(NSData *)data{
NSLog(@"bluetoothManagerReturePenetrateData = %@",data.description);
}
- (void)bleStatusupdate:(GN_BleStatus)bleStatus {
if ( bleStatus == bleOpen || bleStatus == bleBreak) {
_bleStatus.text = @"Not connected";
}else if (bleStatus == bleOff){
_bleStatus.text = @"Not turned on";
}else if (bleStatus == bleConnect){
_bleStatus.text = @"Connected";
}
}

- (void)bleReturnValueModel:(iFreshModel *)model{
//This code is written by the client beforehand. The app sends a set of data and sends a set of random data for total calories and calories. This code is closed when the data is written.
self.weightLabel.text = model.value;
NSLog(@"model.gValue=%ld",(long)model.gValue);
if([_weightLabel.text integerValue] != 0) {
_weightCount = [_weightLabel.text integerValue];
}
_unitLabel.text = model.Unit;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[iFreshSDK shareManager] setWeight:_weightCount];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[iFreshSDK shareManager] setTotalCalorie:600];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[iFreshSDK shareManager] setCalorie:500];
});
});
});
}

- (void)changeUnitWithBle:(GN_UnitEnum)unitChange{
if (unitChange == UNIT_g) {
unit = _unitArray[0];;
_unitLabel.text = _unitArray[0];
}else if (unitChange == UNIT_ml) {
unit = _unitArray[1];
_unitLabel.text = _unitArray[1];
}else if (unitChange == UNIT_lb) {
unit = _unitArray[2];
_unitLabel.text = _unitArray[2];
}else if (unitChange == UNIT_oz) {
unit = _unitArray[3];
_unitLabel.text = _unitArray[3];
}else if (unitChange == UNIT_kg){
unit = _unitArray[4];
_unitLabel.text = _unitArray[4];
}else if (unitChange == UNIT_jin){
unit = _unitArray[5];
_unitLabel.text = _unitArray[5];
}
//Get the current unit here
NSLog(@"+++++++++++++%@",unit);
[[NSUserDefaults standardUserDefaults] setObject:unit forKey:@"unitUnit"];
[_unitTabView reloadData];
}

#pragma mark - UITableViewDelegate

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 0.001f;
}

#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.unitArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell =[[UITableViewCell alloc] init];
NSString *identifier = @"Identifier";
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier];
}
cell.textLabel.text = self.unitArray[indexPath.row];

NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
NSString *str =[def objectForKey:@"unitUnit"];
if ([str isEqualToString:cell.textLabel.text]) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
selectIndexPath = indexPath;
}else{
cell.accessoryType = UITableViewCellAccessoryNone;
}
return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSUserDefaults *ud_Unit = [NSUserDefaults standardUserDefaults];
if (indexPath.row == 0) {
_unitLabel.text = _unitArray[0] ;
unit = _unitArray[0];
[[iFreshSDK shareManager] insertTheUnit:UNIT_g];
}else if (indexPath.row == 1) {
_unitLabel.text = _unitArray[1] ;
unit = _unitArray[1];
[[iFreshSDK shareManager] insertTheUnit:UNIT_ml];
}else if (indexPath.row == 2) {
_unitLabel.text = _unitArray[2] ;
unit = _unitArray[2];
[[iFreshSDK shareManager] insertTheUnit:UNIT_lb];
}else if (indexPath.row == 3) {
_unitLabel.text = _unitArray[3] ;
unit = _unitArray[3];
[[iFreshSDK shareManager] insertTheUnit:UNIT_oz];
}else if (indexPath.row == 4) {
_unitLabel.text = _unitArray[4] ;
unit = _unitArray[4];
[[iFreshSDK shareManager] insertTheUnit:UNIT_kg];
}else if (indexPath.row == 5) {
_unitLabel.text = _unitArray[5] ;
unit = _unitArray[5];
[[iFreshSDK shareManager] insertTheUnit:UNIT_jin];
}
[ud_Unit setObject:unit forKey:@"unitUnit"];
[ud_Unit synchronize];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
if (selectIndexPath != indexPath) {
cell.accessoryType = UITableViewCellAccessoryNone;
}else{
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
[self.unitTabView reloadData];
}
//2018-4-27 Weight setting

- (IBAction)WeightInput_one:(UITextField *)sender {
_WeightTF_one.text = sender.text;
}
- (IBAction)setWeight_one:(UIButton *)sender {
[[iFreshSDK shareManager] setWeight:[_WeightTF_one.text integerValue]];
}

- (IBAction)WeightInput_two:(UITextField *)sender {
_WeightTF_two.text = sender.text;
}
- (IBAction)setWeight_two:(UIButton *)sender {
[[iFreshSDK shareManager] setWeight:[_WeightTF_two.text integerValue]];
}

- (IBAction)WeightInput_three:(UITextField *)sender {
_WeightTF_three.text = sender.text;
}
- (IBAction)SetWeight_three:(id)sender {
[[iFreshSDK shareManager] setWeight:[_WeightTF_three.text integerValue]];
}

- (IBAction)WeightInput_four:(UITextField *)sender {
_WeightTF_four.text = sender.text;
}
- (IBAction)setWeight_four:(id)sender {
[[iFreshSDK shareManager] setWeight:[_WeightTF_four.text integerValue]];
}



- (IBAction)zeroClick:(UIButton *)sender {
[[iFreshSDK shareManager] zeroWriteBle];
}

- (IBAction)breakConnect:(UIButton *)sender {
if ([iFreshSDK shareManager].isBle_Link == YES) {
[[iFreshSDK shareManager] closeBleAndDisconnect];

}else {
return;
}

}
- (IBAction)linkBle:(UIButton *)sender {
if ([iFreshSDK shareManager].isBle_Link == NO) {
[[iFreshSDK shareManager] bleDoScan];
}else {
return;
}

}


- (IBAction)setweight:(UIButton *)sender {
//The analog input is 2000g, and the end return processing is 200g. You can set the weight value as needed. Can't exceed 65535
[[iFreshSDK shareManager] setWeight:[_dataTextFiled.text integerValue]];
}

- (IBAction)setKcal:(UIButton *)sender {
NSLog(@"Setting calories,,,");
[[iFreshSDK shareManager] setCalorie:[_dataTextFiled.text integerValue]];
}

- (IBAction)setTotalKcal:(id)sender {
[[iFreshSDK shareManager] setTotalCalorie:[_dataTextFiled.text integerValue]];
}

- (IBAction)setTotalFat:(id)sender {
[[iFreshSDK shareManager] setTotalFat:[_dataTextFiled.text integerValue]];
}

- (IBAction)setTotalProtein:(id)sender {
[[iFreshSDK shareManager] setTotalProtein:[_dataTextFiled.text integerValue]];
}

- (IBAction)setTotalCarbohydrates:(id)sender {
[[iFreshSDK shareManager] setTotalCarbohydrates:[_dataTextFiled.text integerValue]];
}
- (IBAction)setTotalFiber:(id)sender {
[[iFreshSDK shareManager] setTotalFiber:[_dataTextFiled.text integerValue]];
}

- (IBAction)setTotalCholesterol:(id)sender {
[[iFreshSDK shareManager] setTotalCholesterd:[_dataTextFiled.text integerValue]];
}

- (IBAction)setTotalSodium:(id)sender {
[[iFreshSDK shareManager] setTotalSodium:[_dataTextFiled.text integerValue]];
}

- (IBAction)setTotalSuger:(id)sender {
[[iFreshSDK shareManager] setTotalSugar:[_dataTextFiled.text integerValue]];
}

- (IBAction)setFat:(id)sender {
[[iFreshSDK shareManager] setFat:[_dataTextFiled.text integerValue]];
}


- (IBAction)setProtein:(id)sender {
[[iFreshSDK shareManager] setProtein:[_dataTextFiled.text integerValue]];
}
- (IBAction)setCarbohydrates:(id)sender {
[[iFreshSDK shareManager] setCarbohydrates:[_dataTextFiled.text integerValue]];
}
- (IBAction)setCholesterol:(id)sender {
[[iFreshSDK shareManager] setCholesterd:[_dataTextFiled.text integerValue]];
}

- (IBAction)setFiber:(id)sender {
[[iFreshSDK shareManager] setFiber:[_dataTextFiled.text integerValue]];
}
- (IBAction)setSodium:(id)sender {
[[iFreshSDK shareManager] setSodium:[_dataTextFiled.text integerValue]];
}

- (IBAction)setSuger:(id)sender {
[[iFreshSDK shareManager] setSugar:[_dataTextFiled.text integerValue]];
}

- (IBAction)inputData:(UITextField *)sender {
_dataTextFiled.text = sender.text;
}



- (IBAction)ForWeight:(UITextField *)sender {
_ForWeight_TF.text = sender.text;
}

- (IBAction)ForKcal:(UITextField *)sender {
_ForKcal_TF.text = sender.text;
}

- (IBAction)ForTotalKcal:(UITextField *)sender {
_ForTotalKcal_TF.text = sender.text;
}

- (IBAction)StartSet:(id)sender {
[[iFreshSDK shareManager] zeroWriteBle];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[iFreshSDK shareManager] setWeight:[_ForWeight_TF.text floatValue]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[iFreshSDK shareManager] setTotalCalorie:[_ForKcal_TF.text floatValue]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[iFreshSDK shareManager] setCalorie:[_ForTotalKcal_TF.text floatValue]];
});
});
});
}

@end

+ 69
- 0
iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/Headers/iFreshModel.h Voir le fichier

@@ -0,0 +1,69 @@
//
// iFreshModel.h
// iFreshSDK
//
// Created by zhang on 16/9/9.
// Copyright © 2016年 taolei. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface iFreshModel : NSObject


//weight (重量)
@property (nonatomic, copy) NSString *value;
//Data in "g"(以“g”为单位的数据)
@property (nonatomic, assign) NSInteger gValue;
//
@property (nonatomic,copy) NSString *Unit;


/**
* g to lb method
* Weightvalue: the weight string passed in g
* Returned data separated by ":"
*/
+ (NSString *)gTolb:(NSString *)weightValue;
/**
* g to oz method
* Weightvalue: the weight string passed in g
*/
+ (NSString *)gTooz:(NSString *)weightVlaue;
/**
* Lb to g method
* Weightvalue: the weight string passed in lb, please pass the ":" separated data
*/
+ (NSString *)lbTog:(NSString *)weightVlaue;
/**
* Oz to g method
* weightvalue:Incoming weight string in oz
*/
+ (NSString *)ozTog:(NSString *) weightValue;
/**
* g to kg method
* weightvalue:Incoming weight string in g
*/
+ (NSString *)gToKg:(NSString *)weightValue;
/**
* g to kg method
* weightvalue:Incoming weight string in g
*/
+ (NSString *)gToJin:(NSString *)weightValue;
/**
* Kg to g method
* weightvalue:Incoming weight string in kg
*/
+ (NSString *)kgTog:(NSString *)weightValue;
/**
* Pinch to g method
* weightvalue:Incoming weight string in kilograms
*/
+ (NSString *)jinTog:(NSString *)weightValue;
/**
* Kg to lb method
* weightvalue:Incoming weight string in kg
*/
+ (NSString *)kgTolb:(NSString *)weightValue;
@end

+ 270
- 0
iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/Headers/iFreshSDK.h Voir le fichier

@@ -0,0 +1,270 @@
//
// iFreshSDK.h
// iFreshSDK
//
// Created by zhang on 16/9/9.
// Copyright © 2016年 taolei. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "iFreshModel.h"

typedef NS_ENUM(NSUInteger, AiFrushDeviceType) {
AiFrushDeviceTypeUnknown , //When not connected(未连接时)
AiFrushDeviceTypeAC04 , //AC04 scale does not support KG(AC04的秤不支持KG)
AiFrushDeviceTypeAC05 , //Some AC05 scales support KG(部分AC05的秤支持KG)
};

//咖啡定时功能
typedef NS_ENUM(NSUInteger, BleCoffeeTimingWorkType) {
BleCoffeeTimingWorkTypeStart = 1 , //Starting time(正计时开始)
BleCoffeeTimingWorkTypePositivePause = 2 , //Positive timing pause(正计时暂停)
BleCoffeeTimingWorkTypeReset = 3 , //reset(重置)
BleCoffeeTimingWorkTypeCountdownPause = 4 , //Countdown pause(倒计时暂停)
};

typedef enum : NSUInteger {
UNIT_g = 0,
UNIT_ml,
UNIT_lb,
UNIT_oz,
UNIT_kg,
UNIT_jin
} GN_UnitEnum;


typedef enum : NSUInteger {
bleOpen = 0,
bleOff,
bleConnect,
bleBreak
} GN_BleStatus;

@protocol BleReturnValueDelegate <NSObject>
@optional

/**
ble Penetrate Data(蓝牙透传数据)

@param data Penetrate data(透传数据)
*/
-(void)bluetoothManagerReturePenetrateData:(NSData *)data;

/**
* Model model: value ble returns the value (model模型:value ble返还数值)
*
* @param model Global Bluetooth model data(全局蓝牙模型数据)
*/
- (void)bleReturnValueModel:(iFreshModel*)model;

/**
* Proxy method triggered by end switching unit(称端切换单位触发的代理方法)
* GN_UnitEnum Unit enumeration(单位枚举)
* unitChang Switched unit(切换后的单位)
*/

- (void)changeUnitWithBle:(GN_UnitEnum)unitChange;

/**
* Proxy method for changing Bluetooth connection status(蓝牙连接状态改变的代理方法)
* GN_BleStatus Bluetooth status enumeration(蓝牙状态枚举)
* bleStatus Current Bluetooth status(当前蓝牙状态)
*/
- (void)bleStatusupdate:(GN_BleStatus)bleStatus;
/**
*Callback Bluetooth device type(回调蓝牙设备类型)
*deviceType:Bluetooth device type, default AiFrushDeviceTypeUnknown when no device is connected(蓝牙设备类型,未连接设备时,默认AiFrushDeviceTypeUnknown)
*/
- (void)bleReturnDeviceType:(AiFrushDeviceType)deviceType;
#pragma mark ============ Coffee scale callback(咖啡秤回调) ==============
/**
*Coffee scale support agent callback(咖啡秤支持的代理回调)
*workType:Coffee scale operation instructions(咖啡秤的操作指令)
*/
-(void)bluetoothManagerCoffeeTimingWork:(BleCoffeeTimingWorkType)workType;
/**
*Coffee scale return time(咖啡秤返回的时间)
*min:minute(分)
*sec:second(秒)
*countdown:Whether it is countdown, YES: countdown, NO: timing(是否是倒计时,YES:倒计时,NO:正计时)
*/
-(void)bluetoothManagerCoffeeTime:(int )min second:(int)sec isCountdown:(BOOL)countdown;
/**
*Coffee scale countdown starts(咖啡秤倒计时开始)
*min:minute(分)
*sec:second(秒)
*/
-(void)bluetoothManagerCoffeeCountdownStartTime:(int )min second:(int)sec;

/**
Bluetooth pause timing callback(蓝牙暂停计时的回调)
@param type Pause type(暂停类型)
@param min minute(分钟)
@param sec second(秒)
*/
-(void)bluetoothManagerCoffeePauseType:(BleCoffeeTimingWorkType)type minute:(int)min second:(int)sec;

/**
设备发送停止报警指令
*/
-(void)bluetoothManagerCoffeeReceiveStopAlarm;

@end

@interface iFreshSDK : NSObject

/// Whether to link to Bluetooth(是否链接上蓝牙)
@property (nonatomic, assign) BOOL isBle_Link;



@property (nonatomic, assign, readonly) GN_UnitEnum unitEnum;


@property (nonatomic, assign , readonly) AiFrushDeviceType deviceType;


//
+(void)setAppKey:(NSString *)key appSecret:(NSString *)secret;
/**
* shareManager
*/
+ (instancetype)shareManager;
/*
* write data to ble(写入数据)
*/

- (void)sendDataToBle:(NSData *)data;
/**
* start scaning(开始扫描)
*/
- (void)bleDoScan;

/**
* stop connect device(停止连接设备)
*/
- (void)closeBleAndDisconnect;

/**
* Follow the protocol call(遵循协议的调用)
*/
- (void)setbleReturnValueDelegate:(id<BleReturnValueDelegate>)delegate;

/**
* setting unit(设置单位)
*
* @param unit Write units according to GN_UnitEnum enumeration(根据GN_UnitEnum枚举写入单位)
*/
- (void)insertTheUnit:(GN_UnitEnum)unit;

/**
* Return to zero(归零)
*/
- (void)zeroWriteBle;
/*
Setting weight(设置重量)
*/
- (void)setWeight:(NSInteger)weight;

/*
* Set a single calorie(设置单项卡路里)
*/
- (void)setCalorie:(NSInteger)calories;

/*
* Set total calories(设置总卡路里)
*/
- (void)setTotalCalorie:(NSInteger)toatlCalories;


/*
* Set total fat(设置总脂肪)
*/
- (void)setTotalFat:(NSInteger)fat;

/*
* Set total protein(设置总蛋白质)
*/
- (void)setTotalProtein:(NSInteger)protein;

/*
* Set total carbohydrates(设置总碳水化合物)
*/
- (void)setTotalCarbohydrates:(NSInteger)carbohydertes;
/*
* Set total fat fiber(设置总脂肪纤维)
*/
- (void)setTotalFiber:(NSInteger)fiber;
/*
* Set total cholesterol(设置总胆固醇)
*/
- (void)setTotalCholesterd:(NSInteger)cholesterd;
/*
* Set total sodium content(设置总钠含量)
*/
- (void)setTotalSodium:(NSInteger)sodium;

/*
* Set total sugar content(设置总糖含量)
*/
- (void)setTotalSugar:(NSInteger)sugar;

/*
*Setting fat(设置脂肪)
*/
- (void)setFat:(NSInteger)fat;

/*
*Set protein(设置蛋白质)
*/
- (void)setProtein:(NSInteger)protein;
/*
*Set carbohydrates(设置碳水化合物)
*/

- (void)setCarbohydrates:(NSInteger)carbohydertes;
/*
*Setting dietary fiber(设置膳食纤维)
*/

- (void)setFiber:(NSInteger)fiber;
/*
*Set cholesterol(设置胆固醇)
*/

- (void)setCholesterd:(NSInteger)cholesterd;
/*
*Set sodium content(设置钠含量)
*/

- (void)setSodium:(NSInteger)sodium;
/*
*Setting the sugar content(设置糖含量)
*/
- (void)setSugar:(NSInteger)sugar;

/*
* Shutdown command(关机指令)
*
*/
- (void)turnOffDevice;


#pragma mark ============ Coffee scale(咖啡秤) ==============
//start the timer(开始计时)
-(void)bluetoothCoffeeStartTime;
//pause(暂停)
-(void)bluetoothCoffeePauseType:(BleCoffeeTimingWorkType)type minute:(int)min second:(int)sec;
//reset(重置)
-(void)bluetoothCoffeeResetTime;
//Countdown starts(倒计时开始)
-(void)bluetoothCoffeeCountdownStartTime:(int)min second:(int)sec;

//APP reply stop alarm command(APP 回复停止报警指令)
-(void)bluetoothManagerSendStopAlarm;
@end

BIN
iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/Info.plist Voir le fichier


+ 6
- 0
iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/Modules/module.modulemap Voir le fichier

@@ -0,0 +1,6 @@
framework module iFreshSDK {
umbrella header "iFreshSDK.h"

export *
module * { export * }
}

BIN
iFreshDemo_1.0/iFreshDemo/iFreshSDK.framework/iFreshSDK Voir le fichier


+ 16
- 0
iFreshDemo_1.0/iFreshDemo/main.m Voir le fichier

@@ -0,0 +1,16 @@
//
// main.m
// iFreshDemo
//
// Created by zhang on 16/10/8.
// Copyright © 2016年 taolei. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AppDelegate.h"

int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

BIN
iFreshDemo_1.0/iFreshSDK instructions-en.docx Voir le fichier


BIN
iFreshDemo_1.0/iFreshSDK instructions-zh.docx Voir le fichier


Chargement…
Annuler
Enregistrer