提交 8979ef99 编写于 作者: Y yixiangboy

去掉体积太大的文件

上级 0418c20f
......@@ -22,5 +22,6 @@ target :'DoraemonKitDemo' do
pod 'FBRetainCycleDetector', :git => 'git@github.com:facebook/FBRetainCycleDetector.git', :configurations => ['Debug']
pod 'fishhook', :git => 'git@github.com:facebook/fishhook.git', :configurations => ['Debug']
pod 'YYDebugDatabase', :git => 'https://github.com/y500/YYDebugDatabase.git', :configurations => ['Debug']
#pod 'YYDebugDatabase', '2.0.8'
#pod 'FBRetainCycleDetector'
end
Versions/Current/DoraemonKit
\ No newline at end of file
Versions/Current/Headers
\ No newline at end of file
framework module DoraemonKit {
umbrella header "DoraemonKit.h"
export *
module * { export * }
}
Versions/Current/Resources
\ No newline at end of file
//
// DoraemonANRDetailViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/16.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonANRDetailViewController : DoraemonBaseViewController
@property (nonatomic, strong) NSDictionary *anrInfo;
@end
//
// DoraemonANRListCell.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/15.
//
#import <UIKit/UIKit.h>
@interface DoraemonANRListCell : UITableViewCell
- (void)renderCellWithData:(NSDictionary *)dic;
+ (CGFloat)cellHeight;
@end
//
// DoraemonANRListViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/15.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonANRListViewController : DoraemonBaseViewController
@end
//
// DoraemonANRManager.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/14.
//
#import <Foundation/Foundation.h>
typedef void (^DoraemonANRManagerBlock)(NSDictionary *anrInfo);
@interface DoraemonANRManager : NSObject
+ (instancetype)sharedInstance;
@property (nonatomic, assign) BOOL anrTrackOn;
@property (nonatomic, strong) NSMutableArray *anrArray;
/*
卡顿时长阈值,单位为秒,
*/
@property (nonatomic, assign) int64_t timeOut;
- (void)addANRBlock:(DoraemonANRManagerBlock)block;
- (void)start;
- (void)stop;
@end
//
// DoraemonANRPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/13.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonANRPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonANRTracker.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/14.
//
// 参考ONEANRTracker
#import <Foundation/Foundation.h>
#import "DoraemonPingThread.h"
//ANR监控状态枚举
typedef NS_ENUM(NSUInteger, DoraemonANRTrackerStatus) {
DoraemonANRTrackerStatusStart, //监控开启
DoraemonANRTrackerStatusStop, //监控停止
};
/**
* 主线程卡顿监控类
*/
@interface DoraemonANRTracker : NSObject
/**
* 开始监控
*
* @param threshold 卡顿阈值
* @param handler 监控到卡顿回调(回调时会自动暂停卡顿监控)
*/
- (void)startWithThreshold:(double)threshold
handler:(DoraemonANRTrackerBlock)handler;
/**
* 停止监控
*/
- (void)stop;
/**
* ANR监控状态
*/
- (DoraemonANRTrackerStatus)status;
@end
//
// DoraemonANRViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/13.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonANRViewController : DoraemonBaseViewController
@end
//
// DoraemonAllTestManager.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/25.
//
#import <Foundation/Foundation.h>
typedef void (^DoraemonAllTestManagerBlock)(NSDictionary *upLoadData);
@interface DoraemonAllTestManager : NSObject
+ (DoraemonAllTestManager *)shareInstance;
@property (nonatomic, assign) NSTimeInterval startTimeInterval;
@property (nonatomic, assign) BOOL fpsSwitchOn;
@property (nonatomic, assign) BOOL cpuSwitchOn;
@property (nonatomic, assign) BOOL memorySwitchOn;
@property (nonatomic, assign) BOOL flowSwitchOn;
@property (nonatomic, assign) BOOL startTestOn;
- (void)startRecord;
- (void)endRecord;
- (void)addPerformanceBlock:(DoraemonAllTestManagerBlock)block;
@end
//
// DoraemonAllTestPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/24.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonAllTestPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonAllTestViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/24.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonAllTestViewController : DoraemonBaseViewController
@end
//
// DoraemonAppInfoCell.h
// Aspects
//
// Created by yixiang on 2018/4/14.
//
#import <UIKit/UIKit.h>
@interface DoraemonAppInfoCell : UITableViewCell
- (void)renderUIWithData:(NSDictionary *)data;
+ (CGFloat)cellHeight;
@end
//
// DoraemonAppInfoPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/13.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonAppInfoPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonAppInfoUtil.h
// Aspects
//
// Created by yixiang on 2018/4/15.
//
#import <Foundation/Foundation.h>
@interface DoraemonAppInfoUtil : NSObject
/**
DeviceInfo:获取当前设备的 用户自定义的别名,例如:库克的 iPhone 9
@return 当前设备的 用户自定义的别名,例如:库克的 iPhone 9
*/
+ (NSString *)iphoneName;
/**
DeviceInfo:获取当前设备的 系统名称,例如:iOS 13.1
@return 当前设备的 系统名称,例如:iOS 13.1
*/
+ (NSString *)iphoneSystemVersion;
+ (NSString *)bundleIdentifier;
+ (NSString *)bundleVersion;
+ (NSString *)bundleShortVersionString;
+ (NSString *)iphoneType;
+ (BOOL)isIPhoneXSeries;
+ (BOOL)isIpad;
+ (NSString *)locationAuthority;
+ (NSString *)pushAuthority;
+ (NSString *)cameraAuthority;
+ (NSString *)audioAuthority;
+ (NSString *)photoAuthority;
+ (NSString *)addressAuthority;
+ (NSString *)calendarAuthority;
+ (NSString *)remindAuthority;
+ (NSString *)bluetoothAuthority;
/// 设备是否模拟器
+ (BOOL)isSimulator;
@end
//
// DoraemonAppInfoViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/13.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonAppInfoViewController : DoraemonBaseViewController
@end
//
// DoraemonBaseBigTitleView.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/12/2.
//
#import <UIKit/UIKit.h>
@protocol DoraemonBaseBigTitleViewDelegate <NSObject>
- (void)bigTitleCloseClick;
@end
@interface DoraemonBaseBigTitleView : UIView
@property (nonatomic, strong) NSString *title;
@property (nonatomic, weak) id<DoraemonBaseBigTitleViewDelegate> delegate;
@end
//
// DoraemonBaseViewController.h
// DoraemonKitDemo
//
// Created by yixiang on 2017/12/11.
// Copyright © 2017年 yixiang. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "DoraemonBaseBigTitleView.h"
@interface DoraemonBaseViewController : UIViewController
//是否需要大标题,默认不需要
- (BOOL)needBigTitleView;
@property (nonatomic, strong) DoraemonBaseBigTitleView *bigTitleView;
- (void)setLeftNavBarItems:(NSArray *)items;
- (void)leftNavBackClick:(id)clickView;
@end
//
// DoraemonCPUOscillogramViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/12.
//
#import "DoraemonOscillogramViewController.h"
@interface DoraemonCPUOscillogramViewController : DoraemonOscillogramViewController
@end
//
// DoraemonCPUOscillogramWindow.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/12.
//
#import "DoraemonOscillogramWindow.h"
@interface DoraemonCPUOscillogramWindow : DoraemonOscillogramWindow
+ (DoraemonCPUOscillogramWindow *)shareInstance;
@end
//
// DoraemonCPUPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/12.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonCPUPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonCPUUtil.h
// CocoaLumberjack
//
// Created by yixiang on 2018/1/15.
//
#import <Foundation/Foundation.h>
@interface DoraemonCPUUtil : NSObject
//获取CPU使用率
+ (CGFloat)cpuUsageForApp;
@end
//
// DoraemonCPUViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/12.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonCPUViewController : DoraemonBaseViewController
@end
//
// DoraemonCacheManager.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2017/12/12.
//
#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
@interface DoraemonCacheManager : NSObject
+ (DoraemonCacheManager *)sharedInstance;
- (void)saveLoggerSwitch:(BOOL)on;
- (BOOL)loggerSwitch;
- (void)saveMockGPSSwitch:(BOOL)on;
- (BOOL)mockGPSSwitch;
- (void)saveMockCoordinate:(CLLocationCoordinate2D)coordinate;
- (CLLocationCoordinate2D)mockCoordinate;
- (void)saveFpsSwitch:(BOOL)on;
- (BOOL)fpsSwitch;
- (void)saveCpuSwitch:(BOOL)on;
- (BOOL)cpuSwitch;
- (void)saveMemorySwitch:(BOOL)on;
- (BOOL)memorySwitch;
- (void)saveNetFlowSwitch:(BOOL)on;
- (BOOL)netFlowSwitch;
- (void)saveSubThreadUICheckSwitch:(BOOL)on;
- (BOOL)subThreadUICheckSwitch;
- (void)saveCrashSwitch:(BOOL)on;
- (BOOL)crashSwitch;
- (void)saveNSLogSwitch:(BOOL)on;
- (BOOL)nsLogSwitch;
- (void)saveMethodUseTimeSwitch:(BOOL)on;
- (BOOL)methodUseTimeSwitch;
/// 历史记录
- (NSArray<NSString *> *)h5historicalRecord;
- (void)saveH5historicalRecordWithText:(NSString *)text;
- (void)clearAllH5historicalRecord;
- (void)clearH5historicalRecordWithText:(NSString *)text;
@end
//
// DoraemonCellButton.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/15.
//
#import <UIKit/UIKit.h>
@protocol DoraemonCellButtonDelegate<NSObject>
- (void)cellBtnClick:(id)sender;
@end
@interface DoraemonCellButton : UIView
@property (nonatomic, weak) id<DoraemonCellButtonDelegate> delegate;
- (void)renderUIWithTitle:(NSString *)title;
- (void)renderUIWithRightContent:(NSString *)rightContent;
- (void)needTopLine;
- (void)needDownLine;
@end
//
// DoraemonCellInput.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/12/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonCellInput : UIView
@property (nonatomic, strong) UITextField *textField;
- (void)renderUIWithTitle:(NSString *)title;
- (void)renderUIWithPlaceholder:(NSString *)placeholder;
- (void)needTopLine;
- (void)needDownLine;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonSwitchView.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/13.
//
#import <UIKit/UIKit.h>
@protocol DoraemonSwitchViewDelegate<NSObject>
- (void)changeSwitchOn:(BOOL)on sender:(id)sender;
@end
@interface DoraemonCellSwitch : UIView
@property (nonatomic, weak) id<DoraemonSwitchViewDelegate> delegate;
@property (nonatomic, strong) UISwitch *switchView;
- (void)renderUIWithTitle:(NSString *)title switchOn:(BOOL)on;
- (void)needTopLine;
- (void)needDownLine;
@end
//
// DoraemonColorPickInfoView.h
// DoraemonKit
//
// Created by wenquan on 2018/12/3.
//
#import <UIKit/UIKit.h>
@class DoraemonColorPickInfoView;
@protocol DoraemonColorPickInfoViewDelegate <NSObject>
@optional
- (void)closeBtnClicked:(id)sender onColorPickInfoView:(DoraemonColorPickInfoView *)colorPickInfoView;
@end
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonColorPickInfoView : UIView
@property (nonatomic, weak) id<DoraemonColorPickInfoViewDelegate> delegate;
- (void)setCurrentColor:(NSString *)hexColor;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonColorPickInfoWindow.h
// DoraemonKit
//
// Created by wenquan on 2018/12/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonColorPickInfoWindow : UIWindow
+ (DoraemonColorPickInfoWindow *)shareInstance;
- (void)show;
- (void)hide;
- (void)setCurrentColor:(NSString *)hexColor;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonColorPickMagnifyLayer.h
// DoraemonKit
//
// Created by wenquan on 2019/1/31.
//
#import <QuartzCore/QuartzCore.h>
typedef NSString* (^DoraemonColorPickMagnifyLayerPointColorBlock) (CGPoint);
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonColorPickMagnifyLayer : CALayer
/**
获取指定点的颜色值
*/
@property (nonatomic, copy) DoraemonColorPickMagnifyLayerPointColorBlock pointColorBlock;
/**
目标视图展示位置
*/
@property (nonatomic, assign) CGPoint targetPoint;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonColorPickPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/3/5.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonColorPickPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonColorPickView.h
// Aspects
//
// Created by yixiang on 2018/3/6.
//
#import <UIKit/UIKit.h>
@interface DoraemonColorPickView : UIView
- (void)setCurrentImage:(UIImage *)image;
- (void)setCurrentColor:(NSString *)hexColor;
@end
//
// DoraemonColorPickWindow.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/3/5.
//
#import <UIKit/UIKit.h>
@interface DoraemonColorPickWindow : UIWindow
+ (DoraemonColorPickWindow *)shareInstance;
- (void)show;
- (void)hide;
@end
//
// DoraemonCrashListViewController.h
// DoraemonKit
//
// Created by wenquan on 2018/11/22.
//
#import "DoraemonBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonCrashListViewController : DoraemonBaseViewController
@end
NS_ASSUME_NONNULL_END
//
// DoraemonCrashPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/19.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonCrashPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonCrashSignalExceptionHandler.h
// DoraemonKit
//
// Created by wenquan on 2018/11/22.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonCrashSignalExceptionHandler : NSObject
+ (void)registerHandler;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonCrashTool.h
// DoraemonKit
//
// Created by wenquan on 2018/11/22.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonCrashTool : NSObject
/**
保存崩溃日志到沙盒中的Library/Caches/Crash目录下
@param log 崩溃日志的内容
@param fileName 保存的文件名
*/
+ (void)saveCrashLog:(NSString *)log fileName:(NSString *)fileName;
/**
获取崩溃日志的目录
@return 崩溃日志的目录
*/
+ (NSString *)crashDirectory;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonCrashUncaughtExceptionHandler.h
// DoraemonKit
//
// Created by wenquan on 2018/11/22.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonCrashUncaughtExceptionHandler : NSObject
+ (void)registerHandler;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonCrashViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/19.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonCrashViewController : DoraemonBaseViewController
@end
//
// DoraemonDBCell.h
// AFNetworking
//
// Created by yixiang on 2019/4/1.
//
#import <UIKit/UIKit.h>
#import "DoraemonDBRowView.h"
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonDBCell : UITableViewCell
@property (nonatomic, strong) DoraemonDBRowView *rowView;
- (void)renderCellWithArray:(NSArray *)array;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonDBManager.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2019/3/30.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonDBManager : NSObject
+ (DoraemonDBManager *)shareManager;
@property (nonatomic, copy) NSString *dbPath;
@property (nonatomic, copy) NSString *tableName;
- (NSArray *)tablesAtDB;
- (NSArray *)dataAtTable;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonDBRowView.h
// AFNetworking
//
// Created by yixiang on 2019/4/1.
//
#import <UIKit/UIKit.h>
@class DoraemonDBRowView;
typedef NS_ENUM(NSInteger, DoraemonDBRowViewType) {
DoraemonDBRowViewTypeForTitle = 0,
DoraemonDBRowViewTypeForOne = 1,
DoraemonDBRowViewTypeForTwo = 2
};
@protocol DoraemonDBRowViewTypeDelegate <NSObject>
- (void)rowView:(DoraemonDBRowView *)rowView didLabelTaped:(UILabel *)label;
@end
@interface DoraemonDBRowView : UIView
@property(nonatomic, copy) NSArray *dataArray;
@property(nonatomic, assign) DoraemonDBRowViewType type;
@property(nonatomic, weak) id<DoraemonDBRowViewTypeDelegate> delegate;
@end
//
// DoraemonDBShowView.h
// AFNetworking
//
// Created by yixiang on 2019/4/1.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonDBShowView : UIView
- (void)showText:(NSString *)text;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonDBTableViewController.h
// AFNetworking
//
// Created by yixiang on 2019/3/31.
//
#import "DoraemonBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonDBTableViewController : DoraemonBaseViewController
@end
NS_ASSUME_NONNULL_END
//
// DoraemonDefaultWebViewController.h
// AFNetworking
//
// Created by yixiang on 2018/12/27.
//
#import "DoraemonBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonDefaultWebViewController : DoraemonBaseViewController
@property (nonatomic, copy) NSString *h5Url;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonDefine.h
// DoraemonKitDemo
//
// Created by yixiang on 2017/12/11.
// Copyright © 2017年 yixiang. All rights reserved.
//
#ifndef DoraemonDefine_h
#define DoraemonDefine_h
#import "DoraemonAppInfoUtil.h"
#import "UIColor+Doraemon.h"
#import "UIView+Doraemon.h"
#import "UIImage+Doraemon.h"
#import "Doraemoni18NUtil.h"
#import "DoraemonToastUtil.h"
#define DoraemonScreenWidth [UIScreen mainScreen].bounds.size.width
#define DoraemonScreenHeight [UIScreen mainScreen].bounds.size.height
//根据750*1334分辨率计算size
#define kDoraemonSizeFrom750(x) ((x)*DoraemonScreenWidth/750)
// 如果横屏显示
#define kDoraemonSizeFrom750_Landscape(x) (kInterfaceOrientationPortrait ? kDoraemonSizeFrom750(x) : ((x)*DoraemonScreenHeight/750))
#define kInterfaceOrientationPortrait UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)
#define IS_IPHONE_X_Series [DoraemonAppInfoUtil isIPhoneXSeries]
#define IPHONE_NAVIGATIONBAR_HEIGHT (IS_IPHONE_X_Series ? 88 : 64)
#define IPHONE_STATUSBAR_HEIGHT (IS_IPHONE_X_Series ? 44 : 20)
#define IPHONE_SAFEBOTTOMAREA_HEIGHT (IS_IPHONE_X_Series ? 34 : 0)
#define IPHONE_TOPSENSOR_HEIGHT (IS_IPHONE_X_Series ? 32 : 0)
#define DoraemonShowPluginNotification @"DoraemonShowPluginNotification"
#define DoraemonClosePluginNotification @"DoraemonClosePluginNotification"
#define DoraemonQuickOpenLogVCNotification @"DoraemonQuickOpenLogVCNotification"
#endif /* DoraemonDefine_h */
//
// DoraemonDeleteLocalDataPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/11/22.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonDeleteLocalDataPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonDeleteLocalDataViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/11/22.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonDeleteLocalDataViewController : DoraemonBaseViewController
@end
//
// DoraemonEntryView.h
// DoraemonKitDemo
//
// Created by yixiang on 2017/12/11.
// Copyright © 2017年 yixiang. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface DoraemonEntryView : UIWindow
@end
//
// DoraemonFPSOscillogramViewController.h
// CocoaLumberjack
//
// Created by yixiang on 2018/1/12.
//
#import "DoraemonOscillogramViewController.h"
@interface DoraemonFPSOscillogramViewController : DoraemonOscillogramViewController
@end
//
// DoraemonFPSOscillogramWindow.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/12.
//
#import "DoraemonOscillogramWindow.h"
@interface DoraemonFPSOscillogramWindow : DoraemonOscillogramWindow
+ (DoraemonFPSOscillogramWindow *)shareInstance;
@end
//
// DoraemonFPSPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/3.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonFPSPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonFPSUtil.h
// AFNetworking
//
// Created by yixiang on 2019/5/9.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^DoraemonFPSBlock)(NSInteger fps);
@interface DoraemonFPSUtil : NSObject
- (void)start;
- (void)end;
- (void)addFPSBlock:(DoraemonFPSBlock)block;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonFPSViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/3.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonFPSViewController : DoraemonBaseViewController
@end
//
// DoraemonH5Plugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/5/4.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonH5Plugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonH5ViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/5/4.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonH5ViewController : DoraemonBaseViewController
@end
//
// DoraemonHomeSectionView.h
// AFNetworking
//
// Created by yixiang on 2018/11/27.
//
#import <UIKit/UIKit.h>
@interface DoraemonHomeSectionView : UIView
- (void)renderUIWithData:(NSDictionary *)data;
- (void)updateUILayoutWithData:(NSDictionary *)data;
+ (CGFloat)viewHeightWithData:(NSDictionary *)data;
@end
//
// DoraemonHomeViewController.h
// DoraemonKitDemo
//
// Created by yixiang on 2017/12/11.
// Copyright © 2017年 yixiang. All rights reserved.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonHomeViewController : DoraemonBaseViewController
@end
//
// DoraemonHomeWindow.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/5/16.
//
#import <UIKit/UIKit.h>
@interface DoraemonHomeWindow : UIWindow
@property (nonatomic, strong) UINavigationController *nav;
+ (DoraemonHomeWindow *)shareInstance;
- (void)openPlugin:(UIViewController *)vc;
- (void)show;
- (void)hide;
@end
//
// DoraemonKit.h
// Pods
//
// Created by yixiang on 2017/12/11.
//
#ifndef DoraemonKit_h
#define DoraemonKit_h
#import "DoraemonManager.h"
#import "DoraemonBaseViewController.h"
#endif /* DoraemonKit_h */
//
// DoraemonManager.h
// DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import <Foundation/Foundation.h>
typedef void (^DoraemonH5DoorBlock)(NSString *);
typedef NS_ENUM(NSUInteger, DoraemonManagerPluginType) {
#pragma mark - 常用工具
// App信息
DoraemonManagerPluginType_DoraemonAppInfoPlugin,
// 沙盒浏览
DoraemonManagerPluginType_DoraemonSandboxPlugin,
// MockGPS
DoraemonManagerPluginType_DoraemonGPSPlugin,
// H5任意门
DoraemonManagerPluginType_DoraemonH5Plugin,
// Crash查看
DoraemonManagerPluginType_DoraemonCrashPlugin,
// 子线程UI
DoraemonManagerPluginType_DoraemonSubThreadUICheckPlugin,
// 清除本地数据
DoraemonManagerPluginType_DoraemonDeleteLocalDataPlugin,
// NSLog
DoraemonManagerPluginType_DoraemonNSLogPlugin,
// 日志显示
DoraemonManagerPluginType_DoraemonCocoaLumberjackPlugin,
#pragma mark - 性能检测
// 帧率监控
DoraemonManagerPluginType_DoraemonFPSPlugin,
// CPU监控
DoraemonManagerPluginType_DoraemonCPUPlugin,
// 内存监控
DoraemonManagerPluginType_DoraemonMemoryPlugin,
// 流量监控
DoraemonManagerPluginType_DoraemonNetFlowPlugin,
// 卡顿检测
DoraemonManagerPluginType_DoraemonANRPlugin,
// 自定义 性能数据保存到本地
DoraemonManagerPluginType_DoraemonAllTestPlugin,
// Load耗时
DoraemonManagerPluginType_DoraemonMethodUseTimePlugin,
#pragma mark - 视觉工具
// 颜色吸管
DoraemonManagerPluginType_DoraemonColorPickPlugin,
// 组件检查
DoraemonManagerPluginType_DoraemonViewCheckPlugin,
// 对齐标尺
DoraemonManagerPluginType_DoraemonViewAlignPlugin,
// 元素边框线
DoraemonManagerPluginType_DoraemonViewMetricsPlugin
};
@interface DoraemonManagerPluginTypeModel : NSObject
@property(nonatomic, copy) NSString *title;
@property(nonatomic, copy) NSString *desc;
@property(nonatomic, copy) NSString *icon;
@property(nonatomic, copy) NSString *pluginName;
@property(nonatomic, copy) NSString *atModule;
@end
@interface DoraemonManager : NSObject
+ (nonnull DoraemonManager *)shareInstance;
- (void)install;
- (void)installWithCustomBlock:(void(^)())customBlock;
@property (nonatomic,strong) NSMutableArray *dataArray;
@property (nonatomic, copy) DoraemonH5DoorBlock h5DoorBlock;
- (void)addPluginWithTitle:(NSString *)title icon:(NSString *)iconName desc:(NSString *)desc pluginName:(NSString *)entryName atModule:(NSString *)moduleName;
- (void)addPluginWithTitle:(NSString *)title icon:(NSString *)iconName desc:(NSString *)desc pluginName:(NSString *)entryName atModule:(NSString *)moduleName handle:(void(^)(NSDictionary *itemData))handleBlock;
- (void)removePluginWithPluginType:(DoraemonManagerPluginType)pluginType;
- (void)removePluginWithPluginName:(NSString *)pluginName atModule:(NSString *)moduleName;
- (void)addStartPlugin:(NSString *)pluginName;
- (void)addH5DoorBlock:(void(^)(NSString *h5Url))block;
- (void)addANRBlock:(void(^)(NSDictionary *anrDic))block;
- (void)addPerformanceBlock:(void(^)(NSDictionary *performanceDic))block;
- (void)showDoraemon;
- (void)hiddenDoraemon;
- (void)hiddenHomeWindow;
@end
//
// DoraemonMemoryOscillogramViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/25.
//
#import "DoraemonOscillogramViewController.h"
@interface DoraemonMemoryOscillogramViewController : DoraemonOscillogramViewController
@end
//
// DoraemonMemoryOscillogramWindow.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/25.
//
#import "DoraemonOscillogramWindow.h"
@interface DoraemonMemoryOscillogramWindow : DoraemonOscillogramWindow
+ (DoraemonMemoryOscillogramWindow *)shareInstance;
@end
//
// DoraemonMemoryPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/25.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonMemoryPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonMemoryUtil.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/25.
//
#import <Foundation/Foundation.h>
@interface DoraemonMemoryUtil : NSObject
//当前app内存使用量
+ (NSInteger)useMemoryForApp;
//设备总的内存
+ (NSInteger)totalMemoryForDevice;
@end
//
// DoraemonMemoryViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/1/25.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonMemoryViewController : DoraemonBaseViewController
@end
//
// DoraemonMetricsView.h
// DoraemonKit
//
// Created by xgb on 2018/12/11.
//
#import <UIKit/UIKit.h>
@interface DoraemonMetricsView : UIView
@end
//
// DoraemonMetricsViewController.h
// DoraemonKit
//
// Created by xgb on 2019/1/10.
//
#import <DoraemonKit/DoraemonKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonMetricsViewController : DoraemonBaseViewController
@end
NS_ASSUME_NONNULL_END
//
// DoraemonNSLogListCell.h
// AFNetworking
//
// Created by yixiang on 2018/11/26.
//
#import <UIKit/UIKit.h>
#import "DoraemonNSLogModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonNSLogListCell : UITableViewCell
- (void)renderCellWithData:(DoraemonNSLogModel *)model;
+ (CGFloat)cellHeightWith:(DoraemonNSLogModel *)model;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonNSLogListViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/11/26.
//
#import "DoraemonBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonNSLogListViewController : DoraemonBaseViewController
@end
NS_ASSUME_NONNULL_END
//
// DoraemonNSLogManager.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/11/26.
//
#import <Foundation/Foundation.h>
#import "DoraemonNSLogModel.h"
@interface DoraemonNSLogManager : NSObject
+ (instancetype)sharedInstance;
@property (nonatomic, strong) NSMutableArray<DoraemonNSLogModel *> *dataArray;
- (void)startNSLogMonitor;
- (void)addNSLog:(NSString *)log;
@end
//
// DoraemonNSLogModel.h
// AFNetworking
//
// Created by yixiang on 2018/11/26.
//
#import <Foundation/Foundation.h>
@interface DoraemonNSLogModel : NSObject
@property (nonatomic, copy) NSString *content;
@property (nonatomic, assign) NSTimeInterval timeInterval;
@property (nonatomic, assign) BOOL expand;
@end
//
// DoraemonNSLogPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/11/25.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonNSLogPlugin : NSObject<DoraemonPluginProtocol>
@end
NS_ASSUME_NONNULL_END
//
// DoraemonNSLogSearchView.h
// AFNetworking
//
// Created by yixiang on 2018/12/3.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol DoraemonNSLogSearchViewDelegate <NSObject>
- (void)searchViewInputChange:(NSString *)text;
@end
@interface DoraemonNSLogSearchView : UIView
@property (nonatomic, weak) id<DoraemonNSLogSearchViewDelegate> delegate;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonNSLogViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/11/25.
//
#import "DoraemonBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonNSLogViewController : DoraemonBaseViewController
@end
NS_ASSUME_NONNULL_END
//
// DoraemonNSURLProtocol.h
// Aspects
//
// Created by yixiang on 2018/4/11.
//
#import <Foundation/Foundation.h>
@interface DoraemonNSURLProtocol : NSURLProtocol
@end
//
// DoraemonNavBarItemModel.h
// DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger, DoraemonNavBarItemType) {
DoraemonNavBarItemTypeText = 0,
DoraemonNavBarItemTypeImage,
};
@interface DoraemonNavBarItemModel : NSObject
@property (nonatomic, assign) DoraemonNavBarItemType type;
@property (nonatomic, copy) NSString *text;
@property (nonatomic, strong) UIImage *image;
@property (nonatomic, strong) UIColor *textColor;
@property (nonatomic, assign) SEL selector;
- (instancetype)initWithText:(NSString *)text color:(UIColor *)color selector:(SEL)selector;
- (instancetype)initWithImage:(UIImage *)image selector:(SEL)selector;
@end
//
// DoraemonNetFlowDataSource.h
// Aspects
//
// Created by yixiang on 2018/4/11.
//
#import <Foundation/Foundation.h>
#import "DoraemonNetFlowHttpModel.h"
@interface DoraemonNetFlowDataSource : NSObject
@property (nonatomic, strong) NSMutableArray<DoraemonNetFlowHttpModel *> *httpModelArray;
+ (DoraemonNetFlowDataSource *)shareInstance;
- (void)addHttpModel:(DoraemonNetFlowHttpModel *)httpModel;
- (void)clear;
@end
//
// DoraemonNetFlowDetailCell.h
// Aspects
//
// Created by yixiang on 2018/4/19.
//
#import <UIKit/UIKit.h>
@interface DoraemonNetFlowDetailCell : UITableViewCell
- (void)renderUIWithContent:(NSString *)content isFirst:(BOOL)isFirst isLast:(BOOL)isLast;
+ (CGFloat)cellHeightWithContent:(NSString *)content;
@end
//
// DoraemonNetFlowDetailSegment.h
// AFNetworking
//
// Created by yixiang on 2018/12/9.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol DoraemonNetFlowDetailSegmentDelegate <NSObject>
- (void)segmentClick:(NSInteger)index;
@end
@interface DoraemonNetFlowDetailSegment : UIView
@property (nonatomic, weak) id<DoraemonNetFlowDetailSegmentDelegate> delegate;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonNetFlowDetailViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/13.
//
#import "DoraemonBaseViewController.h"
#import "DoraemonNetFlowHttpModel.h"
@interface DoraemonNetFlowDetailViewController : DoraemonBaseViewController
@property (nonatomic, strong) DoraemonNetFlowHttpModel *httpModel;
@end
//
// DoraemonNetFlowHttpModel.h
// Aspects
//
// Created by yixiang on 2018/4/11.
//
#import <Foundation/Foundation.h>
@interface DoraemonNetFlowHttpModel : NSObject
@property (nonatomic, copy) NSString *requestId;
@property (nonatomic, copy) NSString *url;
@property (nonatomic, copy) NSString *method;
@property (nonatomic, copy) NSString *requestBody;
@property (nonatomic, copy) NSString *statusCode;
@property (nonatomic, copy) NSData *responseData;
@property (nonatomic, copy) NSString *responseBody;
@property (nonatomic, copy) NSString *mineType;
@property (nonatomic, assign) NSTimeInterval startTime;
@property (nonatomic, assign) NSTimeInterval endTime;
@property (nonatomic, copy) NSString *totalDuration;
@property (nonatomic, copy) NSString *uploadFlow;//上行流量
@property (nonatomic, copy) NSString *downFlow;//下行流量
@property (nonatomic, strong) NSURLRequest *request;
@property (nonatomic, strong) NSURLResponse *response;
+ (DoraemonNetFlowHttpModel *)dealWithResponseData:(NSData *)responseData response:(NSURLResponse*)response request:(NSURLRequest *)request;
@end
//
// DoraemonNetFlowListCell.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/13.
//
#import <UIKit/UIKit.h>
#import "DoraemonNetFlowHttpModel.h"
@interface DoraemonNetFlowListCell : UITableViewCell
- (void)renderCellWithModel:(DoraemonNetFlowHttpModel *)httpModel;
+ (CGFloat)cellHeightWithModel:(DoraemonNetFlowHttpModel *)httpModel;
@end
//
// DoraemonNetFlowListViewController.h
// Aspects
//
// Created by yixiang on 2018/4/11.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonNetFlowListViewController : DoraemonBaseViewController
@end
//
// DoraemonNetFlowManager.h
// Aspects
//
// Created by yixiang on 2018/4/11.
//
#import <Foundation/Foundation.h>
@interface DoraemonNetFlowManager : NSObject
+ (DoraemonNetFlowManager *)shareInstance;
@property (nonatomic, strong) NSDate *startInterceptDate;
@property (nonatomic, assign) BOOL canIntercept;
- (void)canInterceptNetFlow:(BOOL)enable;
+ (void)setEnabled:(BOOL)enabled forSessionConfiguration:(NSURLSessionConfiguration *)sessionConfig;
@end
//
// DoraemonNetFlowOscillogramViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/5/2.
//
#import "DoraemonOscillogramViewController.h"
@interface DoraemonNetFlowOscillogramViewController : DoraemonOscillogramViewController
@end
//
// DoraemonNetFlowOscillogramWindow.h
// AFNetworking
//
// Created by yixiang on 2018/5/2.
//
#import "DoraemonOscillogramWindow.h"
@interface DoraemonNetFlowOscillogramWindow : DoraemonOscillogramWindow
+ (DoraemonNetFlowOscillogramWindow *)shareInstance;
@end
//
// DoraemonNetFlowPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/9.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonNetFlowPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonNetFlowSummaryMethodDataView.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/23.
//
#import <UIKit/UIKit.h>
@interface DoraemonNetFlowSummaryMethodDataView : UIView
@end
//
// DoraemonNetFlowSummaryTotalDataView.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/23.
//
#import <UIKit/UIKit.h>
@interface DoraemonNetFlowSummaryTotalDataView : UIView
@end
//
// DoraemonNetFlowSummaryTypeDataView.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/23.
//
#import <UIKit/UIKit.h>
@interface DoraemonNetFlowSummaryTypeDataView : UIView
@end
//
// DoraemonNetFlowSummaryViewController.h
// Aspects
//
// Created by yixiang on 2018/4/12.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonNetFlowSummaryViewController : DoraemonBaseViewController
@end
//
// DoraemonNetFlowViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/9.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonNetFlowViewController : DoraemonBaseViewController
@end
//
// DoraemonOscillogramView.h
// CocoaLumberjack
//
// Created by yixiang on 2018/1/3.
//
#import <UIKit/UIKit.h>
@class DoraemonPerformanceInfoModel;
@interface DoraemonPoint : NSObject
@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@end
@interface DoraemonOscillogramView : UIScrollView
@property (nonatomic, strong) UIColor *strokeColor;
@property (nonatomic, assign) NSInteger numberOfPoints;
- (void)addHeightValue:(CGFloat)showHeight andTipValue:(NSString *)tipValue;
- (void)setLowValue:(NSString *)value;
- (void)setHightValue:(NSString *)value;
- (void)clear;
@end
//
// DoraemonOscillogramViewController.h
// CocoaLumberjack
//
// Created by yixiang on 2018/1/4.
//
#import <UIKit/UIKit.h>
#import "DoraemonOscillogramView.h"
@interface DoraemonOscillogramViewController : UIViewController
@property (nonatomic, strong) DoraemonOscillogramView *oscillogramView;
@property (nonatomic, strong) UIButton *closeBtn;
- (NSString *)title;
- (NSString *)lowValue;
- (NSString *)highValue;
- (void)closeBtnClick;
- (void)startRecord;
- (void)endRecord;
- (void)doSecondFunction;
@end
//
// DoraemonOscillogramWindow.h
// CocoaLumberjack
//
// Created by yixiang on 2018/1/3.
//
#import <UIKit/UIKit.h>
#import "DoraemonOscillogramViewController.h"
@interface DoraemonOscillogramWindow : UIWindow
+ (DoraemonOscillogramWindow *)shareInstance;
@property (nonatomic, strong) DoraemonOscillogramViewController *vc;
//需要子类重写
- (void)addRootVc;
- (void)show;
- (void)hide;
@end
//
// DoraemonOscillogramWindowManager.h
// AFNetworking
//
// Created by yixiang on 2019/5/16.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonOscillogramWindowManager : NSObject
+ (DoraemonOscillogramWindowManager *)shareInstance;
- (void)resetLayout;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonPingThread.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/14.
//
// 参考ONEANRTracker
#import <Foundation/Foundation.h>
typedef void (^DoraemonANRTrackerBlock)(NSDictionary *info);
/**
* 用于Ping主线程的线程类
* 通过信号量控制来Ping主线程,判断主线程是否卡顿
*/
@interface DoraemonPingThread : NSThread
/**
* 初始化Ping主线程的线程类
*
* @param threshold 主线程卡顿阈值
* @param handler 监控到卡顿回调
*/
- (instancetype)initWithThreshold:(double)threshold
handler:(DoraemonANRTrackerBlock)handler;
@end
//
// DoraemonPluginProtocol.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import <Foundation/Foundation.h>
@protocol DoraemonPluginProtocol <NSObject>
@optional
- (void)pluginDidLoad;
- (void)pluginDidLoad:(NSDictionary *)itemData;
@end
//
// DoraemonQRCodeTool.h
// DoraemonKit-DoraemonKit
//
// Created by love on 2019/5/24.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonQRCodeTool : NSObject
/** 半透明的外圈view,以供扩展 */
@property (nonatomic,strong,readonly) UIView * maskView;
/**
* 单例宏
*/
//FSingletonH(FQuickCreateQRCode)
+ (instancetype)shared;
/**是否存在延迟*/
@property (nonatomic,assign) BOOL isAddDelay;
// =======================================二维码扫描======================================================
/**
* 启动二维码扫描
*/
- (void)startScanning;
/**
* 停止二维码扫描
*/
- (void)stopScanning;
/**
* 二维码的初始化
*
* QRCodeWidth 默认为屏幕宽度的2/3
*
* 如果返回值存在,则二维码实例化不成功,返回值为error
*
* 二维码扫描需要真机,模拟器不可以
*
* 初始化完成不会自动扫描,需要手动开启
*
* 当扫描到结果时不会自动停止,会继续扫描,需要手动来停止扫描
*/
- (NSString *)QRCodeDeviceInitWithVC:(UIViewController *)VC
WithQRCodeWidth:(CGFloat)QRCodeWidth
ScanResults:(void (^)(NSString *result))ScanResults;
/*
* 二维码扫描示例
FQRCodeTool *tool = [FQRCodeTool sharedFQRCodeTool];
NSString *error = [tool QRCodeDeviceInitWithVC:self WithQRCodeWidth:0 ScanResults:^(NSString *result) {
NSLog(@"%@",result); // 在这里就可以添加弹出框。。。
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"扫描结果" message:result delegate:nil cancelButtonTitle:@"朕知道了" otherButtonTitles:nil, nil];
[alert show];
[tool stopScanning];
}];
if (error) {
// 这里得到返回的错误,可以进行提示
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"错误提示" message:error delegate:nil cancelButtonTitle:@"朕知道了" otherButtonTitles:nil, nil];
[alert show];
}
else
{
[tool startScanning];
}
// 扩展
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
button.frame = CGRectMake(100, 100, 50, 30);
[button setTitle:@"跳转" forState:UIControlStateNormal];
button.backgroundColor = [UIColor redColor];
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[tool.maskView addSubview:button];
*/
// =======================================二维码解析======================================================
/**
* 通过 UIImage 解析二维码
*/
+ (NSString *)parsingQRCodeStringFromUIImage:(UIImage *)image;
/**
* 通过 CIImage 解析二维码
*/
+ (NSString *)parsingQRCodeStringFromCiImage:(CIImage *)image;
// =======================================二维码生成======================================================
/**
* 生成带小图片的二维码
*
* 二维码颜色为黑色,中心图片的宽度为二维码的1/5
* QRCodeContent 生成二维码的内容
* QRCodeWidth 生成二维码的宽高
* centerImage 生成二维码的中心图片
*/
+ (UIImage *)generateQRCodeWithQRCodeContent:(NSString *)QRCodeContent
QRCodeWidth:(CGFloat)QRCodeWidth
centerImage:(UIImage *)centerImage;
/**
* 生成自定义颜色的二维码
*
* QRCodeContent 生成二维码的内容
* QRCodeWidth 生成二维码的宽高
*
*/
+ (UIImage *)generateQRCodeWithQRCodeContent:(NSString *)QRCodeContent
QRCodeWidth:(CGFloat)QRCodeWidth
withRed:(CGFloat)red
andGreen:(CGFloat)green
andBlue:(CGFloat)blue;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonQRCodeViewController.h
// AFNetworking
//
// Created by love on 2019/5/22.
//
#import <Foundation/Foundation.h>
#import "DoraemonBaseViewController.h"
@interface DoraemonQRCodeViewController : DoraemonBaseViewController
@property (nonatomic, copy) void(^QRCodeBlock)(NSString *QRCodeResult);
@end
//
// DoraemonSanboxDetailViewController.h
// AFNetworking
//
// Created by yixiang on 2018/6/20.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonSanboxDetailViewController : DoraemonBaseViewController
@property (nonatomic, copy) NSString *filePath;
@end
//
// DoraemonSandboxCell.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import <UIKit/UIKit.h>
@class DoraemonSandboxModel;
@interface DoraemonSandBoxCell : UITableViewCell
- (void)renderUIWithData : (DoraemonSandboxModel *)model;
+ (CGFloat)cellHeight;
@end
//
// DoraemonSandboxModel.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, DoraemonSandboxFileType) {
DoraemonSandboxFileTypeDirectory = 0,//目录
DoraemonSandboxFileTypeFile,//文件
DoraemonSandboxFileTypeBack,//返回
DoraemonSandboxFileTypeRoot,//根目录
};
@interface DoraemonSandboxModel : NSObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *path;
@property (nonatomic, assign) DoraemonSandboxFileType type;
@end
//
// DoraemonSandboxPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonSandboxPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonSandboxViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonSandboxViewController : DoraemonBaseViewController
@end
//
// DoraemonStartPluginProtocol.h
// CocoaLumberjack
//
// Created by yixiang on 2017/12/17.
//
#import <Foundation/Foundation.h>
@protocol DoraemonStartPluginProtocol <NSObject>
@optional
- (void)startPluginDidLoad;
@end
//
// DoraemonStateBar.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/12/7.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, DoraemonStateBarFrom) {
DoraemonStateBarFromNSLog = 0,
DoraemonStateBarFromCocoaLumberjack
};
@interface DoraemonStateBar : UIWindow
+ (DoraemonStateBar *)shareInstance;
- (void)show;
- (void)renderUIWithContent:(NSString *)content from:(DoraemonStateBarFrom)from;
- (void)hide;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonStatisticsUtil.h
// AFNetworking
//
// Created by yixiang on 2018/12/10.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonStatisticsUtil : NSObject
+ (nonnull DoraemonStatisticsUtil *)shareInstance;
@property (nonatomic, assign) BOOL noUpLoad;
//统计用户信息,便于了解该开源产品的使用量 (请大家放心,我们不用于任何恶意行为)
- (void)upLoadUserInfo;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonStatusBarViewController.h
// AFNetworking
//
// Created by 张伟 on 2019/2/22.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonStatusBarViewController : UIViewController
@end
NS_ASSUME_NONNULL_END
//
// DoraemonSubThreadUICheckDetailViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/9/13.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonSubThreadUICheckDetailViewController : DoraemonBaseViewController
@property (nonatomic, strong) NSDictionary *checkInfo;
@end
//
// DoraemonSubThreadUICheckListCell.h
// AFNetworking
//
// Created by yixiang on 2018/9/13.
//
#import <UIKit/UIKit.h>
@interface DoraemonSubThreadUICheckListCell : UITableViewCell
- (void)renderCellWithData:(NSDictionary *)dic;
+ (CGFloat)cellHeight;
@end
//
// DoraemonSubThreadUICheckListViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/9/13.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonSubThreadUICheckListViewController : DoraemonBaseViewController
@end
//
// DoraemonSubThreadUICheckManager.h
// AFNetworking
//
// Created by yixiang on 2018/9/13.
//
#import <Foundation/Foundation.h>
@interface DoraemonSubThreadUICheckManager : NSObject
+ (instancetype)sharedInstance;
@property (nonatomic, strong) NSMutableArray *checkArray;
@end
//
// DoraemonSubThreadUICheckPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/9/12.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonSubThreadUICheckPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonSubThreadUICheckViewController.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/9/12.
//
#import "DoraemonBaseViewController.h"
@interface DoraemonSubThreadUICheckViewController : DoraemonBaseViewController
@end
//
// DoraemonToastUtil.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/5/4.
//
#import <Foundation/Foundation.h>
typedef void (^DoraemonHandleRestartActionBlock)(void);
typedef void (^DoraemonHandleRestartCancleActionBlock)(void);
@interface DoraemonToastUtil : NSObject
+ (void)showToast:(NSString *)text inView:(UIView *)superView;
+ (void)handleRestartActionWithVC:(UIViewController *)vc
restartBlock:(DoraemonHandleRestartActionBlock)restartBlock
cancleBlock:(DoraemonHandleRestartCancleActionBlock)cancleBlock;
@end
//
// DoraemonURLSessionDemux.h
// AFNetworking
//
// Created by yixiang on 2019/1/16.
//
#import <Foundation/Foundation.h>
@interface DoraemonURLSessionDemux : NSObject
- (instancetype)initWithConfiguration:(NSURLSessionConfiguration *)configuration;
@property (atomic, copy, readonly ) NSURLSessionConfiguration * configuration;
@property (atomic, strong, readonly ) NSURLSession * session;
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request delegate:(id<NSURLSessionDataDelegate>)delegate modes:(NSArray *)modes;
@end
//
// DoraemonUrlUtil.h
// Aspects
//
// Created by yixiang on 2018/4/23.
//
#import <Foundation/Foundation.h>
@interface DoraemonUrlUtil : NSObject
+ (NSString *)convertJsonFromData:(NSData *)data;
+ (NSUInteger)getRequestLength:(NSURLRequest *)request;
+ (NSUInteger)getHeadersLength:(NSDictionary *)headers ;
+ (NSDictionary<NSString *, NSString *> *)getCookies:(NSURLRequest *)request ;
+ (int64_t)getResponseLength:(NSHTTPURLResponse *)response data:(NSData *)responseData;
+ (NSString *)getHttpBodyFromRequest:(NSURLRequest *)request;
@end
//
// DoraemonUtil.h
// DoraemonKitDemo
//
// Created by yixiang on 2017/12/11.
// Copyright © 2017年 yixiang. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface DoraemonUtil : NSObject
@property (nonatomic, assign) NSInteger fileSize;
+ (void)openPlugin:(UIViewController *)vc;
+ (UIViewController *)topViewControllerForKeyWindow;
+ (NSString *)dateFormatTimeInterval:(NSTimeInterval)timeInterval;
+ (NSString *)dateFormatNSDate:(NSDate *)date;
+ (NSString *)dateFormatNow;
// byte格式化为 B KB MB 方便流量查看
+ (NSString *)formatByte:(CGFloat)byte;
+ (void)savePerformanceDataInFile:(NSString *)fileName data:(NSString *)data;
+ (NSString *)dictToJsonStr:(NSDictionary *)dict;
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
+ (NSString *)formatTimeIntervalToMS:(NSTimeInterval)timeInterval;
//获取某一条文件路径的文件大小
- (void)getFileSizeWithPath:(NSString *)path;
//删除某一路径下的所有文件
+ (void)clearFileWithPath:(NSString *)path;
+ (void)clearLocalDatas;
@end
//
// DoraemonViewAlignManager.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/16.
//
#import <Foundation/Foundation.h>
@interface DoraemonViewAlignManager : NSObject
+ (DoraemonViewAlignManager *)shareInstance;
- (void)show;
- (void)hidden;
@end
//
// DoraemonViewAlignPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/16.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonViewAlignPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonViewAlignView.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/6/16.
//
#import <UIKit/UIKit.h>
@interface DoraemonViewAlignView : UIView
- (void)show;
- (void)hide;
@end
//
// DoraemonViewCheckManager.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/3/28.
//
#import <Foundation/Foundation.h>
@interface DoraemonViewCheckManager : NSObject
+ (DoraemonViewCheckManager *)shareInstance;
- (void)show;
- (void)hidden;
@end
//
// DoraemonViewCheckPlugin.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/3/28.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonViewCheckPlugin : NSObject<DoraemonPluginProtocol>
@end
//
// DoraemonViewCheckView.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/3/28.
//
#import <UIKit/UIKit.h>
@interface DoraemonViewCheckView : UIView
- (void)hide;
- (void)show;
@end
//
// DoraemonViewMetricsManager.h
// DoraemonKit
//
// Created by xgb on 2018/12/11.
//
#import <Foundation/Foundation.h>
@interface DoraemonViewMetricsConfig : NSObject
@property (nonatomic, strong) UIColor *borderColor; //default red
@property (nonatomic, assign) CGFloat borderWidth; //default 1
@property (nonatomic, assign) BOOL enable; //default NO
@property (nonatomic, assign) BOOL ignoreSystemView; //default YES
@property (nonatomic, strong) NSArray <NSString *> *blackList;
+ (instancetype)defaultConfig;
@end
//
// DoraemonViewMetricsPlugin.h
// DoraemonKit
//
// Created by xgb on 2018/12/11.
//
#import <Foundation/Foundation.h>
#import "DoraemonPluginProtocol.h"
@interface DoraemonViewMetricsPlugin : NSObject <DoraemonPluginProtocol>
@end
//
// DoraemonVisualInfoWindow.h
// DoraemonKit
//
// Created by wenquan on 2018/12/5.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonVisualInfoWindow : UIWindow
/** 显示的文本 */
@property (nonatomic, copy) NSString *infoText;
/** 显示的属性文本 */
@property (nonatomic, copy) NSAttributedString *infoAttributedText;
@end
NS_ASSUME_NONNULL_END
//
// DoraemonVisualMagnifierWindow.h
// DoraemonKit
//
// Created by wenquan on 2018/12/6.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoraemonVisualMagnifierWindow : UIWindow
/**
放大镜的宽高(默认为90)
*/
@property (nonatomic, assign) CGFloat magnifierSize;
/**
放大倍数(默认2.0)
*/
@property (nonatomic, assign) CGFloat magnification;
/**
目标视图的Window
*/
@property (nonatomic, strong) UIView *targetWindow;
/**
目标视图展示位置
*/
@property (nonatomic, assign) CGPoint targetPoint;
@end
NS_ASSUME_NONNULL_END
//
// Doraemoni18NUtil.h
// DoraemonKit
//
// Created by xgb on 2018/11/14.
//
#import <Foundation/Foundation.h>
#define DoraemonLocalizedString(key) [Doraemoni18NUtil localizedString:key]
@interface Doraemoni18NUtil : NSObject
+ (NSString *)localizedString:(NSString *)key;
@end
//
// DoreamonCrashListCell.h
// DoraemonKit
//
// Created by wenquan on 2018/11/22.
//
#import <UIKit/UIKit.h>
@class DoraemonSandboxModel;
NS_ASSUME_NONNULL_BEGIN
@interface DoreamonCrashListCell : UITableViewCell
- (void)renderUIWithData:(DoraemonSandboxModel *)model;
+ (CGFloat)cellHeight;
@end
NS_ASSUME_NONNULL_END
//
// NSObject+Doraemon.h
// AFNetworking
//
// Created by yixiang on 2018/7/2.
//
#import <Foundation/Foundation.h>
@interface NSObject (Doraemon)
/**
swizzle 类方法
@param oriSel 原有的方法
@param swiSel swizzle的方法
*/
+ (void)doraemon_swizzleClassMethodWithOriginSel:(SEL)oriSel swizzledSel:(SEL)swiSel;
/**
swizzle 实例方法
@param oriSel 原有的方法
@param swiSel swizzle的方法
*/
+ (void)doraemon_swizzleInstanceMethodWithOriginSel:(SEL)oriSel swizzledSel:(SEL)swiSel;
@end
//
// NSURLRequest+Doraemon.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/4/11.
//
#import <Foundation/Foundation.h>
@interface NSURLRequest (Doraemon)
- (NSString *)requestId;
- (void)setRequestId:(NSString *)requestId;
- (NSNumber*)startTime;
- (void)setStartTime:(NSNumber*)startTime;
@end
//
// NSURLSessionConfiguration+Doraemon.h
// AFNetworking
//
// Created by yixiang on 2018/7/2.
//
#import <Foundation/Foundation.h>
@interface NSURLSessionConfiguration (Doraemon)
@end
//
// UIColor+Doraemon.h
// DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import <UIKit/UIKit.h>
@interface UIColor (Doraemon)
@property (nonatomic, readonly) CGFloat red; // Only valid if canProvideRGBComponents is YES
@property (nonatomic, readonly) CGFloat green; // Only valid if canProvideRGBComponents is YES
@property (nonatomic, readonly) CGFloat blue; // Only valid if canProvideRGBComponents is YES
@property (nonatomic, readonly) CGFloat white; // Only valid if colorSpaceModel == kCGColorSpaceModelMonochrome
@property (nonatomic, readonly) CGFloat alpha;
+ (UIColor *)doraemon_colorWithHex:(UInt32)hex;
+ (UIColor *)doraemon_colorWithHex:(UInt32)hex andAlpha:(CGFloat)alpha;
+ (UIColor *)doraemon_colorWithHexString:(NSString *)hexString;
+ (UIColor *)doraemon_colorWithString:(NSString *)hexString;
+ (UIColor *)doraemon_black_1;//#333333
+ (UIColor *)doraemon_black_2;//#666666
+ (UIColor *)doraemon_black_3;//#999999
+ (UIColor *)doraemon_blue;//#337CC4
+ (UIColor *)doraemon_line;//[UIColor doraemon_colorWithHex:0x000000 andAlpha:0.1];
@end
//
// UIImage+Doraemon.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2017/12/11.
//
#import <UIKit/UIKit.h>
@interface UIImage (Doraemon)
+ (UIImage *)doraemon_imageNamed:(NSString *)name;
//压缩图片尺寸 等比缩放 通过计算得到缩放系数
- (UIImage*)doraemon_scaledToSize:(CGSize)newSize;
@end
//
// UIView+Doraemon.h
// DoraemonKit
//
// Created by xgb on 2018/11/15.
//
#import <UIKit/UIKit.h>
@interface UIView (Doraemon)
/** View's X Position */
@property (nonatomic, assign) CGFloat doraemon_x;
/** View's Y Position */
@property (nonatomic, assign) CGFloat doraemon_y;
/** View's width */
@property (nonatomic, assign) CGFloat doraemon_width;
/** View's height */
@property (nonatomic, assign) CGFloat doraemon_height;
/** View's origin - Sets X and Y Positions */
@property (nonatomic, assign) CGPoint doraemon_origin;
/** View's size - Sets Width and Height */
@property (nonatomic, assign) CGSize doraemon_size;
/** Y value representing the bottom of the view **/
@property (nonatomic, assign) CGFloat doraemon_bottom;
/** X Value representing the right side of the view **/
@property (nonatomic, assign) CGFloat doraemon_right;
/** X Value representing the top of the view (alias of x) **/
@property (nonatomic, assign) CGFloat doraemon_left;
/** Y Value representing the top of the view (alias of y) **/
@property (nonatomic, assign) CGFloat doraemon_top;
/** X value of the object's center **/
@property (nonatomic, assign) CGFloat doraemon_centerX;
/** Y value of the object's center **/
@property (nonatomic, assign) CGFloat doraemon_centerY;
@end
//
// UIView+DoraemonSubThreadUICheck.h
// DoraemonKit-DoraemonKit
//
// Created by yixiang on 2018/9/13.
//
#import <UIKit/UIKit.h>
@interface UIView (DoraemonSubThreadUICheck)
@end
//
// UIView+DoraemonViewMetrics.h
// DoraemonKit
//
// Created by xgb on 2018/12/11.
//
#import <UIKit/UIKit.h>
@interface UIView (DoraemonViewMetrics)
- (void)showDoraemonMetricsRecursive;
- (void)hideDoraemonMetricsRecursive;
@end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册