@@ -6,17 +6,10 @@ | |||
> * iOS 8.0 and above. | |||
> * The Bluetooth version used by the device requires 4.0 and above. | |||
> * Need to add iFreshSDK.framework package dependency; | |||
> * Apply for the key and secret of sdk, application address: http://sdk.aicare.net.cn | |||
## The document description | |||
1.iFreshSDK.framework (package name raytao.pingwang.iFreshDemo); | |||
2.Add the following code to AppDelegate: | |||
``` | |||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |||
// Override point for customization after application launch. | |||
[iFreshSDK setAppKey:@"key" appSecret:@"secret"]; | |||
return YES; | |||
} | |||
``` | |||
## The version update information | |||
For details, please see the "Good Nutrition SDK Release Notes.doc" document. | |||
@@ -6,18 +6,9 @@ | |||
> * iOS 8.0及以上版本。 | |||
> * 设备所使用蓝牙版本需要4.0及以上。 | |||
> * 需添加iFreshSDK.framework包依赖; | |||
> * 申请sdk的key和secret,申请地址:http://sdk.aicare.net.cn | |||
## 文件说明: | |||
1. iFreshSDK.framework(包名raytao.pingwang.iFreshDemo) | |||
2. 在AppDelegate中加入如下代码: | |||
``` | |||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |||
// Override point for customization after application launch. | |||
[iFreshSDK setAppKey:@"key" appSecret:@"secret"]; | |||
return YES; | |||
} | |||
``` | |||
## 版本更新信息 | |||
详情请见“好营养SDK发布说明.doc”文档 |
@@ -13,7 +13,7 @@ | |||
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 */; }; | |||
E633F4E5255BD65800EE5A95 /* iFreshSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E633F4E4255BD65800EE5A95 /* iFreshSDK.framework */; }; | |||
/* End PBXBuildFile section */ | |||
/* Begin PBXFileReference section */ | |||
@@ -27,7 +27,7 @@ | |||
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>"; }; | |||
E633F4E4255BD65800EE5A95 /* iFreshSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = iFreshSDK.framework; sourceTree = "<group>"; }; | |||
/* End PBXFileReference section */ | |||
/* Begin PBXFrameworksBuildPhase section */ | |||
@@ -35,7 +35,7 @@ | |||
isa = PBXFrameworksBuildPhase; | |||
buildActionMask = 2147483647; | |||
files = ( | |||
E64A7F0024405DE000D22B84 /* iFreshSDK.framework in Frameworks */, | |||
E633F4E5255BD65800EE5A95 /* iFreshSDK.framework in Frameworks */, | |||
); | |||
runOnlyForDeploymentPostprocessing = 0; | |||
}; | |||
@@ -61,7 +61,7 @@ | |||
1F4E2E351DA8C7F800253C00 /* iFreshDemo */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
E64A7EFF24405DE000D22B84 /* iFreshSDK.framework */, | |||
E633F4E4255BD65800EE5A95 /* iFreshSDK.framework */, | |||
1F4E2E391DA8C7F800253C00 /* AppDelegate.h */, | |||
1F4E2E3A1DA8C7F800253C00 /* AppDelegate.m */, | |||
1F4E2E3C1DA8C7F800253C00 /* ViewController.h */, | |||
@@ -275,6 +275,7 @@ | |||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |||
CODE_SIGN_IDENTITY = "iPhone Developer"; | |||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |||
CURRENT_PROJECT_VERSION = 202011111625; | |||
DEVELOPMENT_TEAM = YEU77XR292; | |||
FRAMEWORK_SEARCH_PATHS = ( | |||
"$(inherited)", | |||
@@ -289,6 +290,7 @@ | |||
"$(PROJECT_DIR)/iFreshSDK", | |||
"$(PROJECT_DIR)/libiFreshSDK", | |||
); | |||
MARKETING_VERSION = 1.1.8; | |||
PRODUCT_BUNDLE_IDENTIFIER = raytao.pingwang.iFreshDemo; | |||
PRODUCT_NAME = "$(TARGET_NAME)"; | |||
PROVISIONING_PROFILE = ""; | |||
@@ -301,6 +303,7 @@ | |||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |||
CODE_SIGN_IDENTITY = "iPhone Developer"; | |||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |||
CURRENT_PROJECT_VERSION = 202011111625; | |||
DEVELOPMENT_TEAM = YEU77XR292; | |||
FRAMEWORK_SEARCH_PATHS = ( | |||
"$(inherited)", | |||
@@ -315,6 +318,7 @@ | |||
"$(PROJECT_DIR)/iFreshSDK", | |||
"$(PROJECT_DIR)/libiFreshSDK", | |||
); | |||
MARKETING_VERSION = 1.1.8; | |||
PRODUCT_BUNDLE_IDENTIFIER = raytao.pingwang.iFreshDemo; | |||
PRODUCT_NAME = "$(TARGET_NAME)"; | |||
PROVISIONING_PROFILE = ""; |
@@ -18,7 +18,7 @@ | |||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |||
// Override point for customization after application launch. | |||
[iFreshSDK setAppKey:@"83d29ded03f2644d" appSecret:@"00a2008abda8e1f1a2e8bd4f5e"]; | |||
// [iFreshSDK setAppKey:@"83d29ded03f2644d" appSecret:@"00a2008abda8e1f1a2e8bd4f5e"]; | |||
return YES; | |||
} | |||
@@ -17,11 +17,11 @@ | |||
<key>CFBundlePackageType</key> | |||
<string>APPL</string> | |||
<key>CFBundleShortVersionString</key> | |||
<string>1.1.7</string> | |||
<string>$(MARKETING_VERSION)</string> | |||
<key>CFBundleSignature</key> | |||
<string>????</string> | |||
<key>CFBundleVersion</key> | |||
<string>201904191155</string> | |||
<string>$(CURRENT_PROJECT_VERSION)</string> | |||
<key>LSRequiresIPhoneOS</key> | |||
<true/> | |||
<key>NSAppTransportSecurity</key> |
@@ -40,7 +40,7 @@ | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
self.unitArray = @[@"g",@"ml",@"lb",@"oz",@"kg",@"斤"]; | |||
self.unitArray = @[@"g",@"ml",@"lb:oz",@"oz",@"kg",@"斤",@"lb"]; | |||
[[iFreshSDK shareManager] setbleReturnValueDelegate:self]; | |||
[[iFreshSDK shareManager] bleDoScan]; | |||
_bleStatus.adjustsFontSizeToFitWidth = YES; | |||
@@ -67,7 +67,7 @@ | |||
[[iFreshSDK shareManager] insertTheUnit:(UNIT_ml)]; | |||
}]; | |||
[contrl addAction:action2]; | |||
UIAlertAction * action3 = [UIAlertAction actionWithTitle:@"lb" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) { | |||
UIAlertAction * action3 = [UIAlertAction actionWithTitle:@"lb:oz" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) { | |||
[[iFreshSDK shareManager] insertTheUnit:(UNIT_lb)]; | |||
}]; | |||
[contrl addAction:action3]; | |||
@@ -83,6 +83,12 @@ | |||
[[iFreshSDK shareManager] insertTheUnit:(UNIT_jin)]; | |||
}]; | |||
[contrl addAction:action6]; | |||
UIAlertAction * actionLB = [UIAlertAction actionWithTitle:@"lb" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) { | |||
[[iFreshSDK shareManager] insertTheUnit:(UNIT_LB)]; | |||
}]; | |||
[contrl addAction:actionLB]; | |||
UIAlertAction * action7 = [UIAlertAction actionWithTitle:@"Cancel" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) { | |||
}]; | |||
@@ -157,6 +163,9 @@ | |||
}else if (unitChange == UNIT_jin){ | |||
unit = _unitArray[5]; | |||
_unitLabel.text = _unitArray[5]; | |||
}else if (unitChange == UNIT_LB){ | |||
unit = _unitArray[6]; | |||
_unitLabel.text = _unitArray[6]; | |||
} | |||
//Get the current unit here | |||
@@ -239,6 +248,10 @@ | |||
_unitLabel.text = _unitArray[5] ; | |||
unit = _unitArray[5]; | |||
[[iFreshSDK shareManager] insertTheUnit:UNIT_jin]; | |||
}else if (indexPath.row == 6) { | |||
_unitLabel.text = _unitArray[6] ; | |||
unit = _unitArray[6]; | |||
[[iFreshSDK shareManager] insertTheUnit:UNIT_LB]; | |||
} | |||
[ud_Unit setObject:unit forKey:@"unitUnit"]; |
@@ -66,4 +66,7 @@ | |||
* weightvalue:Incoming weight string in kg | |||
*/ | |||
+ (NSString *)kgTolb:(NSString *)weightValue; | |||
+ (NSString *)LBTog:(NSString *)weightValue; | |||
+ (NSString *)gToLB:(NSString *)weightVlaue; | |||
@end |
@@ -25,12 +25,13 @@ typedef NS_ENUM(NSUInteger, BleCoffeeTimingWorkType) { | |||
typedef enum : NSUInteger { | |||
UNIT_g = 0, | |||
UNIT_ml, | |||
UNIT_lb, | |||
UNIT_oz, | |||
UNIT_kg, | |||
UNIT_jin | |||
UNIT_g = 0, //g | |||
UNIT_ml = 1, // | |||
UNIT_lb = 2, //lb:oz | |||
UNIT_oz = 3, //oz | |||
UNIT_kg = 4, //kg | |||
UNIT_jin = 5, //斤 | |||
UNIT_LB = 10,//lb | |||
} GN_UnitEnum; | |||