Browse Source

添加bugly抓取

leon 2 years ago
parent
commit
d9e0eb236f
30 changed files with 1136 additions and 255 deletions
  1. BIN
      .DS_Store
  2. BIN
      DanceGame/Bugly.framework/Bugly
  3. 163 0
      DanceGame/Bugly.framework/Headers/Bugly.h
  4. 141 0
      DanceGame/Bugly.framework/Headers/BuglyConfig.h
  5. 78 0
      DanceGame/Bugly.framework/Headers/BuglyLog.h
  6. 12 0
      DanceGame/Bugly.framework/Modules/module.modulemap
  7. BIN
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/.DS_Store
  8. 7 18
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/BLE/BTDataProcess.h
  9. 42 47
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/BLE/BTDataProcess.mm
  10. 43 35
      DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/IOSPlatformSDK.mm
  11. 32 4
      DanceGame/Classes/UnityAppController.mm
  12. 32 10
      DanceGame/Unity-iPhone.xcodeproj/project.pbxproj
  13. BIN
      DanceGame/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/duowan123.xcuserdatad/UserInterfaceState.xcuserstate
  14. BIN
      RunGame/.DS_Store
  15. BIN
      RunGame/Bugly.framework/Bugly
  16. 163 0
      RunGame/Bugly.framework/Headers/Bugly.h
  17. 141 0
      RunGame/Bugly.framework/Headers/BuglyConfig.h
  18. 78 0
      RunGame/Bugly.framework/Headers/BuglyLog.h
  19. 12 0
      RunGame/Bugly.framework/Modules/module.modulemap
  20. 2 1
      RunGame/Classes/UnityAppController.h
  21. 35 5
      RunGame/Classes/UnityAppController.mm
  22. 2 0
      RunGame/Info.plist
  23. 8 18
      RunGame/SDK/BLE/BTDataProcess.h
  24. 42 48
      RunGame/SDK/BLE/BTDataProcess.mm
  25. 2 0
      RunGame/SDK/HTTP/HTTPDataProcession.m
  26. 34 58
      RunGame/SDK/IOSPlatformSDK.mm
  27. 0 1
      RunGame/SDK/Tool/MYFactoryManager.m
  28. 0 1
      RunGame/SDK/UI/AnimationVIew/AnimationView.m
  29. 67 9
      RunGame/Unity-iPhone.xcodeproj/project.pbxproj
  30. BIN
      RunGame/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/duowan123.xcuserdatad/UserInterfaceState.xcuserstate

BIN
.DS_Store


BIN
DanceGame/Bugly.framework/Bugly


+ 163 - 0
DanceGame/Bugly.framework/Headers/Bugly.h

@@ -0,0 +1,163 @@
+//
+//  Bugly.h
+//
+//  Version: 2.5(9)
+//
+//  Copyright (c) 2017年 Tencent. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import "BuglyConfig.h"
+#import "BuglyLog.h"
+
+BLY_START_NONNULL
+
+@interface Bugly : NSObject
+
+/**
+ *  初始化Bugly,使用默认BuglyConfigs
+ *
+ *  @param appId 注册Bugly分配的应用唯一标识
+ */
++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId;
+
+/**
+ *  使用指定配置初始化Bugly
+ *
+ *  @param appId 注册Bugly分配的应用唯一标识
+ *  @param config 传入配置的 BuglyConfig
+ */
++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId
+                config:(BuglyConfig * BLY_NULLABLE)config;
+
+/**
+ *  使用指定配置初始化Bugly
+ *
+ *  @param appId 注册Bugly分配的应用唯一标识
+ *  @param development 是否开发设备
+ *  @param config 传入配置的 BuglyConfig
+ */
++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId
+     developmentDevice:(BOOL)development
+                config:(BuglyConfig * BLY_NULLABLE)config;
+
+/**
+ *  设置用户标识
+ *
+ *  @param userId 用户标识
+ */
++ (void)setUserIdentifier:(NSString *)userId;
+
+/**
+ *  更新版本信息
+ *
+ *  @param version 应用版本信息
+ */
++ (void)updateAppVersion:(NSString *)version;
+
+/**
+ *  设置关键数据,随崩溃信息上报
+ *
+ *  @param value KEY
+ *  @param key VALUE
+ */
++ (void)setUserValue:(NSString *)value
+              forKey:(NSString *)key;
+
+/**
+ *  获取USER ID
+ *
+ *  @return USER ID
+ */
++ (NSString *)buglyUserIdentifier;
+
+/**
+ *  获取关键数据
+ *
+ *  @return 关键数据
+ */
++ (NSDictionary * BLY_NULLABLE)allUserValues;
+
+/**
+ *  设置标签
+ *
+ *  @param tag 标签ID,可在网站生成
+ */
++ (void)setTag:(NSUInteger)tag;
+
+/**
+ *  获取当前设置标签
+ *
+ *  @return 当前标签ID
+ */
++ (NSUInteger)currentTag;
+
+/**
+ *  获取设备ID
+ *
+ *  @return 设备ID
+ */
++ (NSString *)buglyDeviceId;
+
+/**
+ *  上报自定义Objective-C异常
+ *
+ *  @param exception 异常信息
+ */
++ (void)reportException:(NSException *)exception;
+
+/**
+ *  上报错误
+ *
+ *  @param error 错误信息
+ */
++ (void)reportError:(NSError *)error;
+
+/**
+ *    @brief 上报自定义错误
+ *
+ *    @param category    类型(Cocoa=3,CSharp=4,JS=5,Lua=6)
+ *    @param aName       名称
+ *    @param aReason     错误原因
+ *    @param aStackArray 堆栈
+ *    @param info        附加数据
+ *    @param terminate   上报后是否退出应用进程
+ */
++ (void)reportExceptionWithCategory:(NSUInteger)category
+                               name:(NSString *)aName
+                             reason:(NSString *)aReason
+                          callStack:(NSArray *)aStackArray
+                          extraInfo:(NSDictionary *)info
+                       terminateApp:(BOOL)terminate;
+
+/**
+ *  SDK 版本信息
+ *
+ *  @return SDK版本号
+ */
++ (NSString *)sdkVersion;
+
+/**
+ *  APP 版本信息
+ *
+ *  @return SDK版本号
+ */
++ (NSString *)appVersion;
+
+/**
+ *  App 是否发生了连续闪退
+ *  如果 启动SDK 且 5秒内 闪退,且次数达到 3次 则判定为连续闪退
+ *
+ *  @return 是否连续闪退
+ */
++ (BOOL)isAppCrashedOnStartUpExceedTheLimit;
+
+/**
+ *  关闭bugly监控
+ */
++ (void)closeCrashReport;
+
+BLY_END_NONNULL
+
+@end

+ 141 - 0
DanceGame/Bugly.framework/Headers/BuglyConfig.h

@@ -0,0 +1,141 @@
+//
+//  BuglyConfig.h
+//  Bugly
+//
+//  Copyright (c) 2016年 Tencent. All rights reserved.
+//
+
+#pragma once
+
+#define BLY_UNAVAILABLE(x) __attribute__((unavailable(x)))
+
+#if __has_feature(nullability)
+#define BLY_NONNULL __nonnull
+#define BLY_NULLABLE __nullable
+#define BLY_START_NONNULL _Pragma("clang assume_nonnull begin")
+#define BLY_END_NONNULL _Pragma("clang assume_nonnull end")
+#else
+#define BLY_NONNULL
+#define BLY_NULLABLE
+#define BLY_START_NONNULL
+#define BLY_END_NONNULL
+#endif
+
+#import <Foundation/Foundation.h>
+
+#import "BuglyLog.h"
+
+BLY_START_NONNULL
+
+@protocol BuglyDelegate <NSObject>
+
+@optional
+/**
+ *  发生异常时回调
+ *
+ *  @param exception 异常信息
+ *
+ *  @return 返回需上报记录,随异常上报一起上报
+ */
+- (NSString * BLY_NULLABLE)attachmentForException:(NSException * BLY_NULLABLE)exception;
+
+
+/**
+ *  策略激活时回调
+ *
+ *  @param tacticInfo
+ *
+ *  @return app是否弹框展示
+ */
+- (BOOL) h5AlertForTactic:(NSDictionary *)tacticInfo;
+
+@end
+
+@interface BuglyConfig : NSObject
+
+/**
+ *  SDK Debug信息开关, 默认关闭
+ */
+@property (nonatomic, assign) BOOL debugMode;
+
+/**
+ *  设置自定义渠道标识
+ */
+@property (nonatomic, copy) NSString *channel;
+
+/**
+ *  设置自定义版本号
+ */
+@property (nonatomic, copy) NSString *version;
+
+/**
+ *  设置自定义设备唯一标识
+ */
+@property (nonatomic, copy) NSString *deviceIdentifier;
+
+/**
+ *  卡顿监控开关,默认关闭
+ */
+@property (nonatomic) BOOL blockMonitorEnable;
+
+/**
+ *  卡顿监控判断间隔,单位为秒
+ */
+@property (nonatomic) NSTimeInterval blockMonitorTimeout;
+
+/**
+ *  设置 App Groups Id (如有使用 Bugly iOS Extension SDK,请设置该值)
+ */
+@property (nonatomic, copy) NSString *applicationGroupIdentifier;
+
+/**
+ *  进程内还原开关,默认开启
+ */
+@property (nonatomic) BOOL symbolicateInProcessEnable;
+
+/**
+ *  非正常退出事件记录开关,默认关闭
+ */
+@property (nonatomic) BOOL unexpectedTerminatingDetectionEnable;
+
+/**
+ *  页面信息记录开关,默认开启
+ */
+@property (nonatomic) BOOL viewControllerTrackingEnable;
+
+/**
+ *  Bugly Delegate
+ */
+@property (nonatomic, assign) id<BuglyDelegate> delegate;
+
+/**
+ * 控制自定义日志上报,默认值为BuglyLogLevelSilent,即关闭日志记录功能。
+ * 如果设置为BuglyLogLevelWarn,则在崩溃时会上报Warn、Error接口打印的日志
+ */
+@property (nonatomic, assign) BuglyLogLevel reportLogLevel;
+
+/**
+ *  崩溃数据过滤器,如果崩溃堆栈的模块名包含过滤器中设置的关键字,则崩溃数据不会进行上报
+ *  例如,过滤崩溃堆栈中包含搜狗输入法的数据,可以添加过滤器关键字SogouInputIPhone.dylib等
+ */
+@property (nonatomic, copy) NSArray *excludeModuleFilter;
+
+/**
+ * 控制台日志上报开关,默认开启
+ */
+@property (nonatomic, assign) BOOL consolelogEnable;
+
+/**
+ * 崩溃退出超时,如果监听到崩溃后,App一直没有退出,则到达超时时间后会自动abort进程退出
+ * 默认值 5s, 单位 秒
+ * 当赋值为0时,则不会自动abort进程退出
+ */
+@property (nonatomic, assign) NSUInteger crashAbortTimeout;
+
+/**
+ *  设置自定义联网、crash上报域名
+ */
+@property (nonatomic, copy) NSString *crashServerUrl;
+
+@end
+BLY_END_NONNULL

+ 78 - 0
DanceGame/Bugly.framework/Headers/BuglyLog.h

@@ -0,0 +1,78 @@
+//
+//  BuglyLog.h
+//  Bugly
+//
+//  Copyright (c) 2017年 Tencent. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+// Log level for Bugly Log
+typedef NS_ENUM(NSUInteger, BuglyLogLevel) {
+    BuglyLogLevelSilent  = 0,
+    BuglyLogLevelError   = 1,
+    BuglyLogLevelWarn    = 2,
+    BuglyLogLevelInfo    = 3,
+    BuglyLogLevelDebug   = 4,
+    BuglyLogLevelVerbose = 5,
+};
+#pragma mark -
+
+OBJC_EXTERN void BLYLog(BuglyLogLevel level, NSString *format, ...) NS_FORMAT_FUNCTION(2, 3);
+
+OBJC_EXTERN void BLYLogv(BuglyLogLevel level, NSString *format, va_list args) NS_FORMAT_FUNCTION(2, 0);
+
+#pragma mark -
+#define BUGLY_LOG_MACRO(_level, fmt, ...) [BuglyLog level:_level tag:nil log:fmt, ##__VA_ARGS__]
+
+#define BLYLogError(fmt, ...)   BUGLY_LOG_MACRO(BuglyLogLevelError, fmt, ##__VA_ARGS__)
+#define BLYLogWarn(fmt, ...)    BUGLY_LOG_MACRO(BuglyLogLevelWarn,  fmt, ##__VA_ARGS__)
+#define BLYLogInfo(fmt, ...)    BUGLY_LOG_MACRO(BuglyLogLevelInfo, fmt, ##__VA_ARGS__)
+#define BLYLogDebug(fmt, ...)   BUGLY_LOG_MACRO(BuglyLogLevelDebug, fmt, ##__VA_ARGS__)
+#define BLYLogVerbose(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelVerbose, fmt, ##__VA_ARGS__)
+
+#pragma mark - Interface
+@interface BuglyLog : NSObject
+
+/**
+ *    @brief  初始化日志模块
+ *
+ *    @param level 设置默认日志级别,默认BLYLogLevelSilent
+ *
+ *    @param printConsole 是否打印到控制台,默认NO
+ */
++ (void)initLogger:(BuglyLogLevel) level consolePrint:(BOOL)printConsole;
+
+/**
+ *    @brief 打印BLYLogLevelInfo日志
+ *
+ *    @param format   日志内容 总日志大小限制为:字符串长度30k,条数200
+ */
++ (void)log:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2);
+
+/**
+ *    @brief  打印日志
+ *
+ *    @param level 日志级别
+ *    @param message   日志内容 总日志大小限制为:字符串长度30k,条数200
+ */
++ (void)level:(BuglyLogLevel) level logs:(NSString *)message;
+
+/**
+ *    @brief  打印日志
+ *
+ *    @param level 日志级别
+ *    @param format   日志内容 总日志大小限制为:字符串长度30k,条数200
+ */
++ (void)level:(BuglyLogLevel) level log:(NSString *)format, ... NS_FORMAT_FUNCTION(2, 3);
+
+/**
+ *    @brief  打印日志
+ *
+ *    @param level  日志级别
+ *    @param tag    日志模块分类
+ *    @param format   日志内容 总日志大小限制为:字符串长度30k,条数200
+ */
++ (void)level:(BuglyLogLevel) level tag:(NSString *) tag log:(NSString *)format, ... NS_FORMAT_FUNCTION(3, 4);
+
+@end

+ 12 - 0
DanceGame/Bugly.framework/Modules/module.modulemap

@@ -0,0 +1,12 @@
+framework module Bugly {
+	umbrella header "Bugly.h"
+	
+	export *
+	module * { export * }
+	
+	link framework "Foundation"
+	link framework "Security"
+	link framework "SystemConfiguration"
+	link "c++"
+	link "z"
+}

BIN
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/.DS_Store


+ 7 - 18
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/BLE/BTDataProcess.h

@@ -11,6 +11,7 @@
 #import "LEONBLManager.h"
 #import "CBPeripheral+ADName.h"
 
+#define Game_Type @"dance"
 //游戏类型
 typedef NS_ENUM(int, GAME_TYPE){
     GAME_TYPE_DEMO =0, //
@@ -19,24 +20,6 @@ typedef NS_ENUM(int, GAME_TYPE){
     GAME_TYPE_SDAER, //
 };
 
-//动作数据
-typedef NS_ENUM(NSInteger, GAME_MOTION){
-    CO_MOTION_STOP =0,
-    CO_MOTION_RUN,// 跑
-    CO_MOTION_JUMP, // 跳
-    CO_MOTION_DOWN, // 蹲
-    CO_MOTION_LEFT, // 滑左
-    CO_MOTION_RIGHT, // 滑右
-    CO_MOTION_FRONT, // 滑前
-    CO_MOTION_BACK, // 滑后
-    CO_MOTION_LEFT_UP, // 点击-左上
-    CO_MOTION_LEFT_DOWN, // 点击-左下
-    CO_MOTION_RIGHT_UP, // 点击-右上
-    CO_MOTION_RIGHT_DOWN, // 点击-右下
-    CO_MOTION_STEP, // 点击-原地踩
-    CO_NUMBERS_OF_MOTION
-};
-
 //蓝牙状态
 typedef NS_ENUM(NSInteger, BLETOOTH_STUTAS){
     CONNECT_DIS =0, // 未链接
@@ -79,6 +62,12 @@ typedef NS_ENUM(NSInteger, BLETOOTH_STUTAS){
 //监听程序从后台返回
 -(void)applicationWillEnterForeground;
 
+//监听通知开始游戏
+-(void)gameStartInitData;
+//监听通知结束游戏
+-(void)gameEndInitData;
+//监听通知震动
+-(void)vibrationAction:(NSNotification*)notificatio;
 @end
 
 

+ 42 - 47
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/BLE/BTDataProcess.mm

@@ -80,12 +80,6 @@ static BTDataProcess* instance = nil;
 
     //默认游戏模式关
     self.gameModel = NO;
-    //监听unity --> 开始游戏/结束游戏/震动
-    [CUS_NOTIFICATIONCENTER addObserver:self selector:@selector(gameStartInitData) name:@"gameStartInitData" object:nil];
-    [CUS_NOTIFICATIONCENTER addObserver:self selector:@selector(gameEndInitData:) name:@"gameEndInitData" object:nil];
-    [CUS_NOTIFICATIONCENTER addObserver:self selector:@selector(vibrationAction:) name:@"vibrationAction" object:nil];
-    //监听程序从后台返回 系统方法
-//    [CUS_NOTIFICATIONCENTER addObserver:self selector:@selector(applicationDidBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil];
 
     //监听 趣动 app group 消息
     CFStringRef strRef = (__bridge CFStringRef)@"DISCONNECT_BLE";
@@ -121,15 +115,24 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
 //监听通知开始游戏
 -(void)gameStartInitData{
     
-//    NSLog(@"通知开始游戏 --> BTDataProcess");
+    NSLog(@"通知开始游戏 --> BTDataProcess");
     self.gameModel = YES;
     //反馈->蓝牙sdk
 //    [self.game start];
     
+    //读写到特征后 添加测试弹窗
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [self inittestLabel];
+    });
+    
+//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10.0 * NSEC_PER_SEC)), dispatch_get_main_queue(),^{
+//        [self inittestLabel];
+//    });
+    
 }
 
 //监听通知结束游戏
--(void)gameEndInitData:(NSNotification*)notification{
+-(void)gameEndInitData{
     
 //    NSLog(@"通知结束游戏 --> BTDataProcess");
     self.gameModel = NO;
@@ -448,14 +451,9 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
         
         self.initial_down_count = 0;
         self.initial_jump_count = 0;
-        
-        //读写到特征后 添加测试弹窗
-        [self inittestLabel];
-        
-    }else if (deviceType ==DEVICETYPE_VICE){
-        
+                
     }
-    
+
     //开启游戏模式&查询设备信息 初始化步数数据
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(),^{
         [self timingDataTransmission:@"dispatch_after"];
@@ -762,8 +760,13 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
     }
   
     /********************调试窗数据 *****************/
-    NSArray *aArray = [self.tempStepString componentsSeparatedByString:@","];
-    self.testLabel.text = [NSString stringWithFormat:@"right:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nleft:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nZupt:[%d,%d]  press:[%d,%d] \nj&d[%d %d]  rssi:[%d %@] ts:%d \n脚步: %@ %@ \n步频: %d %d ",right_pos[0],right_pos[1],right_pos[2],right_att[0],right_att[1],right_att[2],right_acc[0],right_acc[1],right_acc[2],left_pos[0],left_pos[1],left_pos[2],left_att[0],left_att[1],left_att[2],left_acc[0],left_acc[1],left_acc[2],rightZupt,leftZupt,right_press,left_press,jump,down,rssi,self.RSSI,ts,aArray[aArray.count-2],aArray.lastObject,leftStepFreq,rightStepFreq];
+    dispatch_async(dispatch_get_main_queue(), ^{
+        NSArray *aArray = [self.tempStepString componentsSeparatedByString:@","];
+        if (self.testLabel!=nil){
+            self.testLabel.text = [NSString stringWithFormat:@"right:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nleft:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nZupt:[%d,%d]  press:[%d,%d] \nj&d[%d %d]  rssi:[%d %@] ts:%d \n脚步: %@ %@\n步频: %d %d ",right_pos[0],right_pos[1],right_pos[2],right_att[0],right_att[1],right_att[2],right_acc[0],right_acc[1],right_acc[2],left_pos[0],left_pos[1],left_pos[2],left_att[0],left_att[1],left_att[2],left_acc[0],left_acc[1],left_acc[2],rightZupt,leftZupt,right_press,left_press,jump,down,rssi,self.RSSI,ts,aArray[aArray.count-2],aArray.lastObject,leftStepFreq,rightStepFreq];
+        }
+        
+    });
     
 }
 
@@ -981,16 +984,7 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
 
 #pragma mark ===============================================>> DEBUG
 -(void)inittestLabel{
-    
-    UIViewController *rootVC = [[UIApplication sharedApplication].delegate window].rootViewController;
-    UIViewController *parent = rootVC;
-    while ((parent = rootVC.presentedViewController) != nil ){
-    rootVC = parent;
-    }
-    while ([rootVC isKindOfClass:[UINavigationController class]]){
-    rootVC = [(UINavigationController *)rootVC topViewController];
-    }
-    
+
     if (self.testLabel!=nil){
         [self.testLabel removeFromSuperview];
     }
@@ -1003,37 +997,38 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
         [self.clearnButton removeFromSuperview];
     }
     
-    self.testLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 0, [UIScreen mainScreen].bounds.size.width-100, 160)];
-    self.testLabel.textColor = [UIColor redColor];
-    self.testLabel.font = [UIFont boldSystemFontOfSize:18];
-    self.testLabel.backgroundColor = [UIColor clearColor];
-    self.testLabel.textAlignment = NSTextAlignmentCenter;
-    self.testLabel.numberOfLines = 0;
-    
     self.uploadButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    self.uploadButton.frame = CGRectMake(SCREEN_WIDTH/2-100-10, SCREEN_HEIGHT-40-10, 100, 40);
+    self.uploadButton.frame = CGRectMake(SCREEN_WIDTH/2-SCALEoefficient(75)-10, SCREEN_HEIGHT-40-10, SCALEoefficient(75), SCALEoefficient(30));
     self.uploadButton.backgroundColor = [UIColor redColor];
     [self.uploadButton.titleLabel setTextColor:[UIColor redColor]];
-    [self.uploadButton setFont: [UIFont boldSystemFontOfSize:20]];
+    [self.uploadButton setFont: [UIFont boldSystemFontOfSize:SCALEoefficient(15)]];
     [self.uploadButton setTitle:@"上传" forState:UIControlStateNormal];
     [self.uploadButton addTarget:self action:@selector(uploadpPlistFile) forControlEvents:UIControlEventTouchUpInside];
     
     self.clearnButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    self.clearnButton.frame = CGRectMake(SCREEN_WIDTH/2+10, SCREEN_HEIGHT-40-10, 100, 40);
+    self.clearnButton.frame = CGRectMake(SCREEN_WIDTH/2+10, SCREEN_HEIGHT-40-10, SCALEoefficient(75), SCALEoefficient(30));
     self.clearnButton.backgroundColor = [UIColor redColor];
     [self.clearnButton.titleLabel setTextColor:[UIColor redColor]];
-    [self.clearnButton setFont: [UIFont boldSystemFontOfSize:20]];
+    [self.clearnButton setFont: [UIFont boldSystemFontOfSize:SCALEoefficient(15)]];
     [self.clearnButton setTitle:@"清理缓存" forState:UIControlStateNormal];
     [self.clearnButton addTarget:self action:@selector(clearCacheWithFilePath) forControlEvents:UIControlEventTouchUpInside];
     
-    [rootVC.view addSubview:self.testLabel];
-    [rootVC.view addSubview:self.uploadButton];
-    [rootVC.view addSubview:self.clearnButton];
-    
+    self.testLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCALEoefficient(20), 0, [UIScreen mainScreen].bounds.size.width-100, SCALEoefficient(160))];
+    self.testLabel.textColor = [UIColor redColor];
+    self.testLabel.font = [UIFont boldSystemFontOfSize:SCALEoefficient(14)];
+    self.testLabel.backgroundColor = [UIColor clearColor];
+    self.testLabel.textAlignment = NSTextAlignmentCenter;
+    self.testLabel.numberOfLines = 0;
+
+    if ([UIApplication sharedApplication].keyWindow != nil){
+        [[UIApplication sharedApplication].keyWindow addSubview:self.uploadButton];
+        [[UIApplication sharedApplication].keyWindow addSubview:self.clearnButton];
+        [[UIApplication sharedApplication].keyWindow addSubview:self.testLabel];
+    }
+
 }
 
 #pragma mark ===============================================>> 存储和上传数据
-
 - (void)clearCacheWithFilePath{
     
     NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
@@ -1074,12 +1069,12 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
 
     }else{
 
-//        NSLog(@"-------文件存在,追加文件----------");
-        NSFileHandle *fileHandle = [NSFileHandle fileHandleForUpdatingAtPath:filePath];
+//     NSLog(@"-------文件存在,追加文件----------");
+       NSFileHandle *fileHandle = [NSFileHandle fileHandleForUpdatingAtPath:filePath];
        [fileHandle seekToEndOfFile];  //将节点跳到文件的末尾
        NSData* stringData  = [self.tempStepString dataUsingEncoding:NSUTF8StringEncoding];
        [fileHandle writeData:stringData]; //追加写入数据
-        [fileHandle closeFile];
+       [fileHandle closeFile];
 
     }
 
@@ -1111,7 +1106,7 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
     AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithBaseURL:nil];
     [sessionManager POST:@"http://172.16.14.127:8080/upload" parameters:nil headers:nil constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData){
 
-        [formData  appendPartWithFileData:upData name:@"file" fileName:[NSString stringWithFormat:@"ios_dance_%@.txt",[self getNowTimeTimestamp]] mimeType:@"text/plain"];
+        [formData  appendPartWithFileData:upData name:@"file" fileName:[NSString stringWithFormat:@"ios_%@_%@.txt",Game_Type,[self getNowTimeTimestamp]] mimeType:@"text/plain"];
 
         }progress:^(NSProgress * _Nonnull uploadProgress){
             NSLog(@"上传进度 = %@",uploadProgress);

+ 43 - 35
DanceGame/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport/SDK/IOSPlatformSDK.mm

@@ -119,12 +119,12 @@ static IOSPlatformSDK * instance;
     NSString* finsalString = [arr2 stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
     NSDictionary * urlDict = [AlgorithmTool dictionaryWithJsonString:finsalString];
     NSLog(@"Schemes_Url转码的dict ========= %@",urlDict);
-    
+        
     //固定一个时间戳
     NSString * timestamp =   [AlgorithmTool returnTimestamp];
     [IOS_NSUSERDEFAULT setObject:timestamp forKey:IOSSDK_TIMESTAMP];
     [IOS_NSUSERDEFAULT synchronize];
-        
+    
     if (urlDict!=nil){
         //缓存用户信息数据
         [IOS_NSUSERDEFAULT setObject:urlDict forKey:IOSSDK_USERINFO];
@@ -145,14 +145,12 @@ static IOSPlatformSDK * instance;
 //            NSLog(@"jump_count = %d crouch_count = %d step_count = %d ",jump_count,crouch_count,step_count);
             [self cacheAllMotionCount:jump_count crouchCount:crouch_count stepCount:step_count];
         };
-        
     }
     //先打开app后已经创建了label,第二次open重新赋值
     self.testLabel.text = [NSString stringWithFormat:@"%@ mac: %@",self.openStyle,self.macAddress];
     
 }
 
-
 #pragma mark ============================>> private 各类通知处理事件
 -(void)initNotification{
     
@@ -176,21 +174,24 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
         
     //group.com.Oujia.AppAndGame 沙河数据
     NSUserDefaults* userDefault = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.Oujia.AppAndGame"];
-    //invite json字符串转字典
-    NSString * jsonString = [userDefault objectForKey:@"invite"];
-    NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
-    NSDictionary *invite = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil];
-    NSLog(@"group通知监听好友邀请信息 invite jsonString = %@",invite);
-    if (invite!=nil){
-        //user字典转json字符串
-        NSData *jsonData = [NSJSONSerialization dataWithJSONObject:invite options:NSJSONWritingPrettyPrinted error:nil];
-        NSString * inviteJsonString =  [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-        const char * user =[inviteJsonString UTF8String];
-        //邀请信息
+    //趣动传过来的 invite json字符串转字典
+    NSString * string = [userDefault objectForKey:@"invite"];
+    NSData * data = [string dataUsingEncoding:NSUTF8StringEncoding];
+    NSDictionary * inviteDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
+    if (inviteDict!=nil){
+        //字典取值
+        NSDictionary * invite = [inviteDict objectForKey:@"invite"];
+        NSDictionary * user =  [invite objectForKey:@"user"];
+        //user字典转字符串
+        NSData * userData = [NSJSONSerialization dataWithJSONObject:user options:NSJSONWritingPrettyPrinted error:nil];
+        NSString * userString =  [[NSString alloc] initWithData:userData encoding:NSUTF8StringEncoding];
+        const char * userChar =[userString UTF8String];
+        //info字典转字符串
         NSString * infoString = invite[@"info"];
-        const char * info =[infoString UTF8String];
-        NSLog(@"unity 获取好友邀请信息 GetInviteInfo ===>> %@ %@",inviteJsonString,infoString);
-        inviteFriendHandler(0,user,info);
+        const char * infoChar =[infoString UTF8String];
+        NSLog(@"IOS_SKD 回调好友邀请信息 GetInviteInfo ===>>  %s , %s",userChar,infoChar);
+        inviteFriendHandler(0,userChar,infoChar);
+        
     }
     
 }
@@ -198,6 +199,7 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
 //通知开始游戏
 -(void)gameStartInitData{
     NSLog(@"unity call ios 通知开始游戏 --> IOSPlatformSDK");
+    [[BTDataProcess sharedInstance] gameStartInitData];
     if ([self existUserInfo]){
         self.firstTime = [NSDate date];
     }
@@ -205,6 +207,7 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
 
 //通知结束游戏
 -(void)gameEndInitData:(NSNotification*)notification{
+    [[BTDataProcess sharedInstance] gameEndInitData];
     NSLog(@"unity call ios 通知结束游戏 --> IOSPlatformSDK");
 }
 
@@ -215,7 +218,6 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
     if ([instance existUserInfo]==NO){
         return;
     }
-    
     /***************************初始化蓝牙数据处理工具***************************/
     //主副设备:deviceType  游戏种类:game_id  mac地址:macAddress
     BTDataProcess* bleInstance = [BTDataProcess sharedInstance];
@@ -253,20 +255,21 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
         bleInstance.deviceType = (DEVICE_TYPE)type;
 //        NSLog(@"connectDeviceBlock = %@ %ld",peripheral,(long)bleInstance.deviceType);
         [bleInstance connectPeripheral:peripheral];
+        bleInstance.macAddress = peripheral.identifier.UUIDString;
     };
     
-    //脚步交互动作
+    //bleInstance脚步交互动作-->searchVC
     bleInstance.getInteractionBlock = ^(int interaction){
         if (interaction!=-1){
             NSLog(@"BTDataProcess 有效交互动作 ===>> %d",interaction);
-            [searchVC getInteraction:interaction];
+//            [searchVC getInteraction:interaction];
         }else{
 //            NSLog(@"BTDataProcess 无效交互动作 ===>> %@",@"原地");
         }
     };
     
 }
-
+//
 #pragma mark ============================>> private 全局弹窗
 -(void)addTOwindow:(UIViewController*)searchVC{
     
@@ -476,7 +479,8 @@ void GameEnd(int level, double score, int record, int mode, int opponentId){
 
     [HTTPDataProcession gameEnd];
 
-    [HTTPDataProcession postGameRecord:level score:score record:record mode:mode opponentId:opponentId gameEndDataBlock:^(NSString *jsonString) {
+    //上传数据
+    [HTTPDataProcession postGameRecord:level score:score record:record mode:mode opponentId:opponentId gameEndDataBlock:^(NSString *jsonString){
         NSLog(@"IOS_SKD 回调结束游戏请求 GameEnd ===> %@",jsonString);
     }];
     
@@ -543,7 +547,7 @@ void GetUserFriends(){
      NSLog(@"Unity 请求用户信息 GetUserInfoJson ===>>");
 
      if ([instance existUserInfo]==NO){
-         return nil;
+         return MakeStringCopy("");
      }else{
          
          NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
@@ -587,7 +591,7 @@ void InviteFriend(int friendid,char * info){
         
 //        NSLog(@"IOS_SKD 回调点击邀请好友事件 InviteFriend ===>>");
         dispatch_async(dispatch_get_main_queue(), ^{
-        [PopupView showCusHUDA:@"邀请成功"];
+        [PopupView showCusHUDA:jsonString];
         });
         
     }];
@@ -611,17 +615,21 @@ void GetInviteInfo(){
         NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
         NSDictionary * invite = jsonDict[@"invite"];
         if (invite!=nil){
-            //user字典转json字符串
-            NSData *jsonData = [NSJSONSerialization dataWithJSONObject:invite options:NSJSONWritingPrettyPrinted error:nil];
-            NSString * inviteJsonString =  [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-            const char * user =[inviteJsonString UTF8String];
-            //邀请信息
-            NSString * infoString = invite[@"info"];
-            const char * info =[infoString UTF8String];
-            NSLog(@"IOS_SKD 回调好友邀请信息 GetInviteInfo ===>>  %@ , %@",inviteJsonString,infoString);
-            inviteFriendHandler(0,user,info);
+            
+            //user字典 -> 字符串 -> Char
+            NSDictionary * user =  [invite objectForKey:@"user"];
+            NSData * userData = [NSJSONSerialization dataWithJSONObject:user options:NSJSONWritingPrettyPrinted error:nil];
+            NSString * userString =  [[NSString alloc] initWithData:userData encoding:NSUTF8StringEncoding];
+            const char * userChar =[userString UTF8String];
+            
+            //info字符串 -> Char
+            NSString * info = invite[@"info"];
+            const char * infoChar =[info UTF8String];
+            
+            NSLog(@"IOS_SKD 回调好友邀请信息 GetInviteInfo ===>>  %s , %s",userChar,infoChar);
+            inviteFriendHandler(0,userChar,infoChar);
+            
         }
-        
     }
 }
 

+ 32 - 4
DanceGame/Classes/UnityAppController.mm

@@ -43,6 +43,7 @@
 
 //#import <IOSToUnitySDK/IOSToUnitySDK.h>
 #import "IOSPlatformSDK.h"
+#import <Bugly/Bugly.h>
 
 //
 UnityAppController* _UnityAppController = nil;
@@ -313,20 +314,20 @@ extern "C" void UnityRequestQuit()
      //我们需要在此处处理通过 scheme 打开App并截获参数。
       NSURL *url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
          NSLog(@"打开方式 通过URL打开的  ===== >> %@",url);
-         IOSPlatformSDK * sdk = [IOSPlatformSDK sharedInstance];
-         sdk.openStyle = @"启动前 通过URL打开的";
-         [sdk startWithUrl:url];
+//         IOSPlatformSDK * sdk = [IOSPlatformSDK sharedInstance];
+//         sdk.openStyle = @"启动前 通过URL打开的";
+//         [sdk startWithUrl:url];
      }else if (!launchOptions){
          NSLog(@"打开方式 手动点击打开");
          IOSPlatformSDK * sdk = [IOSPlatformSDK sharedInstance];
          sdk.openStyle = @"手动点击打开";
      }
     
+    [Bugly startWithAppId:@"403d275730"];
     return YES;
     
 }
 
-
 - (void)applicationDidEnterBackground:(UIApplication*)application{
     ::printf("-> applicationDidEnterBackground()\n");
     //开启后台任务保活
@@ -334,6 +335,33 @@ extern "C" void UnityRequestQuit()
 //    [[MYFactoryManager sharedInstance] comeToBackgroundMode];
     BTDataProcess * sharedInstance =  [BTDataProcess sharedInstance];
     sharedInstance.isBackGround = YES;
+    //开启后台任务保活
+    [self comeToBackgroundMode];
+    
+}
+
+#pragma mark -- leon add
+-(void)comeToBackgroundMode{
+    //初始化一个后台任务BackgroundTask,这个后台任务的作用就是告诉系统当前app在后台有任务处理,需要时间
+    UIApplication*  app = [UIApplication sharedApplication];
+    self.bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
+        [app endBackgroundTask:self.bgTask];
+        self.bgTask = UIBackgroundTaskInvalid;
+    }];
+    //开启定时器 不断向系统请求后台任务执行的时间
+    NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:30.0 target:self selector:@selector(applyForMoreTime) userInfo:nil repeats:YES];
+    [timer fire];
+}
+
+-(void)applyForMoreTime{
+    //如果系统给的剩余时间小于60秒 就终止当前的后台任务,再重新初始化一个后台任务,重新让系统分配时间,这样一直循环下去,保持APP在后台一直处于active状态。
+    if ([UIApplication sharedApplication].backgroundTimeRemaining < 60){
+        [[UIApplication sharedApplication] endBackgroundTask:self.bgTask];
+        self.bgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
+            [[UIApplication sharedApplication] endBackgroundTask:self.bgTask];
+            self.bgTask = UIBackgroundTaskInvalid;
+        }];
+    }
 }
 
 - (void)applicationWillEnterForeground:(UIApplication*)application

+ 32 - 10
DanceGame/Unity-iPhone.xcodeproj/project.pbxproj

@@ -292,6 +292,8 @@
 		933F32B2273BA1E80084CFD5 /* MYFactoryManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 933F3259273BA1E80084CFD5 /* MYFactoryManager.m */; };
 		933F32B3273BA1E80084CFD5 /* UIView+ST.m in Sources */ = {isa = PBXBuildFile; fileRef = 933F325A273BA1E80084CFD5 /* UIView+ST.m */; };
 		936820CE27620D86007B4D6B /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 936820CC27620D86007B4D6B /* BigFoot.cpp */; };
+		93E55D04276892A900D8F97E /* Bugly.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93E55D03276892A900D8F97E /* Bugly.framework */; };
+		93E55D05276892A900D8F97E /* Bugly.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93E55D03276892A900D8F97E /* Bugly.framework */; };
 		93FA5171274CD2F000AEAD33 /* Tricycle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93FA516E274CD2EF00AEAD33 /* Tricycle.cpp */; };
 		93FA5172274CD2F000AEAD33 /* RuinsExplore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93FA5170274CD2F000AEAD33 /* RuinsExplore.cpp */; };
 		960391221D6CE46E003BF157 /* MediaToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 960391211D6CE46E003BF157 /* MediaToolbox.framework */; };
@@ -450,7 +452,7 @@
 		1C674F5482F52AB026FCD78E /* Bulk_UnityEngine.GridModule_0.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Bulk_UnityEngine.GridModule_0.cpp; path = Classes/Native/Bulk_UnityEngine.GridModule_0.cpp; sourceTree = SOURCE_ROOT; };
 		1C8C450E87A9EE05D5AE4502 /* Il2CppCompilerCalculateTypeValues_47Table.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Il2CppCompilerCalculateTypeValues_47Table.cpp; path = Classes/Native/Il2CppCompilerCalculateTypeValues_47Table.cpp; sourceTree = SOURCE_ROOT; };
 		1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		1D6058910D05DD3D006BFB54 /* Unity-Target-New.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = "Unity-Target-New.app"; path = cn.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		1D6058910D05DD3D006BFB54 /* cn.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = cn.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		1DE14CAF910E59990A2BB060 /* Bulk_Generics_3.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Bulk_Generics_3.cpp; path = Classes/Native/Bulk_Generics_3.cpp; sourceTree = SOURCE_ROOT; };
 		1E31457EB0C3944BB5AEE59D /* Il2CppCompilerCalculateTypeValues_25Table.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Il2CppCompilerCalculateTypeValues_25Table.cpp; path = Classes/Native/Il2CppCompilerCalculateTypeValues_25Table.cpp; sourceTree = SOURCE_ROOT; };
 		1F28472AA951D8962230207F /* Bulk_mscorlib_10.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Bulk_mscorlib_10.cpp; path = Classes/Native/Bulk_mscorlib_10.cpp; sourceTree = SOURCE_ROOT; };
@@ -500,7 +502,7 @@
 		4F324C70BFC7169ADFA256FF /* Il2CppCompilerCalculateTypeValues_27Table.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Il2CppCompilerCalculateTypeValues_27Table.cpp; path = Classes/Native/Il2CppCompilerCalculateTypeValues_27Table.cpp; sourceTree = SOURCE_ROOT; };
 		5202434D91D2DE5DF0D2ABA5 /* Il2CppGenericClassTable.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Il2CppGenericClassTable.cpp; path = Classes/Native/Il2CppGenericClassTable.cpp; sourceTree = SOURCE_ROOT; };
 		52374666A356C3A496D901E8 /* Bulk_Assembly-CSharp_1.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "Bulk_Assembly-CSharp_1.cpp"; path = "Classes/Native/Bulk_Assembly-CSharp_1.cpp"; sourceTree = SOURCE_ROOT; };
-		5623C57317FDCB0800090B9E /* Unity-iPhone Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "Unity-iPhone Tests.xctest"; path = cn.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+		5623C57317FDCB0800090B9E /* cn.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = cn.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
 		5623C57A17FDCB0900090B9E /* Unity-iPhone Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Unity-iPhone Tests-Info.plist"; sourceTree = "<group>"; };
 		5623C57C17FDCB0900090B9E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		5623C57E17FDCB0900090B9E /* Unity_iPhone_Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Unity_iPhone_Tests.m; sourceTree = "<group>"; };
@@ -796,6 +798,7 @@
 		936820CC27620D86007B4D6B /* BigFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BigFoot.cpp; sourceTree = "<group>"; };
 		936820CD27620D86007B4D6B /* BigFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BigFoot.h; sourceTree = "<group>"; };
 		939A4F0BB402A4FAF3B26D8D /* Bulk_UnityEngine.ScreenCaptureModule_0.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Bulk_UnityEngine.ScreenCaptureModule_0.cpp; path = Classes/Native/Bulk_UnityEngine.ScreenCaptureModule_0.cpp; sourceTree = SOURCE_ROOT; };
+		93E55D03276892A900D8F97E /* Bugly.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Bugly.framework; sourceTree = "<group>"; };
 		93FA516D274CD2EF00AEAD33 /* RuinsExplore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuinsExplore.h; sourceTree = "<group>"; };
 		93FA516E274CD2EF00AEAD33 /* Tricycle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Tricycle.cpp; sourceTree = "<group>"; };
 		93FA516F274CD2EF00AEAD33 /* Tricycle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tricycle.h; sourceTree = "<group>"; };
@@ -931,6 +934,7 @@
 				35DF474796FE8197504D67C9 /* libresolv.tbd in Frameworks */,
 				4A354E80950B1FE845970C66 /* CoreTelephony.framework in Frameworks */,
 				351F4485BADB65500C57B95A /* Security.framework in Frameworks */,
+				93E55D04276892A900D8F97E /* Bugly.framework in Frameworks */,
 				3B3A4584807DAAE7EBDABAC2 /* StoreKit.framework in Frameworks */,
 				22BC4EED989D1490A30C1854 /* Accelerate.framework in Frameworks */,
 				866149DBA06CD4133374B473 /* JavaScriptCore.framework in Frameworks */,
@@ -953,6 +957,7 @@
 				D6464CC7B6C12B487B03772D /* libz.tbd in Frameworks */,
 				F9A648A1A64E77C8453A3460 /* libc++.tbd in Frameworks */,
 				D3D74106B211156108967EB4 /* libstdc++.tbd in Frameworks */,
+				93E55D05276892A900D8F97E /* Bugly.framework in Frameworks */,
 				9BB04199BC9E9149C8AEAD90 /* libicucore.tbd in Frameworks */,
 				518F4E3EAFD7531E7D26219C /* libiconv.tbd in Frameworks */,
 				5AE94462B18475B15CE6E487 /* libresolv.tbd in Frameworks */,
@@ -974,8 +979,8 @@
 		19C28FACFE9D520D11CA2CBB /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				1D6058910D05DD3D006BFB54 /* Unity-Target-New.app */,
-				5623C57317FDCB0800090B9E /* Unity-iPhone Tests.xctest */,
+				1D6058910D05DD3D006BFB54 /* cn.app */,
+				5623C57317FDCB0800090B9E /* cn.xctest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -1005,6 +1010,7 @@
 		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				93E55D03276892A900D8F97E /* Bugly.framework */,
 				960391211D6CE46E003BF157 /* MediaToolbox.framework */,
 				AA5D99861AFAD3C800B27605 /* CoreText.framework */,
 				8358D1B70ED1CC3700E3A684 /* AudioToolbox.framework */,
@@ -1737,7 +1743,7 @@
 			);
 			name = "Unity-iPhone";
 			productName = "iPhone-target";
-			productReference = 1D6058910D05DD3D006BFB54 /* Unity-Target-New.app */;
+			productReference = 1D6058910D05DD3D006BFB54 /* cn.app */;
 			productType = "com.apple.product-type.application";
 		};
 		5623C57217FDCB0800090B9E /* Unity-iPhone Tests */ = {
@@ -1754,7 +1760,7 @@
 			);
 			name = "Unity-iPhone Tests";
 			productName = "Unity-iPhone Tests";
-			productReference = 5623C57317FDCB0800090B9E /* Unity-iPhone Tests.xctest */;
+			productReference = 5623C57317FDCB0800090B9E /* cn.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
 /* End PBXNativeTarget section */
@@ -2224,6 +2230,7 @@
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport",
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/FitfunSDK",
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/Bugly_2.5.0",
+					"$(PROJECT_DIR)",
 				);
 				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_DYNAMIC_NO_PIC = NO;
@@ -2304,6 +2311,7 @@
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport",
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/FitfunSDK",
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/Bugly_2.5.0",
+					"$(PROJECT_DIR)",
 				);
 				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_ENABLE_CPP_EXCEPTIONS = YES;
@@ -2383,7 +2391,10 @@
 				DEVELOPMENT_TEAM = "";
 				ENABLE_BITCODE = NO;
 				ENABLE_NS_ASSERTIONS = NO;
-				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)",
+				);
 				GCC_C_LANGUAGE_STANDARD = c11;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -2439,7 +2450,10 @@
 				COPY_PHASE_STRIP = NO;
 				DEVELOPMENT_TEAM = "";
 				ENABLE_BITCODE = NO;
-				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)",
+				);
 				GCC_C_LANGUAGE_STANDARD = c11;
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -2528,6 +2542,7 @@
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport",
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/FitfunSDK",
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/Bugly_2.5.0",
+					"$(PROJECT_DIR)",
 				);
 				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_ENABLE_CPP_EXCEPTIONS = YES;
@@ -2607,7 +2622,10 @@
 				DEVELOPMENT_TEAM = "";
 				ENABLE_BITCODE = NO;
 				ENABLE_NS_ASSERTIONS = NO;
-				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)",
+				);
 				GCC_C_LANGUAGE_STANDARD = c11;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -2688,6 +2706,7 @@
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/KpSupport",
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/FitfunSDK",
 					"$(PROJECT_DIR)/Classes/FitfunTool/FitfunSDK_V2.0/Bugly_2.5.0",
+					"$(PROJECT_DIR)",
 				);
 				GCC_C_LANGUAGE_STANDARD = gnu11;
 				GCC_ENABLE_CPP_EXCEPTIONS = YES;
@@ -2767,7 +2786,10 @@
 				DEVELOPMENT_TEAM = "";
 				ENABLE_BITCODE = NO;
 				ENABLE_NS_ASSERTIONS = NO;
-				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)",
+				);
 				GCC_C_LANGUAGE_STANDARD = c11;
 				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;

BIN
DanceGame/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/duowan123.xcuserdatad/UserInterfaceState.xcuserstate


BIN
RunGame/.DS_Store


BIN
RunGame/Bugly.framework/Bugly


+ 163 - 0
RunGame/Bugly.framework/Headers/Bugly.h

@@ -0,0 +1,163 @@
+//
+//  Bugly.h
+//
+//  Version: 2.5(9)
+//
+//  Copyright (c) 2017年 Tencent. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import "BuglyConfig.h"
+#import "BuglyLog.h"
+
+BLY_START_NONNULL
+
+@interface Bugly : NSObject
+
+/**
+ *  初始化Bugly,使用默认BuglyConfigs
+ *
+ *  @param appId 注册Bugly分配的应用唯一标识
+ */
++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId;
+
+/**
+ *  使用指定配置初始化Bugly
+ *
+ *  @param appId 注册Bugly分配的应用唯一标识
+ *  @param config 传入配置的 BuglyConfig
+ */
++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId
+                config:(BuglyConfig * BLY_NULLABLE)config;
+
+/**
+ *  使用指定配置初始化Bugly
+ *
+ *  @param appId 注册Bugly分配的应用唯一标识
+ *  @param development 是否开发设备
+ *  @param config 传入配置的 BuglyConfig
+ */
++ (void)startWithAppId:(NSString * BLY_NULLABLE)appId
+     developmentDevice:(BOOL)development
+                config:(BuglyConfig * BLY_NULLABLE)config;
+
+/**
+ *  设置用户标识
+ *
+ *  @param userId 用户标识
+ */
++ (void)setUserIdentifier:(NSString *)userId;
+
+/**
+ *  更新版本信息
+ *
+ *  @param version 应用版本信息
+ */
++ (void)updateAppVersion:(NSString *)version;
+
+/**
+ *  设置关键数据,随崩溃信息上报
+ *
+ *  @param value KEY
+ *  @param key VALUE
+ */
++ (void)setUserValue:(NSString *)value
+              forKey:(NSString *)key;
+
+/**
+ *  获取USER ID
+ *
+ *  @return USER ID
+ */
++ (NSString *)buglyUserIdentifier;
+
+/**
+ *  获取关键数据
+ *
+ *  @return 关键数据
+ */
++ (NSDictionary * BLY_NULLABLE)allUserValues;
+
+/**
+ *  设置标签
+ *
+ *  @param tag 标签ID,可在网站生成
+ */
++ (void)setTag:(NSUInteger)tag;
+
+/**
+ *  获取当前设置标签
+ *
+ *  @return 当前标签ID
+ */
++ (NSUInteger)currentTag;
+
+/**
+ *  获取设备ID
+ *
+ *  @return 设备ID
+ */
++ (NSString *)buglyDeviceId;
+
+/**
+ *  上报自定义Objective-C异常
+ *
+ *  @param exception 异常信息
+ */
++ (void)reportException:(NSException *)exception;
+
+/**
+ *  上报错误
+ *
+ *  @param error 错误信息
+ */
++ (void)reportError:(NSError *)error;
+
+/**
+ *    @brief 上报自定义错误
+ *
+ *    @param category    类型(Cocoa=3,CSharp=4,JS=5,Lua=6)
+ *    @param aName       名称
+ *    @param aReason     错误原因
+ *    @param aStackArray 堆栈
+ *    @param info        附加数据
+ *    @param terminate   上报后是否退出应用进程
+ */
++ (void)reportExceptionWithCategory:(NSUInteger)category
+                               name:(NSString *)aName
+                             reason:(NSString *)aReason
+                          callStack:(NSArray *)aStackArray
+                          extraInfo:(NSDictionary *)info
+                       terminateApp:(BOOL)terminate;
+
+/**
+ *  SDK 版本信息
+ *
+ *  @return SDK版本号
+ */
++ (NSString *)sdkVersion;
+
+/**
+ *  APP 版本信息
+ *
+ *  @return SDK版本号
+ */
++ (NSString *)appVersion;
+
+/**
+ *  App 是否发生了连续闪退
+ *  如果 启动SDK 且 5秒内 闪退,且次数达到 3次 则判定为连续闪退
+ *
+ *  @return 是否连续闪退
+ */
++ (BOOL)isAppCrashedOnStartUpExceedTheLimit;
+
+/**
+ *  关闭bugly监控
+ */
++ (void)closeCrashReport;
+
+BLY_END_NONNULL
+
+@end

+ 141 - 0
RunGame/Bugly.framework/Headers/BuglyConfig.h

@@ -0,0 +1,141 @@
+//
+//  BuglyConfig.h
+//  Bugly
+//
+//  Copyright (c) 2016年 Tencent. All rights reserved.
+//
+
+#pragma once
+
+#define BLY_UNAVAILABLE(x) __attribute__((unavailable(x)))
+
+#if __has_feature(nullability)
+#define BLY_NONNULL __nonnull
+#define BLY_NULLABLE __nullable
+#define BLY_START_NONNULL _Pragma("clang assume_nonnull begin")
+#define BLY_END_NONNULL _Pragma("clang assume_nonnull end")
+#else
+#define BLY_NONNULL
+#define BLY_NULLABLE
+#define BLY_START_NONNULL
+#define BLY_END_NONNULL
+#endif
+
+#import <Foundation/Foundation.h>
+
+#import "BuglyLog.h"
+
+BLY_START_NONNULL
+
+@protocol BuglyDelegate <NSObject>
+
+@optional
+/**
+ *  发生异常时回调
+ *
+ *  @param exception 异常信息
+ *
+ *  @return 返回需上报记录,随异常上报一起上报
+ */
+- (NSString * BLY_NULLABLE)attachmentForException:(NSException * BLY_NULLABLE)exception;
+
+
+/**
+ *  策略激活时回调
+ *
+ *  @param tacticInfo
+ *
+ *  @return app是否弹框展示
+ */
+- (BOOL) h5AlertForTactic:(NSDictionary *)tacticInfo;
+
+@end
+
+@interface BuglyConfig : NSObject
+
+/**
+ *  SDK Debug信息开关, 默认关闭
+ */
+@property (nonatomic, assign) BOOL debugMode;
+
+/**
+ *  设置自定义渠道标识
+ */
+@property (nonatomic, copy) NSString *channel;
+
+/**
+ *  设置自定义版本号
+ */
+@property (nonatomic, copy) NSString *version;
+
+/**
+ *  设置自定义设备唯一标识
+ */
+@property (nonatomic, copy) NSString *deviceIdentifier;
+
+/**
+ *  卡顿监控开关,默认关闭
+ */
+@property (nonatomic) BOOL blockMonitorEnable;
+
+/**
+ *  卡顿监控判断间隔,单位为秒
+ */
+@property (nonatomic) NSTimeInterval blockMonitorTimeout;
+
+/**
+ *  设置 App Groups Id (如有使用 Bugly iOS Extension SDK,请设置该值)
+ */
+@property (nonatomic, copy) NSString *applicationGroupIdentifier;
+
+/**
+ *  进程内还原开关,默认开启
+ */
+@property (nonatomic) BOOL symbolicateInProcessEnable;
+
+/**
+ *  非正常退出事件记录开关,默认关闭
+ */
+@property (nonatomic) BOOL unexpectedTerminatingDetectionEnable;
+
+/**
+ *  页面信息记录开关,默认开启
+ */
+@property (nonatomic) BOOL viewControllerTrackingEnable;
+
+/**
+ *  Bugly Delegate
+ */
+@property (nonatomic, assign) id<BuglyDelegate> delegate;
+
+/**
+ * 控制自定义日志上报,默认值为BuglyLogLevelSilent,即关闭日志记录功能。
+ * 如果设置为BuglyLogLevelWarn,则在崩溃时会上报Warn、Error接口打印的日志
+ */
+@property (nonatomic, assign) BuglyLogLevel reportLogLevel;
+
+/**
+ *  崩溃数据过滤器,如果崩溃堆栈的模块名包含过滤器中设置的关键字,则崩溃数据不会进行上报
+ *  例如,过滤崩溃堆栈中包含搜狗输入法的数据,可以添加过滤器关键字SogouInputIPhone.dylib等
+ */
+@property (nonatomic, copy) NSArray *excludeModuleFilter;
+
+/**
+ * 控制台日志上报开关,默认开启
+ */
+@property (nonatomic, assign) BOOL consolelogEnable;
+
+/**
+ * 崩溃退出超时,如果监听到崩溃后,App一直没有退出,则到达超时时间后会自动abort进程退出
+ * 默认值 5s, 单位 秒
+ * 当赋值为0时,则不会自动abort进程退出
+ */
+@property (nonatomic, assign) NSUInteger crashAbortTimeout;
+
+/**
+ *  设置自定义联网、crash上报域名
+ */
+@property (nonatomic, copy) NSString *crashServerUrl;
+
+@end
+BLY_END_NONNULL

+ 78 - 0
RunGame/Bugly.framework/Headers/BuglyLog.h

@@ -0,0 +1,78 @@
+//
+//  BuglyLog.h
+//  Bugly
+//
+//  Copyright (c) 2017年 Tencent. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+// Log level for Bugly Log
+typedef NS_ENUM(NSUInteger, BuglyLogLevel) {
+    BuglyLogLevelSilent  = 0,
+    BuglyLogLevelError   = 1,
+    BuglyLogLevelWarn    = 2,
+    BuglyLogLevelInfo    = 3,
+    BuglyLogLevelDebug   = 4,
+    BuglyLogLevelVerbose = 5,
+};
+#pragma mark -
+
+OBJC_EXTERN void BLYLog(BuglyLogLevel level, NSString *format, ...) NS_FORMAT_FUNCTION(2, 3);
+
+OBJC_EXTERN void BLYLogv(BuglyLogLevel level, NSString *format, va_list args) NS_FORMAT_FUNCTION(2, 0);
+
+#pragma mark -
+#define BUGLY_LOG_MACRO(_level, fmt, ...) [BuglyLog level:_level tag:nil log:fmt, ##__VA_ARGS__]
+
+#define BLYLogError(fmt, ...)   BUGLY_LOG_MACRO(BuglyLogLevelError, fmt, ##__VA_ARGS__)
+#define BLYLogWarn(fmt, ...)    BUGLY_LOG_MACRO(BuglyLogLevelWarn,  fmt, ##__VA_ARGS__)
+#define BLYLogInfo(fmt, ...)    BUGLY_LOG_MACRO(BuglyLogLevelInfo, fmt, ##__VA_ARGS__)
+#define BLYLogDebug(fmt, ...)   BUGLY_LOG_MACRO(BuglyLogLevelDebug, fmt, ##__VA_ARGS__)
+#define BLYLogVerbose(fmt, ...) BUGLY_LOG_MACRO(BuglyLogLevelVerbose, fmt, ##__VA_ARGS__)
+
+#pragma mark - Interface
+@interface BuglyLog : NSObject
+
+/**
+ *    @brief  初始化日志模块
+ *
+ *    @param level 设置默认日志级别,默认BLYLogLevelSilent
+ *
+ *    @param printConsole 是否打印到控制台,默认NO
+ */
++ (void)initLogger:(BuglyLogLevel) level consolePrint:(BOOL)printConsole;
+
+/**
+ *    @brief 打印BLYLogLevelInfo日志
+ *
+ *    @param format   日志内容 总日志大小限制为:字符串长度30k,条数200
+ */
++ (void)log:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2);
+
+/**
+ *    @brief  打印日志
+ *
+ *    @param level 日志级别
+ *    @param message   日志内容 总日志大小限制为:字符串长度30k,条数200
+ */
++ (void)level:(BuglyLogLevel) level logs:(NSString *)message;
+
+/**
+ *    @brief  打印日志
+ *
+ *    @param level 日志级别
+ *    @param format   日志内容 总日志大小限制为:字符串长度30k,条数200
+ */
++ (void)level:(BuglyLogLevel) level log:(NSString *)format, ... NS_FORMAT_FUNCTION(2, 3);
+
+/**
+ *    @brief  打印日志
+ *
+ *    @param level  日志级别
+ *    @param tag    日志模块分类
+ *    @param format   日志内容 总日志大小限制为:字符串长度30k,条数200
+ */
++ (void)level:(BuglyLogLevel) level tag:(NSString *) tag log:(NSString *)format, ... NS_FORMAT_FUNCTION(3, 4);
+
+@end

+ 12 - 0
RunGame/Bugly.framework/Modules/module.modulemap

@@ -0,0 +1,12 @@
+framework module Bugly {
+	umbrella header "Bugly.h"
+	
+	export *
+	module * { export * }
+	
+	link framework "Foundation"
+	link framework "Security"
+	link framework "SystemConfiguration"
+	link "c++"
+	link "z"
+}

+ 2 - 1
RunGame/Classes/UnityAppController.h

@@ -60,7 +60,8 @@ __attribute__ ((visibility("default")))
 @property (readonly, copy, nonatomic) UIView*               rootView;
 @property (readonly, copy, nonatomic) UIViewController*     rootViewController;
 @property (readonly, copy, nonatomic) DisplayConnection*    mainDisplay;
-
+//leon add保活
+@property (nonatomic,assign) UIBackgroundTaskIdentifier bgTask;
 #if UNITY_SUPPORT_ROTATION
 @property (readonly, nonatomic) UIInterfaceOrientation      interfaceOrientation;
 #endif

+ 35 - 5
RunGame/Classes/UnityAppController.mm

@@ -41,6 +41,7 @@
 #include <sys/sysctl.h>
 
 #import "IOSPlatformSDK.h"
+#import <Bugly/Bugly.h>
 
 // we assume that app delegate is never changed and we can cache it, instead of re-query UIApplication every time
 UnityAppController* _UnityAppController = nil;
@@ -327,6 +328,7 @@ extern "C" void UnityCleanupTrampoline()
 
     // if you wont use keyboard you may comment it out at save some memory
     [KeyboardDelegate Initialize];
+    
     //以下是几种打开App方式
     if(launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]){
          NSLog(@"打开方式 远程推送打开");
@@ -337,15 +339,16 @@ extern "C" void UnityCleanupTrampoline()
      }else if(launchOptions[UIApplicationLaunchOptionsURLKey]){
      //我们需要在此处处理通过 scheme 打开App并截获参数。
       NSURL *url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
-         NSLog(@"打开方式 通过URL打开的  ===== >> %@",url);
-         IOSPlatformSDK * sdk = [IOSPlatformSDK sharedInstance];
-         [sdk startWithUrl:url];
+//         NSLog(@"打开方式 通过URL打开的  ===== >> %@",url);
+//         IOSPlatformSDK * sdk = [IOSPlatformSDK sharedInstance];
+//         [sdk startWithUrl:url];
      }else if (!launchOptions){
          NSLog(@"打开方式 手动点击打开");
          [IOSPlatformSDK sharedInstance];
      }
-    
-//    NSLog(@"hhhhhhhhhhhhhhhhh = %@",[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]);
+    //36a0c05291
+    [Bugly startWithAppId:@"36a0c05291"];
+
     return YES;
     
 }
@@ -364,6 +367,33 @@ extern "C" void UnityCleanupTrampoline()
     BTDataProcess * sharedInstance =  [BTDataProcess sharedInstance];
     sharedInstance.isBackGround = YES;
 
+    //开启后台任务保活
+//    [self comeToBackgroundMode];
+    
+}
+
+#pragma mark -- leon add
+-(void)comeToBackgroundMode{
+    //初始化一个后台任务BackgroundTask,这个后台任务的作用就是告诉系统当前app在后台有任务处理,需要时间
+    UIApplication*  app = [UIApplication sharedApplication];
+    self.bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
+        [app endBackgroundTask:self.bgTask];
+        self.bgTask = UIBackgroundTaskInvalid;
+    }];
+    //开启定时器 不断向系统请求后台任务执行的时间
+    NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:30.0 target:self selector:@selector(applyForMoreTime) userInfo:nil repeats:YES];
+    [timer fire];
+}
+
+-(void)applyForMoreTime{
+    //如果系统给的剩余时间小于60秒 就终止当前的后台任务,再重新初始化一个后台任务,重新让系统分配时间,这样一直循环下去,保持APP在后台一直处于active状态。
+    if ([UIApplication sharedApplication].backgroundTimeRemaining < 60){
+        [[UIApplication sharedApplication] endBackgroundTask:self.bgTask];
+        self.bgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
+            [[UIApplication sharedApplication] endBackgroundTask:self.bgTask];
+            self.bgTask = UIBackgroundTaskInvalid;
+        }];
+    }
 }
 
 - (void)applicationWillEnterForeground:(UIApplication*)application

+ 2 - 0
RunGame/Info.plist

@@ -50,6 +50,8 @@
 	<array>
 		<string>bluetooth-central</string>
 		<string>bluetooth-peripheral</string>
+		<string>fetch</string>
+		<string>processing</string>
 		<string>remote-notification</string>
 	</array>
 	<key>UIPrerenderedIcon</key>

+ 8 - 18
RunGame/SDK/BLE/BTDataProcess.h

@@ -11,6 +11,8 @@
 #import "LEONBLManager.h"
 #import "CBPeripheral+ADName.h"
 
+#define Game_Type @"run"
+
 //游戏类型
 typedef NS_ENUM(int, GAME_TYPE){
     GAME_TYPE_DEMO =0, //
@@ -19,24 +21,6 @@ typedef NS_ENUM(int, GAME_TYPE){
     GAME_TYPE_SDAER, //
 };
 
-//动作数据
-typedef NS_ENUM(NSInteger, GAME_MOTION){
-    CO_MOTION_STOP =0,
-    CO_MOTION_RUN,// 跑
-    CO_MOTION_JUMP, // 跳
-    CO_MOTION_DOWN, // 蹲
-    CO_MOTION_LEFT, // 滑左
-    CO_MOTION_RIGHT, // 滑右
-    CO_MOTION_FRONT, // 滑前
-    CO_MOTION_BACK, // 滑后
-    CO_MOTION_LEFT_UP, // 点击-左上
-    CO_MOTION_LEFT_DOWN, // 点击-左下
-    CO_MOTION_RIGHT_UP, // 点击-右上
-    CO_MOTION_RIGHT_DOWN, // 点击-右下
-    CO_MOTION_STEP, // 点击-原地踩
-    CO_NUMBERS_OF_MOTION
-};
-
 //蓝牙状态
 typedef NS_ENUM(NSInteger, BLETOOTH_STUTAS){
     CONNECT_DIS =0, // 未链接
@@ -79,6 +63,12 @@ typedef NS_ENUM(NSInteger, BLETOOTH_STUTAS){
 //监听程序从后台返回
 -(void)applicationWillEnterForeground;
 
+//监听通知开始游戏
+-(void)gameStartInitData;
+//监听通知结束游戏
+-(void)gameEndInitData;
+//监听通知震动
+-(void)vibrationAction:(NSNotification*)notificatio;
 @end
 
 

+ 42 - 48
RunGame/SDK/BLE/BTDataProcess.mm

@@ -9,7 +9,6 @@
 #import "BTDataProcess.h"
 #import "IOSPlatformSDK.h"
 #include "Game.h"
-#import "MainShoesAnalysis.h"
 
 //#define NSLog(format, ...) printf("TIME:%s FILE:%s(%d行) FUNCTION:%s %s\n",__TIME__, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, __PRETTY_FUNCTION__, [[NSString stringWithFormat:(format), ##__VA_ARGS__] UTF8String])
 @interface BTDataProcess ()<NSURLSessionDataDelegate>
@@ -81,12 +80,6 @@ static BTDataProcess* instance = nil;
 
     //默认游戏模式关
     self.gameModel = NO;
-    //监听unity --> 开始游戏/结束游戏/震动
-    [CUS_NOTIFICATIONCENTER addObserver:self selector:@selector(gameStartInitData) name:@"gameStartInitData" object:nil];
-    [CUS_NOTIFICATIONCENTER addObserver:self selector:@selector(gameEndInitData:) name:@"gameEndInitData" object:nil];
-    [CUS_NOTIFICATIONCENTER addObserver:self selector:@selector(vibrationAction:) name:@"vibrationAction" object:nil];
-    //监听程序从后台返回 系统方法
-//    [CUS_NOTIFICATIONCENTER addObserver:self selector:@selector(applicationDidBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil];
 
     //监听 趣动 app group 消息
     CFStringRef strRef = (__bridge CFStringRef)@"DISCONNECT_BLE";
@@ -122,15 +115,24 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
 //监听通知开始游戏
 -(void)gameStartInitData{
     
-//    NSLog(@"通知开始游戏 --> BTDataProcess");
+    NSLog(@"通知开始游戏 --> BTDataProcess");
     self.gameModel = YES;
     //反馈->蓝牙sdk
 //    [self.game start];
     
+    //读写到特征后 添加测试弹窗
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [self inittestLabel];
+    });
+    
+//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10.0 * NSEC_PER_SEC)), dispatch_get_main_queue(),^{
+//        [self inittestLabel];
+//    });
+    
 }
 
 //监听通知结束游戏
--(void)gameEndInitData:(NSNotification*)notification{
+-(void)gameEndInitData{
     
 //    NSLog(@"通知结束游戏 --> BTDataProcess");
     self.gameModel = NO;
@@ -449,14 +451,9 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
         
         self.initial_down_count = 0;
         self.initial_jump_count = 0;
-        
-        //读写到特征后 添加测试弹窗
-        [self inittestLabel];
-        
-    }else if (deviceType ==DEVICETYPE_VICE){
-        
+                
     }
-    
+
     //开启游戏模式&查询设备信息 初始化步数数据
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(),^{
         [self timingDataTransmission:@"dispatch_after"];
@@ -763,8 +760,13 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
     }
   
     /********************调试窗数据 *****************/
-    NSArray *aArray = [self.tempStepString componentsSeparatedByString:@","];
-    self.testLabel.text = [NSString stringWithFormat:@"right:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nleft:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nZupt:[%d,%d]  press:[%d,%d] \nj&d[%d %d]  rssi:[%d %@] ts:%d \n脚步: %@ %@ \n步频: %d %d ",right_pos[0],right_pos[1],right_pos[2],right_att[0],right_att[1],right_att[2],right_acc[0],right_acc[1],right_acc[2],left_pos[0],left_pos[1],left_pos[2],left_att[0],left_att[1],left_att[2],left_acc[0],left_acc[1],left_acc[2],rightZupt,leftZupt,right_press,left_press,jump,down,rssi,self.RSSI,ts,aArray[aArray.count-2],aArray.lastObject,leftStepFreq,rightStepFreq];
+    dispatch_async(dispatch_get_main_queue(), ^{
+        NSArray *aArray = [self.tempStepString componentsSeparatedByString:@","];
+        if (self.testLabel!=nil){
+            self.testLabel.text = [NSString stringWithFormat:@"right:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nleft:[%d,%d,%d] [%d,%d,%d] [%d,%d,%d] \nZupt:[%d,%d]  press:[%d,%d] \nj&d[%d %d]  rssi:[%d %@] ts:%d \n脚步: %@ %@\n步频: %d %d ",right_pos[0],right_pos[1],right_pos[2],right_att[0],right_att[1],right_att[2],right_acc[0],right_acc[1],right_acc[2],left_pos[0],left_pos[1],left_pos[2],left_att[0],left_att[1],left_att[2],left_acc[0],left_acc[1],left_acc[2],rightZupt,leftZupt,right_press,left_press,jump,down,rssi,self.RSSI,ts,aArray[aArray.count-2],aArray.lastObject,leftStepFreq,rightStepFreq];
+        }
+        
+    });
     
 }
 
@@ -982,16 +984,7 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
 
 #pragma mark ===============================================>> DEBUG
 -(void)inittestLabel{
-    
-    UIViewController *rootVC = [[UIApplication sharedApplication].delegate window].rootViewController;
-    UIViewController *parent = rootVC;
-    while ((parent = rootVC.presentedViewController) != nil ){
-    rootVC = parent;
-    }
-    while ([rootVC isKindOfClass:[UINavigationController class]]){
-    rootVC = [(UINavigationController *)rootVC topViewController];
-    }
-    
+
     if (self.testLabel!=nil){
         [self.testLabel removeFromSuperview];
     }
@@ -1004,37 +997,38 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
         [self.clearnButton removeFromSuperview];
     }
     
-    self.testLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 0, [UIScreen mainScreen].bounds.size.width-100, 160)];
-    self.testLabel.textColor = [UIColor redColor];
-    self.testLabel.font = [UIFont boldSystemFontOfSize:18];
-    self.testLabel.backgroundColor = [UIColor clearColor];
-    self.testLabel.textAlignment = NSTextAlignmentCenter;
-    self.testLabel.numberOfLines = 0;
-    
     self.uploadButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    self.uploadButton.frame = CGRectMake(SCREEN_WIDTH/2-100-10, SCREEN_HEIGHT-40-10, 100, 40);
+    self.uploadButton.frame = CGRectMake(SCREEN_WIDTH/2-SCALEoefficient(75)-10, SCREEN_HEIGHT-40-10, SCALEoefficient(75), SCALEoefficient(30));
     self.uploadButton.backgroundColor = [UIColor redColor];
     [self.uploadButton.titleLabel setTextColor:[UIColor redColor]];
-    [self.uploadButton setFont: [UIFont boldSystemFontOfSize:20]];
+    [self.uploadButton setFont: [UIFont boldSystemFontOfSize:SCALEoefficient(15)]];
     [self.uploadButton setTitle:@"上传" forState:UIControlStateNormal];
     [self.uploadButton addTarget:self action:@selector(uploadpPlistFile) forControlEvents:UIControlEventTouchUpInside];
     
     self.clearnButton = [UIButton buttonWithType:UIButtonTypeCustom];
-    self.clearnButton.frame = CGRectMake(SCREEN_WIDTH/2+10, SCREEN_HEIGHT-40-10, 100, 40);
+    self.clearnButton.frame = CGRectMake(SCREEN_WIDTH/2+10, SCREEN_HEIGHT-40-10, SCALEoefficient(75), SCALEoefficient(30));
     self.clearnButton.backgroundColor = [UIColor redColor];
     [self.clearnButton.titleLabel setTextColor:[UIColor redColor]];
-    [self.clearnButton setFont: [UIFont boldSystemFontOfSize:20]];
+    [self.clearnButton setFont: [UIFont boldSystemFontOfSize:SCALEoefficient(15)]];
     [self.clearnButton setTitle:@"清理缓存" forState:UIControlStateNormal];
     [self.clearnButton addTarget:self action:@selector(clearCacheWithFilePath) forControlEvents:UIControlEventTouchUpInside];
     
-    [rootVC.view addSubview:self.testLabel];
-    [rootVC.view addSubview:self.uploadButton];
-    [rootVC.view addSubview:self.clearnButton];
-    
+    self.testLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCALEoefficient(20), 0, [UIScreen mainScreen].bounds.size.width-100, SCALEoefficient(160))];
+    self.testLabel.textColor = [UIColor redColor];
+    self.testLabel.font = [UIFont boldSystemFontOfSize:SCALEoefficient(14)];
+    self.testLabel.backgroundColor = [UIColor clearColor];
+    self.testLabel.textAlignment = NSTextAlignmentCenter;
+    self.testLabel.numberOfLines = 0;
+
+    if ([UIApplication sharedApplication].keyWindow != nil){
+        [[UIApplication sharedApplication].keyWindow addSubview:self.uploadButton];
+        [[UIApplication sharedApplication].keyWindow addSubview:self.clearnButton];
+        [[UIApplication sharedApplication].keyWindow addSubview:self.testLabel];
+    }
+
 }
 
 #pragma mark ===============================================>> 存储和上传数据
-
 - (void)clearCacheWithFilePath{
     
     NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
@@ -1075,12 +1069,12 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
 
     }else{
 
-//        NSLog(@"-------文件存在,追加文件----------");
-        NSFileHandle *fileHandle = [NSFileHandle fileHandleForUpdatingAtPath:filePath];
+//     NSLog(@"-------文件存在,追加文件----------");
+       NSFileHandle *fileHandle = [NSFileHandle fileHandleForUpdatingAtPath:filePath];
        [fileHandle seekToEndOfFile];  //将节点跳到文件的末尾
        NSData* stringData  = [self.tempStepString dataUsingEncoding:NSUTF8StringEncoding];
        [fileHandle writeData:stringData]; //追加写入数据
-        [fileHandle closeFile];
+       [fileHandle closeFile];
 
     }
 
@@ -1112,7 +1106,7 @@ void disConnectBle (CFNotificationCenterRef center, void *observer, CFStringRef
     AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithBaseURL:nil];
     [sessionManager POST:@"http://172.16.14.127:8080/upload" parameters:nil headers:nil constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData){
 
-        [formData  appendPartWithFileData:upData name:@"file" fileName:[NSString stringWithFormat:@"ios_run_%@.txt",[self getNowTimeTimestamp]] mimeType:@"text/plain"];
+        [formData  appendPartWithFileData:upData name:@"file" fileName:[NSString stringWithFormat:@"ios_%@_%@.txt",Game_Type,[self getNowTimeTimestamp]] mimeType:@"text/plain"];
 
         }progress:^(NSProgress * _Nonnull uploadProgress){
             NSLog(@"上传进度 = %@",uploadProgress);

+ 2 - 0
RunGame/SDK/HTTP/HTTPDataProcession.m

@@ -242,7 +242,9 @@
                  }
                 
               }
+        
             }fail:^(id errorDes){
+                
     }];
     
 }

+ 34 - 58
RunGame/SDK/IOSPlatformSDK.mm

@@ -103,7 +103,6 @@ static IOSPlatformSDK * instance;
     dispatch_once(&onceToken, ^{
         instance = [super init];
         [self initNotification];
-//        [self inittestLabel];
     });
     return instance;
 }
@@ -152,37 +151,6 @@ static IOSPlatformSDK * instance;
     
 }
 
--(void)inittestLabel{
-    
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        
-        self.testLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,[UIScreen mainScreen].bounds.size.height-40,[UIScreen mainScreen].bounds.size.width, 40)];
-        self.testLabel.textColor = [UIColor redColor];
-        self.testLabel.font = [UIFont boldSystemFontOfSize:15];
-        self.testLabel.backgroundColor = [UIColor clearColor];
-        self.testLabel.textAlignment = NSTextAlignmentCenter;
-        self.testLabel.numberOfLines = 2;
-        if (self.macAddress.length>0) {
-            self.testLabel.text = [NSString stringWithFormat:@"%@ mac: %@",self.openStyle,self.macAddress];
-        }else{
-            self.testLabel.text = [NSString stringWithFormat:@"%@ mac: %@",self.openStyle,@"--"];
-        }
-
-        UIViewController *rootVC = [[UIApplication sharedApplication].delegate window].rootViewController;
-        UIViewController *parent = rootVC;
-        while ((parent = rootVC.presentedViewController) != nil ){
-        rootVC = parent;
-        }
-        while ([rootVC isKindOfClass:[UINavigationController class]]){
-        rootVC = [(UINavigationController *)rootVC topViewController];
-        }
-    //    [rootVC addChildViewController:searchVC];
-        [rootVC.view addSubview:self.testLabel];
-        
-    });
-
-}
-
 #pragma mark ============================>> private 各类通知处理事件
 -(void)initNotification{
     
@@ -206,21 +174,24 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
         
     //group.com.Oujia.AppAndGame 沙河数据
     NSUserDefaults* userDefault = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.Oujia.AppAndGame"];
-    //invite json字符串转字典
-    NSString * jsonString = [userDefault objectForKey:@"invite"];
-    NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
-    NSDictionary *invite = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil];
-    NSLog(@"group通知监听好友邀请信息 invite jsonString = %@",invite);
-    if (invite!=nil){
-        //user字典转json字符串
-        NSData *jsonData = [NSJSONSerialization dataWithJSONObject:invite options:NSJSONWritingPrettyPrinted error:nil];
-        NSString * inviteJsonString =  [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-        const char * user =[inviteJsonString UTF8String];
-        //邀请信息
+    //趣动传过来的 invite json字符串转字典
+    NSString * string = [userDefault objectForKey:@"invite"];
+    NSData * data = [string dataUsingEncoding:NSUTF8StringEncoding];
+    NSDictionary * inviteDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
+    if (inviteDict!=nil){
+        //字典取值
+        NSDictionary * invite = [inviteDict objectForKey:@"invite"];
+        NSDictionary * user =  [invite objectForKey:@"user"];
+        //user字典转字符串
+        NSData * userData = [NSJSONSerialization dataWithJSONObject:user options:NSJSONWritingPrettyPrinted error:nil];
+        NSString * userString =  [[NSString alloc] initWithData:userData encoding:NSUTF8StringEncoding];
+        const char * userChar =[userString UTF8String];
+        //info字典转字符串
         NSString * infoString = invite[@"info"];
-        const char * info =[infoString UTF8String];
-        NSLog(@"unity 获取好友邀请信息 GetInviteInfo ===>> %@ %@",inviteJsonString,infoString);
-        inviteFriendHandler(0,user,info);
+        const char * infoChar =[infoString UTF8String];
+        NSLog(@"IOS_SKD 回调好友邀请信息 GetInviteInfo ===>>  %s , %s",userChar,infoChar);
+        inviteFriendHandler(0,userChar,infoChar);
+        
     }
     
 }
@@ -228,6 +199,7 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
 //通知开始游戏
 -(void)gameStartInitData{
     NSLog(@"unity call ios 通知开始游戏 --> IOSPlatformSDK");
+    [[BTDataProcess sharedInstance] gameStartInitData];
     if ([self existUserInfo]){
         self.firstTime = [NSDate date];
     }
@@ -235,6 +207,7 @@ void inviteFriends (CFNotificationCenterRef center, void *observer, CFStringRef
 
 //通知结束游戏
 -(void)gameEndInitData:(NSNotification*)notification{
+    [[BTDataProcess sharedInstance] gameEndInitData];
     NSLog(@"unity call ios 通知结束游戏 --> IOSPlatformSDK");
 }
 
@@ -618,7 +591,7 @@ void InviteFriend(int friendid,char * info){
         
 //        NSLog(@"IOS_SKD 回调点击邀请好友事件 InviteFriend ===>>");
         dispatch_async(dispatch_get_main_queue(), ^{
-        [PopupView showCusHUDA:@"邀请成功"];
+        [PopupView showCusHUDA:jsonString];
         });
         
     }];
@@ -633,7 +606,6 @@ void GetInviteInfo(){
     
     NSLog(@"Unity获取好友邀请信息 GetInviteInfo ===>>");
     
-    return;
     if ([instance existUserInfo]==NO){
         
         return;
@@ -643,17 +615,21 @@ void GetInviteInfo(){
         NSDictionary * jsonDict = [IOS_NSUSERDEFAULT objectForKey:IOSSDK_USERINFO];
         NSDictionary * invite = jsonDict[@"invite"];
         if (invite!=nil){
-            //user字典转json字符串
-            NSData *jsonData = [NSJSONSerialization dataWithJSONObject:invite options:NSJSONWritingPrettyPrinted error:nil];
-            NSString * inviteJsonString =  [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-            const char * user =[inviteJsonString UTF8String];
-            //邀请信息
-            NSString * infoString = invite[@"info"];
-            const char * info =[infoString UTF8String];
-            NSLog(@"IOS_SKD 回调好友邀请信息 GetInviteInfo ===>>  %@ , %@",inviteJsonString,infoString);
-            inviteFriendHandler(0,user,info);
+            
+            //user字典 -> 字符串 -> Char
+            NSDictionary * user =  [invite objectForKey:@"user"];
+            NSData * userData = [NSJSONSerialization dataWithJSONObject:user options:NSJSONWritingPrettyPrinted error:nil];
+            NSString * userString =  [[NSString alloc] initWithData:userData encoding:NSUTF8StringEncoding];
+            const char * userChar =[userString UTF8String];
+            
+            //info字符串 -> Char
+            NSString * info = invite[@"info"];
+            const char * infoChar =[info UTF8String];
+            
+            NSLog(@"IOS_SKD 回调好友邀请信息 GetInviteInfo ===>>  %s , %s",userChar,infoChar);
+            inviteFriendHandler(0,userChar,infoChar);
+            
         }
-        
     }
 }
 

+ 0 - 1
RunGame/SDK/Tool/MYFactoryManager.m

@@ -97,7 +97,6 @@ static MYFactoryManager * instance;
     
 }
 
-
 #pragma mark ------  发送app group通知
 + (void)postGroupCFNotificaiton:(NSString*)string{
     

+ 0 - 1
RunGame/SDK/UI/AnimationVIew/AnimationView.m

@@ -217,7 +217,6 @@
     
 }
 
-
 //初始化小风扇动画
 -(void)addAnimation{
     

+ 67 - 9
RunGame/Unity-iPhone.xcodeproj/project.pbxproj

@@ -146,7 +146,13 @@
 		936820C9276201B2007B4D6B /* BigFoot.h in Headers */ = {isa = PBXBuildFile; fileRef = 936820C7276201B2007B4D6B /* BigFoot.h */; };
 		936820CA276201B2007B4D6B /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 936820C8276201B2007B4D6B /* BigFoot.cpp */; };
 		936820CB276201B2007B4D6B /* BigFoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 936820C8276201B2007B4D6B /* BigFoot.cpp */; };
+		936820D92763399D007B4D6B /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 936820D82763399D007B4D6B /* libz.tbd */; };
+		936820DB276339A6007B4D6B /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 936820DA276339A5007B4D6B /* libc++.tbd */; };
 		93BF4D8886264CB7CCCB31FC /* QFramework.RefCounter_CodeGen.c in Sources */ = {isa = PBXBuildFile; fileRef = 0BBF475A88C75316BEDFEF01 /* QFramework.RefCounter_CodeGen.c */; };
+		93E55CFD27688C2600D8F97E /* Bugly.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93E55CFC27688C2600D8F97E /* Bugly.framework */; };
+		93E55CFE27688C2600D8F97E /* Bugly.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93E55CFC27688C2600D8F97E /* Bugly.framework */; };
+		93E55D0027688E5400D8F97E /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 93E55CFF27688E5400D8F97E /* libz.tbd */; };
+		93E55D0227688E5D00D8F97E /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 93E55D0127688E5D00D8F97E /* libc++.tbd */; };
 		93FA55822750E1EE00AEAD33 /* TXCarouselCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93FA54ED2750E1EE00AEAD33 /* TXCarouselCollectionViewCell.xib */; };
 		93FA55832750E1EE00AEAD33 /* TXCarouselCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93FA54ED2750E1EE00AEAD33 /* TXCarouselCollectionViewCell.xib */; };
 		93FA55842750E1EE00AEAD33 /* TXCarouselViewLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FA54EE2750E1EE00AEAD33 /* TXCarouselViewLayout.h */; };
@@ -813,6 +819,11 @@
 		9353CD66275B493E0022CE0B /* ViceShoesAnalysis.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViceShoesAnalysis.m; sourceTree = "<group>"; };
 		936820C7276201B2007B4D6B /* BigFoot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BigFoot.h; path = ../../../../shoe_sdk_c/BigFoot.h; sourceTree = "<group>"; };
 		936820C8276201B2007B4D6B /* BigFoot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BigFoot.cpp; path = ../../../../shoe_sdk_c/BigFoot.cpp; sourceTree = "<group>"; };
+		936820D82763399D007B4D6B /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
+		936820DA276339A5007B4D6B /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
+		93E55CFC27688C2600D8F97E /* Bugly.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Bugly.framework; sourceTree = "<group>"; };
+		93E55CFF27688E5400D8F97E /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
+		93E55D0127688E5D00D8F97E /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; };
 		93FA54ED2750E1EE00AEAD33 /* TXCarouselCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TXCarouselCollectionViewCell.xib; sourceTree = "<group>"; };
 		93FA54EE2750E1EE00AEAD33 /* TXCarouselViewLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TXCarouselViewLayout.h; sourceTree = "<group>"; };
 		93FA54EF2750E1EE00AEAD33 /* ShoesCarouselView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShoesCarouselView.h; sourceTree = "<group>"; };
@@ -1080,9 +1091,12 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				936820DB276339A6007B4D6B /* libc++.tbd in Frameworks */,
+				936820D92763399D007B4D6B /* libz.tbd in Frameworks */,
 				93FA566F2750E40600AEAD33 /* CFNetwork.framework in Frameworks */,
 				93FA566E2750E40300AEAD33 /* Security.framework in Frameworks */,
 				93FA566D2750E3FF00AEAD33 /* SystemConfiguration.framework in Frameworks */,
+				93E55CFD27688C2600D8F97E /* Bugly.framework in Frameworks */,
 				93FA566C2750E3FB00AEAD33 /* MobileCoreServices.framework in Frameworks */,
 				93FA566A2750E3F400AEAD33 /* CoreBluetooth.framework in Frameworks */,
 				93FA56682750E3ED00AEAD33 /* QuartzCore.framework in Frameworks */,
@@ -1104,12 +1118,15 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				93E55D0227688E5D00D8F97E /* libc++.tbd in Frameworks */,
+				93E55D0027688E5400D8F97E /* libz.tbd in Frameworks */,
 				93FA56732750E41100AEAD33 /* CoreBluetooth.framework in Frameworks */,
 				93FA56712750E40C00AEAD33 /* MobileCoreServices.framework in Frameworks */,
 				00000000008063A1000160D3 /* libiPhone-lib.a in Frameworks */,
 				9D690CCF21BFD341005026B1 /* Security.framework in Frameworks */,
 				9D690CD021BFD349005026B1 /* MediaToolbox.framework in Frameworks */,
 				9D690CD221BFD36C005026B1 /* CoreText.framework in Frameworks */,
+				93E55CFE27688C2600D8F97E /* Bugly.framework in Frameworks */,
 				9D690CD321BFD376005026B1 /* AudioToolbox.framework in Frameworks */,
 				9D690CD421BFD37E005026B1 /* AVFoundation.framework in Frameworks */,
 				8A20382D213D4B3C005E6C56 /* AVKit.framework in Frameworks */,
@@ -1164,6 +1181,11 @@
 		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				93E55D0127688E5D00D8F97E /* libc++.tbd */,
+				93E55CFF27688E5400D8F97E /* libz.tbd */,
+				93E55CFC27688C2600D8F97E /* Bugly.framework */,
+				936820DA276339A5007B4D6B /* libc++.tbd */,
+				936820D82763399D007B4D6B /* libz.tbd */,
 				93FA56722750E41100AEAD33 /* CoreBluetooth.framework */,
 				93FA566B2750E3FB00AEAD33 /* MobileCoreServices.framework */,
 				93FA56702750E40C00AEAD33 /* MobileCoreServices.framework */,
@@ -1525,17 +1547,17 @@
 		93FA54EA2750E1EE00AEAD33 /* SDK */ = {
 			isa = PBXGroup;
 			children = (
-				93FA54EB2750E1EE00AEAD33 /* UI */,
 				93FA55062750E1EE00AEAD33 /* BLE */,
-				93FA550D2750E1EE00AEAD33 /* PrefixHeader.h */,
 				93FA550E2750E1EE00AEAD33 /* Entity   */,
-				93FA55112750E1EE00AEAD33 /* ThirdClass */,
-				93FA55152750E1EE00AEAD33 /* IOSPlatformSDK.mm */,
 				93FA55162750E1EE00AEAD33 /* HTTP */,
-				93FA55282750E1EE00AEAD33 /* shoes_sdk */,
 				93FA55452750E1EE00AEAD33 /* IOSPlatformSDK.h */,
+				93FA55152750E1EE00AEAD33 /* IOSPlatformSDK.mm */,
+				93FA550D2750E1EE00AEAD33 /* PrefixHeader.h */,
 				93FA55462750E1EE00AEAD33 /* resources   */,
+				93FA55282750E1EE00AEAD33 /* shoes_sdk */,
+				93FA55112750E1EE00AEAD33 /* ThirdClass */,
 				93FA55772750E1EE00AEAD33 /* Tool */,
+				93FA54EB2750E1EE00AEAD33 /* UI */,
 			);
 			path = SDK;
 			sourceTree = SOURCE_ROOT;
@@ -2593,6 +2615,11 @@
 				COPY_PHASE_STRIP = NO;
 				CURRENT_PROJECT_VERSION = 1.0.1;
 				DEVELOPMENT_TEAM = 79QQ6HAK8M;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/SDK",
+					"$(PROJECT_DIR)",
+				);
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				GCC_OPTIMIZATION_LEVEL = 0;
@@ -2644,6 +2671,11 @@
 				COPY_PHASE_STRIP = YES;
 				CURRENT_PROJECT_VERSION = 1.0.1;
 				DEVELOPMENT_TEAM = 79QQ6HAK8M;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/SDK",
+					"$(PROJECT_DIR)",
+				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				INFOPLIST_FILE = Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@@ -2817,6 +2849,11 @@
 				CURRENT_PROJECT_VERSION = 1.0.1;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEVELOPMENT_TEAM = 79QQ6HAK8M;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/SDK",
+					"$(PROJECT_DIR)",
+				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				INFOPLIST_FILE = Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@@ -2934,6 +2971,11 @@
 				COPY_PHASE_STRIP = YES;
 				CURRENT_PROJECT_VERSION = 1.0.1;
 				DEVELOPMENT_TEAM = 79QQ6HAK8M;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/SDK",
+					"$(PROJECT_DIR)",
+				);
 				GCC_ENABLE_CPP_EXCEPTIONS = NO;
 				INFOPLIST_FILE = Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@@ -3030,7 +3072,11 @@
 				DEVELOPMENT_TEAM = "";
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				ENABLE_ON_DEMAND_RESOURCES = NO;
-				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/SDK",
+					"$(PROJECT_DIR)",
+				);
 				GCC_ENABLE_CPP_EXCEPTIONS = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = Classes/Prefix.pch;
@@ -3100,7 +3146,11 @@
 				DEVELOPMENT_TEAM = "";
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				ENABLE_ON_DEMAND_RESOURCES = NO;
-				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/SDK",
+					"$(PROJECT_DIR)",
+				);
 				GCC_ENABLE_CPP_EXCEPTIONS = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = Classes/Prefix.pch;
@@ -3172,7 +3222,11 @@
 				DEVELOPMENT_TEAM = "";
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				ENABLE_ON_DEMAND_RESOURCES = NO;
-				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/SDK",
+					"$(PROJECT_DIR)",
+				);
 				GCC_ENABLE_CPP_EXCEPTIONS = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = Classes/Prefix.pch;
@@ -3243,7 +3297,11 @@
 				DEVELOPMENT_TEAM = "";
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				ENABLE_ON_DEMAND_RESOURCES = NO;
-				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/SDK",
+					"$(PROJECT_DIR)",
+				);
 				GCC_DYNAMIC_NO_PIC = NO;
 				GCC_ENABLE_CPP_EXCEPTIONS = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;

BIN
RunGame/Unity-iPhone.xcodeproj/project.xcworkspace/xcuserdata/duowan123.xcuserdatad/UserInterfaceState.xcuserstate