@@ -0,0 +1,71 @@ | |||
// | |||
// Algorithm.h | |||
// Created by steven wu on 2019/6/25. | |||
// | |||
#import <Foundation/Foundation.h> | |||
typedef NS_ENUM(NSInteger, AlgUserSex) { | |||
AlgUserSex_Male = 1, | |||
AlgUserSex_Female = 2, | |||
}; | |||
@interface AlgorithmModel : NSObject | |||
///bmi | |||
@property (nonatomic, copy) NSString *bmi; | |||
///体脂率 bodyfatRate | |||
@property (nonatomic, copy) NSString *bfr; | |||
///皮下脂肪率 subcutaneousFat rate | |||
@property (nonatomic, copy) NSString *sfr; | |||
///内脏脂肪率 visceralFat rate | |||
@property (nonatomic, copy) NSString *uvi; | |||
///肌肉率 muscle rate | |||
@property (nonatomic, copy) NSString *rom; | |||
///基础代谢率 BMR | |||
@property (nonatomic, copy) NSString *bmr; | |||
///骨骼质量 boneMass | |||
@property (nonatomic, copy) NSString *bm; | |||
///水含量vwc: moisture | |||
@property (nonatomic, copy) NSString *vwc; | |||
///身体年龄 physicalAge | |||
@property (nonatomic, assign) NSString *physicalAge; | |||
///蛋白率 proteinRate | |||
@property (nonatomic, copy) NSString *pp; | |||
/* For example | |||
bmi : 23.7; | |||
bfr : 22.2; | |||
rom : 51; | |||
vwc : 57; | |||
bm : 2.8; | |||
sfr : 19.9; | |||
bmi : 1549; | |||
pp : 16.6; | |||
uvi : 7; | |||
physicalAge : 26; | |||
*/ | |||
@end | |||
@interface AlgorithmSDK : NSObject | |||
/** | |||
* Inet AlgorithmSDK 品网算法 | |||
* Incoming user information + adc, calculate 10 original body fat data (the connected scale is calculated by the scale end and transmitted to the app via Bluetooth, and the broadcast scale calls this SDK calculation) 传入用户信息+adc,计算出10项原始体脂数据(连接秤由秤端计算并蓝牙传给app,广播秤调用本SDK计算) | |||
* eg: | |||
* kgWeight: 50.6 age: 25 height: 175 | |||
* 输入参数范围: | |||
* weight > 0 && weight <= 220 && | |||
userAge >= 0 && userAge <= 120 && | |||
userHeight > 0 && userHeight < 270 && | |||
(userSex == AlgUserSex_Male || userSex == AlgUserSex_Female) && | |||
adc > 0 && adc <= 1000 | |||
*/ | |||
+ (AlgorithmModel *)getBodyfatWithWeight:(double)kgWeight adc:(int)adc sex:(AlgUserSex)sex age:(int)age height:(int)height; | |||
@end | |||
@@ -0,0 +1,94 @@ | |||
// | |||
// BfsCalculateSDK | |||
// Created by steven wu on 2019/6/25. | |||
// | |||
#import <Foundation/Foundation.h> | |||
typedef NS_ENUM(NSInteger, BfsUserSex) { | |||
BfsUserSex_Male = 1, | |||
BfsUserSex_Female = 2, | |||
}; | |||
@interface BfsCalculateItem : NSObject | |||
/** | |||
* 标准体重 standardWeight | |||
*/ | |||
@property (nonatomic, assign) double standardWeight; | |||
/** | |||
* 体重控制量 weightControl | |||
*/ | |||
@property (nonatomic, assign) double weightControl; | |||
/** | |||
* 脂肪量 fatMass | |||
*/ | |||
@property (nonatomic, assign) double fatMass; | |||
/** | |||
* 去脂体重 weightWithoutFat | |||
*/ | |||
@property (nonatomic, assign) double weightWithoutFat; | |||
/** | |||
* 肌肉量 muscleMass | |||
*/ | |||
@property (nonatomic, assign) double muscleMass; | |||
/** | |||
* 蛋白量 proteinMass | |||
*/ | |||
@property (nonatomic, assign) double proteinMass; | |||
/** | |||
* 肥胖等级 fatlevel | |||
* 1.标准 standard | |||
* 2.偏瘦 thin | |||
* 3.偏重 over weight | |||
* 4.体重不足 insufficient | |||
* 5.超重 Severely overweight | |||
*/ | |||
@property (nonatomic, assign) NSInteger fatlevel; | |||
/** For example | |||
(double) _standardWeight = 66.5 | |||
(double) _weightControl = 6.1999998092651367 | |||
(double) _fatMass = 16.100000381469727 | |||
(double) _weightWithoutFat = 56.599998474121094 | |||
(double) _muscleMass = 37.099998474121094 | |||
(double) _proteinMass = 12.100000381469727 | |||
(NSInteger) _fatlevel = 1 | |||
*/ | |||
@end | |||
@interface BfsCalculateSDK : NSObject | |||
/** | |||
* According to the bfr / rom / pp in the basic parameters returned by the scale, calculate 7 additional items that the App needs to display 根据秤返回的基本参数中的bfr/rom/pp,计算出App需要额外显示的7个项目 | |||
*@param sex | |||
* 性别: 男:1 女 2 | |||
* @param height | |||
* 身高:1~270(CM) | |||
* @param weight | |||
* 体重:1~220(KG) | |||
* @param bfr | |||
* 体脂率 43.6 | |||
* @param rom | |||
* 肌肉率 55.2 | |||
* @param pp | |||
* 蛋白率 25.9 | |||
* @return BfsCalculateItem | |||
* | |||
* 输入参数范围: | |||
* weight > 0 && weight <= 220 && | |||
height > 0 && height < 270 && | |||
(sex == BfsUserSex_Male || sex == BfsUserSex_Female) && | |||
bfr.floatValue > 0 && bfr.floatValue <= 100 && | |||
rom.floatValue > 0 && rom.floatValue <= 100 && | |||
pp.floatValue > 0 && pp.floatValue <= 100 | |||
*/ | |||
+ (BfsCalculateItem *)getBodyfatItemWithSex:(BfsUserSex)sex height:(NSInteger)height weight:(double)weight bfr:(NSString *)bfr rom:(NSString *)rom pp:(NSString *)pp; | |||
@end |
@@ -0,0 +1,132 @@ | |||
<?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>files</key> | |||
<dict> | |||
<key>Headers/AlgorithmSDK.h</key> | |||
<data> | |||
JQkkr2ZJ3Kbjq095HyJU+S716g0= | |||
</data> | |||
<key>Headers/BfsCalculateSDK.h</key> | |||
<data> | |||
LawKPRIw+wuehTohkzMvlOO4HxA= | |||
</data> | |||
<key>Info.plist</key> | |||
<data> | |||
Be9tVKgQmFFLhacIXH1VFXS56Uc= | |||
</data> | |||
</dict> | |||
<key>files2</key> | |||
<dict> | |||
<key>Headers/AlgorithmSDK.h</key> | |||
<dict> | |||
<key>hash</key> | |||
<data> | |||
JQkkr2ZJ3Kbjq095HyJU+S716g0= | |||
</data> | |||
<key>hash2</key> | |||
<data> | |||
1t0f3V1IHYWpeu5/nC/aPoVMO99K4WegYbOpQR/1vR0= | |||
</data> | |||
</dict> | |||
<key>Headers/BfsCalculateSDK.h</key> | |||
<dict> | |||
<key>hash</key> | |||
<data> | |||
LawKPRIw+wuehTohkzMvlOO4HxA= | |||
</data> | |||
<key>hash2</key> | |||
<data> | |||
8EyEMOnZlrKekg7fpxaTl5scQMy2UsbI0lVeJ3V/2O8= | |||
</data> | |||
</dict> | |||
</dict> | |||
<key>rules</key> | |||
<dict> | |||
<key>^.*</key> | |||
<true/> | |||
<key>^.*\.lproj/</key> | |||
<dict> | |||
<key>optional</key> | |||
<true/> | |||
<key>weight</key> | |||
<real>1000</real> | |||
</dict> | |||
<key>^.*\.lproj/locversion.plist$</key> | |||
<dict> | |||
<key>omit</key> | |||
<true/> | |||
<key>weight</key> | |||
<real>1100</real> | |||
</dict> | |||
<key>^Base\.lproj/</key> | |||
<dict> | |||
<key>weight</key> | |||
<real>1010</real> | |||
</dict> | |||
<key>^version.plist$</key> | |||
<true/> | |||
</dict> | |||
<key>rules2</key> | |||
<dict> | |||
<key>.*\.dSYM($|/)</key> | |||
<dict> | |||
<key>weight</key> | |||
<real>11</real> | |||
</dict> | |||
<key>^(.*/)?\.DS_Store$</key> | |||
<dict> | |||
<key>omit</key> | |||
<true/> | |||
<key>weight</key> | |||
<real>2000</real> | |||
</dict> | |||
<key>^.*</key> | |||
<true/> | |||
<key>^.*\.lproj/</key> | |||
<dict> | |||
<key>optional</key> | |||
<true/> | |||
<key>weight</key> | |||
<real>1000</real> | |||
</dict> | |||
<key>^.*\.lproj/locversion.plist$</key> | |||
<dict> | |||
<key>omit</key> | |||
<true/> | |||
<key>weight</key> | |||
<real>1100</real> | |||
</dict> | |||
<key>^Base\.lproj/</key> | |||
<dict> | |||
<key>weight</key> | |||
<real>1010</real> | |||
</dict> | |||
<key>^Info\.plist$</key> | |||
<dict> | |||
<key>omit</key> | |||
<true/> | |||
<key>weight</key> | |||
<real>20</real> | |||
</dict> | |||
<key>^PkgInfo$</key> | |||
<dict> | |||
<key>omit</key> | |||
<true/> | |||
<key>weight</key> | |||
<real>20</real> | |||
</dict> | |||
<key>^embedded\.provisionprofile$</key> | |||
<dict> | |||
<key>weight</key> | |||
<real>20</real> | |||
</dict> | |||
<key>^version\.plist$</key> | |||
<dict> | |||
<key>weight</key> | |||
<real>20</real> | |||
</dict> | |||
</dict> | |||
</dict> | |||
</plist> |
@@ -0,0 +1,363 @@ | |||
// !$*UTF8*$! | |||
{ | |||
archiveVersion = 1; | |||
classes = { | |||
}; | |||
objectVersion = 50; | |||
objects = { | |||
/* Begin PBXBuildFile section */ | |||
9595F999265BAEAE0051E006 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9595F998265BAEAE0051E006 /* AppDelegate.m */; }; | |||
9595F99C265BAEAE0051E006 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9595F99B265BAEAE0051E006 /* SceneDelegate.m */; }; | |||
9595F99F265BAEAE0051E006 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9595F99E265BAEAE0051E006 /* ViewController.m */; }; | |||
9595F9A2265BAEAE0051E006 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9595F9A0265BAEAE0051E006 /* Main.storyboard */; }; | |||
9595F9A4265BAEB00051E006 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9595F9A3265BAEB00051E006 /* Assets.xcassets */; }; | |||
9595F9A7265BAEB00051E006 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9595F9A5265BAEB00051E006 /* LaunchScreen.storyboard */; }; | |||
9595F9AA265BAEB00051E006 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9595F9A9265BAEB00051E006 /* main.m */; }; | |||
9595F9EB265C92800051E006 /* BodyFatAlgorithmSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9595F9EA265C92800051E006 /* BodyFatAlgorithmSDK.framework */; }; | |||
/* End PBXBuildFile section */ | |||
/* Begin PBXFileReference section */ | |||
9595F994265BAEAE0051E006 /* BodyFatAlgorithmSDK_Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BodyFatAlgorithmSDK_Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
9595F997265BAEAE0051E006 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; | |||
9595F998265BAEAE0051E006 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; | |||
9595F99A265BAEAE0051E006 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; }; | |||
9595F99B265BAEAE0051E006 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; }; | |||
9595F99D265BAEAE0051E006 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; }; | |||
9595F99E265BAEAE0051E006 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; }; | |||
9595F9A1265BAEAE0051E006 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; | |||
9595F9A3265BAEB00051E006 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | |||
9595F9A6265BAEB00051E006 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | |||
9595F9A8265BAEB00051E006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | |||
9595F9A9265BAEB00051E006 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; | |||
9595F9EA265C92800051E006 /* BodyFatAlgorithmSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = BodyFatAlgorithmSDK.framework; sourceTree = SOURCE_ROOT; }; | |||
/* End PBXFileReference section */ | |||
/* Begin PBXFrameworksBuildPhase section */ | |||
9595F991265BAEAE0051E006 /* Frameworks */ = { | |||
isa = PBXFrameworksBuildPhase; | |||
buildActionMask = 2147483647; | |||
files = ( | |||
9595F9EB265C92800051E006 /* BodyFatAlgorithmSDK.framework in Frameworks */, | |||
); | |||
runOnlyForDeploymentPostprocessing = 0; | |||
}; | |||
/* End PBXFrameworksBuildPhase section */ | |||
/* Begin PBXGroup section */ | |||
9595F98B265BAEAE0051E006 = { | |||
isa = PBXGroup; | |||
children = ( | |||
9595F996265BAEAE0051E006 /* BodyFatAlgorithmSDK_Demo */, | |||
9595F995265BAEAE0051E006 /* Products */, | |||
); | |||
sourceTree = "<group>"; | |||
}; | |||
9595F995265BAEAE0051E006 /* Products */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
9595F994265BAEAE0051E006 /* BodyFatAlgorithmSDK_Demo.app */, | |||
); | |||
name = Products; | |||
sourceTree = "<group>"; | |||
}; | |||
9595F996265BAEAE0051E006 /* BodyFatAlgorithmSDK_Demo */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
9595F9EA265C92800051E006 /* BodyFatAlgorithmSDK.framework */, | |||
9595F997265BAEAE0051E006 /* AppDelegate.h */, | |||
9595F998265BAEAE0051E006 /* AppDelegate.m */, | |||
9595F99A265BAEAE0051E006 /* SceneDelegate.h */, | |||
9595F99B265BAEAE0051E006 /* SceneDelegate.m */, | |||
9595F99D265BAEAE0051E006 /* ViewController.h */, | |||
9595F99E265BAEAE0051E006 /* ViewController.m */, | |||
9595F9A0265BAEAE0051E006 /* Main.storyboard */, | |||
9595F9A3265BAEB00051E006 /* Assets.xcassets */, | |||
9595F9A5265BAEB00051E006 /* LaunchScreen.storyboard */, | |||
9595F9A8265BAEB00051E006 /* Info.plist */, | |||
9595F9A9265BAEB00051E006 /* main.m */, | |||
); | |||
path = BodyFatAlgorithmSDK_Demo; | |||
sourceTree = "<group>"; | |||
}; | |||
/* End PBXGroup section */ | |||
/* Begin PBXNativeTarget section */ | |||
9595F993265BAEAE0051E006 /* BodyFatAlgorithmSDK_Demo */ = { | |||
isa = PBXNativeTarget; | |||
buildConfigurationList = 9595F9AD265BAEB00051E006 /* Build configuration list for PBXNativeTarget "BodyFatAlgorithmSDK_Demo" */; | |||
buildPhases = ( | |||
9595F990265BAEAE0051E006 /* Sources */, | |||
9595F991265BAEAE0051E006 /* Frameworks */, | |||
9595F992265BAEAE0051E006 /* Resources */, | |||
); | |||
buildRules = ( | |||
); | |||
dependencies = ( | |||
); | |||
name = BodyFatAlgorithmSDK_Demo; | |||
productName = BodyFatAlgorithmSDK_Demo; | |||
productReference = 9595F994265BAEAE0051E006 /* BodyFatAlgorithmSDK_Demo.app */; | |||
productType = "com.apple.product-type.application"; | |||
}; | |||
/* End PBXNativeTarget section */ | |||
/* Begin PBXProject section */ | |||
9595F98C265BAEAE0051E006 /* Project object */ = { | |||
isa = PBXProject; | |||
attributes = { | |||
LastUpgradeCheck = 1230; | |||
TargetAttributes = { | |||
9595F993265BAEAE0051E006 = { | |||
CreatedOnToolsVersion = 12.3; | |||
}; | |||
}; | |||
}; | |||
buildConfigurationList = 9595F98F265BAEAE0051E006 /* Build configuration list for PBXProject "BodyFatAlgorithmSDK_Demo" */; | |||
compatibilityVersion = "Xcode 9.3"; | |||
developmentRegion = en; | |||
hasScannedForEncodings = 0; | |||
knownRegions = ( | |||
en, | |||
Base, | |||
); | |||
mainGroup = 9595F98B265BAEAE0051E006; | |||
productRefGroup = 9595F995265BAEAE0051E006 /* Products */; | |||
projectDirPath = ""; | |||
projectRoot = ""; | |||
targets = ( | |||
9595F993265BAEAE0051E006 /* BodyFatAlgorithmSDK_Demo */, | |||
); | |||
}; | |||
/* End PBXProject section */ | |||
/* Begin PBXResourcesBuildPhase section */ | |||
9595F992265BAEAE0051E006 /* Resources */ = { | |||
isa = PBXResourcesBuildPhase; | |||
buildActionMask = 2147483647; | |||
files = ( | |||
9595F9A7265BAEB00051E006 /* LaunchScreen.storyboard in Resources */, | |||
9595F9A4265BAEB00051E006 /* Assets.xcassets in Resources */, | |||
9595F9A2265BAEAE0051E006 /* Main.storyboard in Resources */, | |||
); | |||
runOnlyForDeploymentPostprocessing = 0; | |||
}; | |||
/* End PBXResourcesBuildPhase section */ | |||
/* Begin PBXSourcesBuildPhase section */ | |||
9595F990265BAEAE0051E006 /* Sources */ = { | |||
isa = PBXSourcesBuildPhase; | |||
buildActionMask = 2147483647; | |||
files = ( | |||
9595F99F265BAEAE0051E006 /* ViewController.m in Sources */, | |||
9595F999265BAEAE0051E006 /* AppDelegate.m in Sources */, | |||
9595F9AA265BAEB00051E006 /* main.m in Sources */, | |||
9595F99C265BAEAE0051E006 /* SceneDelegate.m in Sources */, | |||
); | |||
runOnlyForDeploymentPostprocessing = 0; | |||
}; | |||
/* End PBXSourcesBuildPhase section */ | |||
/* Begin PBXVariantGroup section */ | |||
9595F9A0265BAEAE0051E006 /* Main.storyboard */ = { | |||
isa = PBXVariantGroup; | |||
children = ( | |||
9595F9A1265BAEAE0051E006 /* Base */, | |||
); | |||
name = Main.storyboard; | |||
sourceTree = "<group>"; | |||
}; | |||
9595F9A5265BAEB00051E006 /* LaunchScreen.storyboard */ = { | |||
isa = PBXVariantGroup; | |||
children = ( | |||
9595F9A6265BAEB00051E006 /* Base */, | |||
); | |||
name = LaunchScreen.storyboard; | |||
sourceTree = "<group>"; | |||
}; | |||
/* End PBXVariantGroup section */ | |||
/* Begin XCBuildConfiguration section */ | |||
9595F9AB265BAEB00051E006 /* Debug */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ALWAYS_SEARCH_USER_PATHS = NO; | |||
CLANG_ANALYZER_NONNULL = YES; | |||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | |||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | |||
CLANG_CXX_LIBRARY = "libc++"; | |||
CLANG_ENABLE_MODULES = YES; | |||
CLANG_ENABLE_OBJC_ARC = YES; | |||
CLANG_ENABLE_OBJC_WEAK = YES; | |||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | |||
CLANG_WARN_BOOL_CONVERSION = YES; | |||
CLANG_WARN_COMMA = YES; | |||
CLANG_WARN_CONSTANT_CONVERSION = YES; | |||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | |||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | |||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | |||
CLANG_WARN_EMPTY_BODY = YES; | |||
CLANG_WARN_ENUM_CONVERSION = YES; | |||
CLANG_WARN_INFINITE_RECURSION = YES; | |||
CLANG_WARN_INT_CONVERSION = YES; | |||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | |||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; | |||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | |||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | |||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; | |||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | |||
CLANG_WARN_STRICT_PROTOTYPES = YES; | |||
CLANG_WARN_SUSPICIOUS_MOVE = YES; | |||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; | |||
CLANG_WARN_UNREACHABLE_CODE = YES; | |||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | |||
COPY_PHASE_STRIP = NO; | |||
DEBUG_INFORMATION_FORMAT = dwarf; | |||
ENABLE_STRICT_OBJC_MSGSEND = YES; | |||
ENABLE_TESTABILITY = YES; | |||
GCC_C_LANGUAGE_STANDARD = gnu11; | |||
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 = 14.3; | |||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; | |||
MTL_FAST_MATH = YES; | |||
ONLY_ACTIVE_ARCH = YES; | |||
SDKROOT = iphoneos; | |||
}; | |||
name = Debug; | |||
}; | |||
9595F9AC265BAEB00051E006 /* Release */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ALWAYS_SEARCH_USER_PATHS = NO; | |||
CLANG_ANALYZER_NONNULL = YES; | |||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | |||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; | |||
CLANG_CXX_LIBRARY = "libc++"; | |||
CLANG_ENABLE_MODULES = YES; | |||
CLANG_ENABLE_OBJC_ARC = YES; | |||
CLANG_ENABLE_OBJC_WEAK = YES; | |||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; | |||
CLANG_WARN_BOOL_CONVERSION = YES; | |||
CLANG_WARN_COMMA = YES; | |||
CLANG_WARN_CONSTANT_CONVERSION = YES; | |||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; | |||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | |||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES; | |||
CLANG_WARN_EMPTY_BODY = YES; | |||
CLANG_WARN_ENUM_CONVERSION = YES; | |||
CLANG_WARN_INFINITE_RECURSION = YES; | |||
CLANG_WARN_INT_CONVERSION = YES; | |||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; | |||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; | |||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | |||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | |||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; | |||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | |||
CLANG_WARN_STRICT_PROTOTYPES = YES; | |||
CLANG_WARN_SUSPICIOUS_MOVE = YES; | |||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; | |||
CLANG_WARN_UNREACHABLE_CODE = YES; | |||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | |||
COPY_PHASE_STRIP = NO; | |||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | |||
ENABLE_NS_ASSERTIONS = NO; | |||
ENABLE_STRICT_OBJC_MSGSEND = YES; | |||
GCC_C_LANGUAGE_STANDARD = gnu11; | |||
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 = 14.3; | |||
MTL_ENABLE_DEBUG_INFO = NO; | |||
MTL_FAST_MATH = YES; | |||
SDKROOT = iphoneos; | |||
VALIDATE_PRODUCT = YES; | |||
}; | |||
name = Release; | |||
}; | |||
9595F9AE265BAEB00051E006 /* Debug */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; | |||
CODE_SIGN_STYLE = Automatic; | |||
DEVELOPMENT_TEAM = ZS5NB5WV7X; | |||
FRAMEWORK_SEARCH_PATHS = ( | |||
"$(inherited)", | |||
"$(PROJECT_DIR)/BodyFatAlgorithmSDK/Products", | |||
"$(PROJECT_DIR)", | |||
); | |||
INFOPLIST_FILE = BodyFatAlgorithmSDK_Demo/Info.plist; | |||
LD_RUNPATH_SEARCH_PATHS = ( | |||
"$(inherited)", | |||
"@executable_path/Frameworks", | |||
); | |||
PRODUCT_BUNDLE_IDENTIFIER = "com.elinkthings.BodyFatAlgorithmSDK-Demo"; | |||
PRODUCT_NAME = "$(TARGET_NAME)"; | |||
TARGETED_DEVICE_FAMILY = "1,2"; | |||
}; | |||
name = Debug; | |||
}; | |||
9595F9AF265BAEB00051E006 /* Release */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; | |||
CODE_SIGN_STYLE = Automatic; | |||
DEVELOPMENT_TEAM = ZS5NB5WV7X; | |||
FRAMEWORK_SEARCH_PATHS = ( | |||
"$(inherited)", | |||
"$(PROJECT_DIR)/BodyFatAlgorithmSDK/Products", | |||
"$(PROJECT_DIR)", | |||
); | |||
INFOPLIST_FILE = BodyFatAlgorithmSDK_Demo/Info.plist; | |||
LD_RUNPATH_SEARCH_PATHS = ( | |||
"$(inherited)", | |||
"@executable_path/Frameworks", | |||
); | |||
PRODUCT_BUNDLE_IDENTIFIER = "com.elinkthings.BodyFatAlgorithmSDK-Demo"; | |||
PRODUCT_NAME = "$(TARGET_NAME)"; | |||
TARGETED_DEVICE_FAMILY = "1,2"; | |||
}; | |||
name = Release; | |||
}; | |||
/* End XCBuildConfiguration section */ | |||
/* Begin XCConfigurationList section */ | |||
9595F98F265BAEAE0051E006 /* Build configuration list for PBXProject "BodyFatAlgorithmSDK_Demo" */ = { | |||
isa = XCConfigurationList; | |||
buildConfigurations = ( | |||
9595F9AB265BAEB00051E006 /* Debug */, | |||
9595F9AC265BAEB00051E006 /* Release */, | |||
); | |||
defaultConfigurationIsVisible = 0; | |||
defaultConfigurationName = Release; | |||
}; | |||
9595F9AD265BAEB00051E006 /* Build configuration list for PBXNativeTarget "BodyFatAlgorithmSDK_Demo" */ = { | |||
isa = XCConfigurationList; | |||
buildConfigurations = ( | |||
9595F9AE265BAEB00051E006 /* Debug */, | |||
9595F9AF265BAEB00051E006 /* Release */, | |||
); | |||
defaultConfigurationIsVisible = 0; | |||
defaultConfigurationName = Release; | |||
}; | |||
/* End XCConfigurationList section */ | |||
}; | |||
rootObject = 9595F98C265BAEAE0051E006 /* Project object */; | |||
} |
@@ -0,0 +1,7 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<Workspace | |||
version = "1.0"> | |||
<FileRef | |||
location = "self:"> | |||
</FileRef> | |||
</Workspace> |
@@ -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> |
@@ -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>PreviewsEnabled</key> | |||
<false/> | |||
</dict> | |||
</plist> |
@@ -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>IssueFilterStyle</key> | |||
<string>ShowActiveSchemeOnly</string> | |||
<key>LiveSourceIssuesEnabled</key> | |||
<true/> | |||
<key>ShowSharedSchemesAutomaticallyEnabled</key> | |||
<true/> | |||
</dict> | |||
</plist> |
@@ -0,0 +1,6 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<Bucket | |||
uuid = "5707A18A-A9E4-4F6D-9C0E-DDF31679C023" | |||
type = "1" | |||
version = "2.0"> | |||
</Bucket> |
@@ -0,0 +1,14 @@ | |||
// | |||
// AppDelegate.h | |||
// BodyFatAlgorithmSDK_Demo | |||
// | |||
// Created by steven wu on 2021/5/24. | |||
// | |||
#import <UIKit/UIKit.h> | |||
@interface AppDelegate : UIResponder <UIApplicationDelegate> | |||
@end | |||
@@ -0,0 +1,40 @@ | |||
// | |||
// AppDelegate.m | |||
// BodyFatAlgorithmSDK_Demo | |||
// | |||
// Created by steven wu on 2021/5/24. | |||
// | |||
#import "AppDelegate.h" | |||
@interface AppDelegate () | |||
@end | |||
@implementation AppDelegate | |||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |||
// Override point for customization after application launch. | |||
return YES; | |||
} | |||
#pragma mark - UISceneSession lifecycle | |||
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { | |||
// Called when a new scene session is being created. | |||
// Use this method to select a configuration to create the new scene with. | |||
return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; | |||
} | |||
- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions { | |||
// Called when the user discards a scene session. | |||
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. | |||
// Use this method to release any resources that were specific to the discarded scenes, as they will not return. | |||
} | |||
@end |
@@ -0,0 +1,11 @@ | |||
{ | |||
"colors" : [ | |||
{ | |||
"idiom" : "universal" | |||
} | |||
], | |||
"info" : { | |||
"author" : "xcode", | |||
"version" : 1 | |||
} | |||
} |
@@ -0,0 +1,98 @@ | |||
{ | |||
"images" : [ | |||
{ | |||
"idiom" : "iphone", | |||
"scale" : "2x", | |||
"size" : "20x20" | |||
}, | |||
{ | |||
"idiom" : "iphone", | |||
"scale" : "3x", | |||
"size" : "20x20" | |||
}, | |||
{ | |||
"idiom" : "iphone", | |||
"scale" : "2x", | |||
"size" : "29x29" | |||
}, | |||
{ | |||
"idiom" : "iphone", | |||
"scale" : "3x", | |||
"size" : "29x29" | |||
}, | |||
{ | |||
"idiom" : "iphone", | |||
"scale" : "2x", | |||
"size" : "40x40" | |||
}, | |||
{ | |||
"idiom" : "iphone", | |||
"scale" : "3x", | |||
"size" : "40x40" | |||
}, | |||
{ | |||
"idiom" : "iphone", | |||
"scale" : "2x", | |||
"size" : "60x60" | |||
}, | |||
{ | |||
"idiom" : "iphone", | |||
"scale" : "3x", | |||
"size" : "60x60" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "1x", | |||
"size" : "20x20" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "2x", | |||
"size" : "20x20" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "1x", | |||
"size" : "29x29" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "2x", | |||
"size" : "29x29" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "1x", | |||
"size" : "40x40" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "2x", | |||
"size" : "40x40" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "1x", | |||
"size" : "76x76" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "2x", | |||
"size" : "76x76" | |||
}, | |||
{ | |||
"idiom" : "ipad", | |||
"scale" : "2x", | |||
"size" : "83.5x83.5" | |||
}, | |||
{ | |||
"idiom" : "ios-marketing", | |||
"scale" : "1x", | |||
"size" : "1024x1024" | |||
} | |||
], | |||
"info" : { | |||
"author" : "xcode", | |||
"version" : 1 | |||
} | |||
} |
@@ -0,0 +1,6 @@ | |||
{ | |||
"info" : { | |||
"author" : "xcode", | |||
"version" : 1 | |||
} | |||
} |
@@ -0,0 +1,25 @@ | |||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | |||
<dependencies> | |||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> | |||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | |||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |||
</dependencies> | |||
<scenes> | |||
<!--View Controller--> | |||
<scene sceneID="EHf-IW-A2E"> | |||
<objects> | |||
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> | |||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | |||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |||
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> | |||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> | |||
</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> |
@@ -0,0 +1,47 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r"> | |||
<device id="retina6_1" orientation="portrait" appearance="light"/> | |||
<dependencies> | |||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/> | |||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | |||
<capability name="System colors in document resources" minToolsVersion="11.0"/> | |||
<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"> | |||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | |||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | |||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |||
<subviews> | |||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Click anywhere" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wK5-uZ-sVi"> | |||
<rect key="frame" x="149.5" y="438" width="115.5" height="20.5"/> | |||
<fontDescription key="fontDescription" type="system" pointSize="17"/> | |||
<nil key="textColor"/> | |||
<nil key="highlightedColor"/> | |||
</label> | |||
</subviews> | |||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> | |||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> | |||
<constraints> | |||
<constraint firstItem="wK5-uZ-sVi" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="EKf-ep-B0Z"/> | |||
<constraint firstItem="wK5-uZ-sVi" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="zjw-vg-lHX"/> | |||
</constraints> | |||
</view> | |||
<connections> | |||
<outlet property="showLabel" destination="wK5-uZ-sVi" id="cJj-Q3-eC0"/> | |||
</connections> | |||
</viewController> | |||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | |||
</objects> | |||
<point key="canvasLocation" x="132" y="116"/> | |||
</scene> | |||
</scenes> | |||
<resources> | |||
<systemColor name="systemBackgroundColor"> | |||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | |||
</systemColor> | |||
</resources> | |||
</document> |
@@ -0,0 +1,66 @@ | |||
<?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>$(DEVELOPMENT_LANGUAGE)</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>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> | |||
<key>CFBundleShortVersionString</key> | |||
<string>1.0</string> | |||
<key>CFBundleVersion</key> | |||
<string>1</string> | |||
<key>LSRequiresIPhoneOS</key> | |||
<true/> | |||
<key>UIApplicationSceneManifest</key> | |||
<dict> | |||
<key>UIApplicationSupportsMultipleScenes</key> | |||
<false/> | |||
<key>UISceneConfigurations</key> | |||
<dict> | |||
<key>UIWindowSceneSessionRoleApplication</key> | |||
<array> | |||
<dict> | |||
<key>UISceneConfigurationName</key> | |||
<string>Default Configuration</string> | |||
<key>UISceneDelegateClassName</key> | |||
<string>SceneDelegate</string> | |||
<key>UISceneStoryboardFile</key> | |||
<string>Main</string> | |||
</dict> | |||
</array> | |||
</dict> | |||
</dict> | |||
<key>UIApplicationSupportsIndirectInputEvents</key> | |||
<true/> | |||
<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> | |||
<key>UISupportedInterfaceOrientations~ipad</key> | |||
<array> | |||
<string>UIInterfaceOrientationPortrait</string> | |||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | |||
<string>UIInterfaceOrientationLandscapeLeft</string> | |||
<string>UIInterfaceOrientationLandscapeRight</string> | |||
</array> | |||
</dict> | |||
</plist> |
@@ -0,0 +1,15 @@ | |||
// | |||
// SceneDelegate.h | |||
// BodyFatAlgorithmSDK_Demo | |||
// | |||
// Created by steven wu on 2021/5/24. | |||
// | |||
#import <UIKit/UIKit.h> | |||
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate> | |||
@property (strong, nonatomic) UIWindow * window; | |||
@end | |||
@@ -0,0 +1,57 @@ | |||
// | |||
// SceneDelegate.m | |||
// BodyFatAlgorithmSDK_Demo | |||
// | |||
// Created by steven wu on 2021/5/24. | |||
// | |||
#import "SceneDelegate.h" | |||
@interface SceneDelegate () | |||
@end | |||
@implementation SceneDelegate | |||
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { | |||
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. | |||
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene. | |||
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). | |||
} | |||
- (void)sceneDidDisconnect:(UIScene *)scene { | |||
// Called as the scene is being released by the system. | |||
// This occurs shortly after the scene enters the background, or when its session is discarded. | |||
// Release any resources associated with this scene that can be re-created the next time the scene connects. | |||
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). | |||
} | |||
- (void)sceneDidBecomeActive:(UIScene *)scene { | |||
// Called when the scene has moved from an inactive state to an active state. | |||
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. | |||
} | |||
- (void)sceneWillResignActive:(UIScene *)scene { | |||
// Called when the scene will move from an active state to an inactive state. | |||
// This may occur due to temporary interruptions (ex. an incoming phone call). | |||
} | |||
- (void)sceneWillEnterForeground:(UIScene *)scene { | |||
// Called as the scene transitions from the background to the foreground. | |||
// Use this method to undo the changes made on entering the background. | |||
} | |||
- (void)sceneDidEnterBackground:(UIScene *)scene { | |||
// Called as the scene transitions from the foreground to the background. | |||
// Use this method to save data, release shared resources, and store enough scene-specific state information | |||
// to restore the scene back to its current state. | |||
} | |||
@end |
@@ -0,0 +1,14 @@ | |||
// | |||
// ViewController.h | |||
// BodyFatAlgorithmSDK_Demo | |||
// | |||
// Created by steven wu on 2021/5/24. | |||
// | |||
#import <UIKit/UIKit.h> | |||
@interface ViewController : UIViewController | |||
@end | |||
@@ -0,0 +1,37 @@ | |||
// | |||
// ViewController.m | |||
// BodyFatAlgorithmSDK_Demo | |||
// | |||
// Created by steven wu on 2021/5/24. | |||
// | |||
#import "ViewController.h" | |||
#import <BodyFatAlgorithmSDK/AlgorithmSDK.h> | |||
#import <BodyFatAlgorithmSDK/BfsCalculateSDK.h> | |||
@interface ViewController () | |||
@property (weak, nonatomic) IBOutlet UILabel *showLabel; | |||
@end | |||
@implementation ViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
} | |||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { | |||
AlgorithmModel *alg = [AlgorithmSDK getBodyfatWithWeight:50.5 adc:560 sex:(AlgUserSex_Male) age:25 height:175]; | |||
BfsCalculateItem *item = [BfsCalculateSDK getBodyfatItemWithSex:(BfsUserSex_Male) height:175 weight:50.5 bfr:alg.bfr rom:alg.rom pp:alg.pp]; | |||
NSString *str = [NSString stringWithFormat:@"Test Result:\n\n bfr:%@ sfr:%@\n standardWeight:%.1f \n weightControl:%.1f",alg.bfr, alg.sfr, item.standardWeight, item.weightControl]; | |||
self.showLabel.text = str; | |||
} | |||
@end |
@@ -0,0 +1,18 @@ | |||
// | |||
// main.m | |||
// BodyFatAlgorithmSDK_Demo | |||
// | |||
// Created by steven wu on 2021/5/24. | |||
// | |||
#import <UIKit/UIKit.h> | |||
#import "AppDelegate.h" | |||
int main(int argc, char * argv[]) { | |||
NSString * appDelegateClassName; | |||
@autoreleasepool { | |||
// Setup code that might create autoreleased objects goes here. | |||
appDelegateClassName = NSStringFromClass([AppDelegate class]); | |||
} | |||
return UIApplicationMain(argc, argv, nil, appDelegateClassName); | |||
} |