Browse Source

update demo UI and sdk version v2.1-20201029

tags/v2.4
elinkthings 4 years ago
parent
commit
4bb9495fef

+ 32
- 19
AIFit-Demo/Base.lproj/Main.storyboard View File

<?xml version="1.0" encoding="UTF-8"?> <?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="lGz-vQ-rIV">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="lGz-vQ-rIV">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Kt-f7-SXj"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5Kt-f7-SXj">
<rect key="frame" x="10" y="25" width="355" height="35"/>
<rect key="frame" x="10" y="5" width="355" height="35"/>
<color key="backgroundColor" red="0.81568627450980391" green="1" blue="0.88235294117647056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.81568627450980391" green="1" blue="0.88235294117647056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="35" id="rKn-Ml-Igo"/> <constraint firstAttribute="height" constant="35" id="rKn-Ml-Igo"/>
</connections> </connections>
</button> </button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bzc-dA-DuA" userLabel="隔栏--------"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bzc-dA-DuA" userLabel="隔栏--------">
<rect key="frame" x="0.0" y="70" width="375" height="5"/>
<rect key="frame" x="0.0" y="50" width="375" height="5"/>
<color key="backgroundColor" red="0.66666668650000005" green="0.66666668650000005" blue="0.66666668650000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.66666668650000005" green="0.66666668650000005" blue="0.66666668650000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="5" id="Tgt-tF-HS7"/> <constraint firstAttribute="height" constant="5" id="Tgt-tF-HS7"/>
</constraints> </constraints>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User Info -&gt;" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="78Y-KE-lWH"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User Info -&gt;" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="78Y-KE-lWH">
<rect key="frame" x="10" y="80" width="90" height="30"/>
<rect key="frame" x="10" y="60" width="90" height="30"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="90" id="3zK-me-rOk"/> <constraint firstAttribute="width" constant="90" id="3zK-me-rOk"/>
<constraint firstAttribute="height" constant="30" id="Txo-Ni-992"/> <constraint firstAttribute="height" constant="30" id="Txo-Ni-992"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Unit:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gVu-AQ-2bu"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Unit:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gVu-AQ-2bu">
<rect key="frame" x="10" y="190" width="65" height="28"/>
<rect key="frame" x="10" y="170" width="65" height="28"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="65" id="B19-2X-DQV"/> <constraint firstAttribute="width" constant="65" id="B19-2X-DQV"/>
<constraint firstAttribute="height" constant="28" id="sd6-bi-owp"/> <constraint firstAttribute="height" constant="28" id="sd6-bi-owp"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="Zf3-rF-BZy"> <segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="Zf3-rF-BZy">
<rect key="frame" x="83" y="190" width="276" height="29"/>
<rect key="frame" x="83" y="168.5" width="276" height="32"/>
<segments> <segments>
<segment title="KG"/> <segment title="KG"/>
<segment title="LB"/> <segment title="LB"/>
</connections> </connections>
</segmentedControl> </segmentedControl>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MRu-AK-Tza" userLabel="隔栏--------"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MRu-AK-Tza" userLabel="隔栏--------">
<rect key="frame" x="0.0" y="228" width="375" height="6"/>
<rect key="frame" x="0.0" y="208" width="375" height="6"/>
<color key="backgroundColor" red="0.66666668650000005" green="0.66666668650000005" blue="0.66666668650000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.66666668650000005" green="0.66666668650000005" blue="0.66666668650000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="6" id="4EE-XR-4yP"/> <constraint firstAttribute="height" constant="6" id="4EE-XR-4yP"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="waM-g5-AjV"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="waM-g5-AjV">
<rect key="frame" x="0.0" y="240" width="375" height="427"/>
<rect key="frame" x="0.0" y="220" width="375" height="447"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tips" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xbU-hm-1Sk"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tips" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xbU-hm-1Sk">
<rect key="frame" x="5" y="0.0" width="365" height="30"/> <rect key="frame" x="5" y="0.0" width="365" height="30"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="vMl-1e-9Hx"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="vMl-1e-9Hx">
<rect key="frame" x="0.0" y="30" width="375" height="387"/>
<rect key="frame" x="0.0" y="30" width="375" height="407"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView> </tableView>
</subviews> </subviews>
</constraints> </constraints>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6kj-dC-o6z"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6kj-dC-o6z">
<rect key="frame" x="127.5" y="80" width="120" height="95.5"/>
<rect key="frame" x="127.5" y="60" width="120" height="95.5"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="120" id="kds-sZ-9g0"/> <constraint firstAttribute="width" constant="120" id="kds-sZ-9g0"/>
</constraints> </constraints>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b8T-HZ-nQw"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b8T-HZ-nQw">
<rect key="frame" x="261" y="110" width="85" height="36"/>
<rect key="frame" x="259" y="60" width="100" height="36"/>
<color key="backgroundColor" red="0.81568627450980391" green="1" blue="0.88235294117647056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.81568627450980391" green="1" blue="0.88235294117647056" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="36" id="Fh4-K7-OYJ"/>
<constraint firstAttribute="width" constant="85" id="Tyc-9q-bhQ"/>
<constraint firstAttribute="width" constant="100" id="7U3-92-1Rg"/>
<constraint firstAttribute="height" constant="36" id="XdX-rU-8wF"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="Edit User"/> <state key="normal" title="Edit User"/>
<action selector="editUser:" destination="lGz-vQ-rIV" eventType="touchUpInside" id="xiI-7j-PIm"/> <action selector="editUser:" destination="lGz-vQ-rIV" eventType="touchUpInside" id="xiI-7j-PIm"/>
</connections> </connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AC6-pg-HuU">
<rect key="frame" x="259" y="119.5" width="100" height="36"/>
<color key="backgroundColor" red="0.81568627449999997" green="1" blue="0.88235294119999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="TDZ-9A-76t"/>
<constraint firstAttribute="width" constant="100" id="nw2-0K-gzB"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<state key="normal" title="Get Offline History"/>
<connections>
<action selector="getOfflineHistory:" destination="lGz-vQ-rIV" eventType="touchUpInside" id="TGf-qU-nCH"/>
</connections>
</button>
</subviews> </subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="bzc-dA-DuA" firstAttribute="leading" secondItem="NkZ-Gv-FdY" secondAttribute="leading" id="3Lt-dy-cm0"/> <constraint firstItem="bzc-dA-DuA" firstAttribute="leading" secondItem="NkZ-Gv-FdY" secondAttribute="leading" id="3Lt-dy-cm0"/>
<constraint firstAttribute="trailing" secondItem="b8T-HZ-nQw" secondAttribute="trailing" constant="16" id="3Nz-EU-lFt"/>
<constraint firstAttribute="trailing" secondItem="bzc-dA-DuA" secondAttribute="trailing" id="5lo-tb-HYQ"/> <constraint firstAttribute="trailing" secondItem="bzc-dA-DuA" secondAttribute="trailing" id="5lo-tb-HYQ"/>
<constraint firstItem="78Y-KE-lWH" firstAttribute="top" secondItem="bzc-dA-DuA" secondAttribute="bottom" constant="5" id="B0k-kZ-Qh3"/> <constraint firstItem="78Y-KE-lWH" firstAttribute="top" secondItem="bzc-dA-DuA" secondAttribute="bottom" constant="5" id="B0k-kZ-Qh3"/>
<constraint firstItem="AC6-pg-HuU" firstAttribute="bottom" secondItem="6kj-dC-o6z" secondAttribute="bottom" id="EL7-Oj-rr0"/>
<constraint firstItem="gVu-AQ-2bu" firstAttribute="top" secondItem="78Y-KE-lWH" secondAttribute="bottom" constant="80" id="EQV-SW-PC5"/> <constraint firstItem="gVu-AQ-2bu" firstAttribute="top" secondItem="78Y-KE-lWH" secondAttribute="bottom" constant="80" id="EQV-SW-PC5"/>
<constraint firstItem="6kj-dC-o6z" firstAttribute="top" secondItem="78Y-KE-lWH" secondAttribute="top" id="GwU-eR-QsS"/> <constraint firstItem="6kj-dC-o6z" firstAttribute="top" secondItem="78Y-KE-lWH" secondAttribute="top" id="GwU-eR-QsS"/>
<constraint firstAttribute="trailing" secondItem="5Kt-f7-SXj" secondAttribute="trailing" constant="10" id="KlA-QB-HSu"/> <constraint firstAttribute="trailing" secondItem="5Kt-f7-SXj" secondAttribute="trailing" constant="10" id="KlA-QB-HSu"/>
<constraint firstAttribute="trailing" secondItem="MRu-AK-Tza" secondAttribute="trailing" id="QeK-C3-Lrf"/> <constraint firstAttribute="trailing" secondItem="MRu-AK-Tza" secondAttribute="trailing" id="QeK-C3-Lrf"/>
<constraint firstItem="Zf3-rF-BZy" firstAttribute="leading" secondItem="gVu-AQ-2bu" secondAttribute="trailing" constant="8" id="RCk-og-j5B"/> <constraint firstItem="Zf3-rF-BZy" firstAttribute="leading" secondItem="gVu-AQ-2bu" secondAttribute="trailing" constant="8" id="RCk-og-j5B"/>
<constraint firstItem="5Kt-f7-SXj" firstAttribute="leading" secondItem="NkZ-Gv-FdY" secondAttribute="leading" constant="10" id="Rla-9j-jdj"/> <constraint firstItem="5Kt-f7-SXj" firstAttribute="leading" secondItem="NkZ-Gv-FdY" secondAttribute="leading" constant="10" id="Rla-9j-jdj"/>
<constraint firstAttribute="trailing" secondItem="b8T-HZ-nQw" secondAttribute="trailing" constant="29" id="S1e-8O-kNf"/>
<constraint firstItem="gVu-AQ-2bu" firstAttribute="leading" secondItem="78Y-KE-lWH" secondAttribute="leading" id="TLW-5V-lLv"/> <constraint firstItem="gVu-AQ-2bu" firstAttribute="leading" secondItem="78Y-KE-lWH" secondAttribute="leading" id="TLW-5V-lLv"/>
<constraint firstAttribute="trailing" secondItem="Zf3-rF-BZy" secondAttribute="trailing" constant="16" id="UZu-dr-qec"/> <constraint firstAttribute="trailing" secondItem="Zf3-rF-BZy" secondAttribute="trailing" constant="16" id="UZu-dr-qec"/>
<constraint firstItem="b8T-HZ-nQw" firstAttribute="centerY" secondItem="6kj-dC-o6z" secondAttribute="centerY" id="YgB-Rw-dQ4"/>
<constraint firstItem="Zf3-rF-BZy" firstAttribute="centerY" secondItem="gVu-AQ-2bu" secondAttribute="centerY" id="Z3a-qD-19b"/> <constraint firstItem="Zf3-rF-BZy" firstAttribute="centerY" secondItem="gVu-AQ-2bu" secondAttribute="centerY" id="Z3a-qD-19b"/>
<constraint firstItem="waM-g5-AjV" firstAttribute="top" secondItem="MRu-AK-Tza" secondAttribute="bottom" constant="6" id="cFk-yZ-hTb"/> <constraint firstItem="waM-g5-AjV" firstAttribute="top" secondItem="MRu-AK-Tza" secondAttribute="bottom" constant="6" id="cFk-yZ-hTb"/>
<constraint firstItem="MRu-AK-Tza" firstAttribute="top" secondItem="gVu-AQ-2bu" secondAttribute="bottom" constant="10" id="cQ0-3t-WFB"/> <constraint firstItem="MRu-AK-Tza" firstAttribute="top" secondItem="gVu-AQ-2bu" secondAttribute="bottom" constant="10" id="cQ0-3t-WFB"/>
<constraint firstItem="MN7-HW-Fpp" firstAttribute="top" secondItem="waM-g5-AjV" secondAttribute="bottom" id="fVN-gd-61G"/> <constraint firstItem="MN7-HW-Fpp" firstAttribute="top" secondItem="waM-g5-AjV" secondAttribute="bottom" id="fVN-gd-61G"/>
<constraint firstItem="MRu-AK-Tza" firstAttribute="leading" secondItem="NkZ-Gv-FdY" secondAttribute="leading" id="jXP-c0-g9T"/> <constraint firstItem="MRu-AK-Tza" firstAttribute="leading" secondItem="NkZ-Gv-FdY" secondAttribute="leading" id="jXP-c0-g9T"/>
<constraint firstItem="waM-g5-AjV" firstAttribute="leading" secondItem="NkZ-Gv-FdY" secondAttribute="leading" id="lVq-CY-oPR"/> <constraint firstItem="waM-g5-AjV" firstAttribute="leading" secondItem="NkZ-Gv-FdY" secondAttribute="leading" id="lVq-CY-oPR"/>
<constraint firstAttribute="trailing" secondItem="AC6-pg-HuU" secondAttribute="trailing" constant="16" id="loL-Ht-lA7"/>
<constraint firstItem="b8T-HZ-nQw" firstAttribute="top" secondItem="6kj-dC-o6z" secondAttribute="top" id="pAg-79-qZn"/>
<constraint firstItem="78Y-KE-lWH" firstAttribute="leading" secondItem="5Kt-f7-SXj" secondAttribute="leading" id="rSV-bQ-38y"/> <constraint firstItem="78Y-KE-lWH" firstAttribute="leading" secondItem="5Kt-f7-SXj" secondAttribute="leading" id="rSV-bQ-38y"/>
<constraint firstItem="5Kt-f7-SXj" firstAttribute="top" secondItem="lRu-BS-3Ti" secondAttribute="bottom" constant="5" id="sU1-UF-vn7"/> <constraint firstItem="5Kt-f7-SXj" firstAttribute="top" secondItem="lRu-BS-3Ti" secondAttribute="bottom" constant="5" id="sU1-UF-vn7"/>
<constraint firstAttribute="trailing" secondItem="waM-g5-AjV" secondAttribute="trailing" id="xLI-R1-Qbc"/> <constraint firstAttribute="trailing" secondItem="waM-g5-AjV" secondAttribute="trailing" id="xLI-R1-Qbc"/>

+ 26
- 13
AIFit-Demo/MainViewController.m View File

[weakSelf syncWeighingUserToBle]; [weakSelf syncWeighingUserToBle];
//If no need offline history function, do not call this method //If no need offline history function, do not call this method
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf syncOfflineUserListToBle]; [weakSelf syncOfflineUserListToBle];
}); });
} }




- (IBAction)getOfflineHistory:(id)sender {
//request history (If no need offline history function, do not call this method)
[[WriteToBLEManager shareManager] requestOfflineHistory];
}



// click sync user button // click sync user button
- (void)syncWeighingUserToBle { - (void)syncWeighingUserToBle {
[self syncWeighingUserToBle]; [self syncWeighingUserToBle];
}); });


//sync offline userlist(If no need offline history function, do not call this method)
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self syncOfflineUserListToBle];
});
//request history (If no need offline history function, do not call this method)
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[WriteToBLEManager shareManager] requestOfflineHistory];
});
// //sync offline userlist(If no need offline history function, do not call this method)
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// [self syncOfflineUserListToBle];
// });


break; break;
} }
[self syncWeighingUserToBle]; [self syncWeighingUserToBle];
// If no need offline history function, do not call this method // If no need offline history function, do not call this method
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self syncOfflineUserListToBle]; [self syncOfflineUserListToBle];
}); });
//If no need offline history function, do not implement this callback //If no need offline history function, do not implement this callback
- (void)AnalysisBLEDataManager:(AnalysisBLEDataManager *)analysisManager backOfflineHistorys:(NSMutableArray <UserInfoModel *> *)historysMutableArr { - (void)AnalysisBLEDataManager:(AnalysisBLEDataManager *)analysisManager backOfflineHistorys:(NSMutableArray <UserInfoModel *> *)historysMutableArr {
_tipLB.text = [NSString stringWithFormat:@"Got %zd offline historys! check sdk log.",historysMutableArr.count];
// _tipLB.text = [NSString stringWithFormat:@"Got %zd offline historys! check sdk log.",historysMutableArr.count];
//
// for (UserInfoModel *info in historysMutableArr) {
// NSLog(@"---get offline history:\n %@",info);
// }
NSString *title = [NSString stringWithFormat:@"Got %zd offline historys!",historysMutableArr.count];
NSMutableString *strM = [NSMutableString string];
for (UserInfoModel *info in historysMutableArr) { for (UserInfoModel *info in historysMutableArr) {
NSLog(@"---get offline history:\n %@",info); NSLog(@"---get offline history:\n %@",info);
[strM appendString:[NSString stringWithFormat:@"%@\n-----------------\n",info]];
} }
[[[UIAlertView alloc] initWithTitle:title message:strM delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] show];


} }



+ 0
- 2
InetBleSDK/Products/InetBleSDK.framework/Headers/AlgorithmSDK.h View File

// //
// Algorithm.h // Algorithm.h
// GreatBody
//
// Created by steven wu on 2019/6/25. // Created by steven wu on 2019/6/25.
// //



+ 2
- 5
InetBleSDK/Products/InetBleSDK.framework/Headers/BfsCalculateSDK.h View File

// //
// FRK_fatScalesSDK.h
// FRK_fatScalesSDK
//
// Created by zhang on 17/2/24.
// Copyright © 2017年 taolei. All rights reserved.
// BfsCalculateSDK
// Created by steven wu on 2019/6/25.
// //


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

BIN
InetBleSDK/Products/InetBleSDK.framework/InetBleSDK View File


Loading…
Cancel
Save