提交 c1a89334 编写于 作者: yd_龘's avatar yd_龘

add carthage for DoraemonKit , only supports Core

上级 ad4528cb
...@@ -41,6 +41,9 @@ xcuserdata/ ...@@ -41,6 +41,9 @@ xcuserdata/
# CocoaPods # CocoaPods
Pods/ Pods/
# Carthage
Carthage/
### Objective-C Patch ### ### Objective-C Patch ###
*.xcscmblueprint *.xcscmblueprint
*.xcworkspacedata *.xcworkspacedata
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, DoraemonNavBarItemType) { typedef NS_ENUM(NSUInteger, DoraemonNavBarItemType) {
DoraemonNavBarItemTypeText = 0, DoraemonNavBarItemTypeText = 0,
DoraemonNavBarItemTypeImage, DoraemonNavBarItemTypeImage,
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
if(name){ if(name){
NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"DoraemonManager")]; NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"DoraemonManager")];
NSURL *url = [bundle URLForResource:@"DoraemonKit" withExtension:@"bundle"]; NSURL *url = [bundle URLForResource:@"DoraemonKit" withExtension:@"bundle"];
if(!url) return nil;
NSBundle *imageBundle = [NSBundle bundleWithURL:url]; NSBundle *imageBundle = [NSBundle bundleWithURL:url];
NSString *imageName = nil; NSString *imageName = nil;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Created by dengyouhua on 2019/9/5. // Created by dengyouhua on 2019/9/5.
// //
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface UIViewController (Doraemon) @interface UIViewController (Doraemon)
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface DoraemonToastUtil : NSObject @interface DoraemonToastUtil : NSObject
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Created by yixiang on 2017/12/11. // Created by yixiang on 2017/12/11.
// //
#import <UIKit/UIKit.h>
#import "DoraemonManager.h" #import "DoraemonManager.h"
#import "DoraemonEntryView.h" #import "DoraemonEntryView.h"
#import "DoraemonCacheManager.h" #import "DoraemonCacheManager.h"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#import "DoraemonPingThread.h" #import "DoraemonPingThread.h"
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <BSBacktraceLogger/BSBacktraceLogger.h> #import "BSBacktraceLogger.h"
#import "DoraemonUtil.h" #import "DoraemonUtil.h"
@interface DoraemonPingThread() @interface DoraemonPingThread()
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#import <AddressBook/AddressBook.h> #import <AddressBook/AddressBook.h>
#import <Contacts/Contacts.h> #import <Contacts/Contacts.h>
#import <EventKit/EventKit.h> #import <EventKit/EventKit.h>
#import <UIKit/UIKit.h>
#define IOS8 ([[[UIDevice currentDevice] systemVersion] doubleValue] >=8.0 ? YES : NO) #define IOS8 ([[[UIDevice currentDevice] systemVersion] doubleValue] >=8.0 ? YES : NO)
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface DoraemonCPUUtil : NSObject @interface DoraemonCPUUtil : NSObject
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#import "DoraemonCPUUtil.h" #import "DoraemonCPUUtil.h"
#import <mach/mach.h> #import <mach/mach.h>
#import <UIKit/UIKit.h>
//#import <sys/sysctl.h> //#import <sys/sysctl.h>
@implementation DoraemonCPUUtil @implementation DoraemonCPUUtil
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// //
#import "DoraemonFPSUtil.h" #import "DoraemonFPSUtil.h"
#import <UIKit/UIKit.h>
@interface DoraemonFPSUtil() @interface DoraemonFPSUtil()
......
...@@ -6,7 +6,11 @@ ...@@ -6,7 +6,11 @@
// //
#import "DoraemonNSLogManager.h" #import "DoraemonNSLogManager.h"
#import <fishhook/fishhook.h> #if __has_include(<fishhook/fishhook.h>)
#include <fishhook/fishhook.h>
#else
#include "fishhook.h"
#endif
#import "DoraemonStateBar.h" #import "DoraemonStateBar.h"
//函数指针,用来保存原始的函数的地址 //函数指针,用来保存原始的函数的地址
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "UIView+Doraemon.h" #import "UIView+Doraemon.h"
#import "NSObject+Doraemon.h" #import "NSObject+Doraemon.h"
#import "DoraemonCacheManager.h" #import "DoraemonCacheManager.h"
#import <BSBacktraceLogger/BSBacktraceLogger.h> #import "BSBacktraceLogger.h"
#import "DoraemonSubThreadUICheckManager.h" #import "DoraemonSubThreadUICheckManager.h"
#import "DoraemonUtil.h" #import "DoraemonUtil.h"
......
...@@ -13,7 +13,12 @@ ...@@ -13,7 +13,12 @@
#include <sys/time.h> #include <sys/time.h>
#include <objc/runtime.h> #include <objc/runtime.h>
#include <dispatch/dispatch.h> #include <dispatch/dispatch.h>
#if __has_include(<fishhook/fishhook.h>)
#include <fishhook/fishhook.h> #include <fishhook/fishhook.h>
#else
#include "fishhook.h"
#endif
static bool _call_record_enabled = true; static bool _call_record_enabled = true;
static uint64_t _min_time_cost = 1000; //us static uint64_t _min_time_cost = 1000; //us
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// //
#import <DoraemonKit/DoraemonKit.h> #import <DoraemonKit/DoraemonKit.h>
#import "DoraemonBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// //
#import <DoraemonKit/DoraemonKit.h> #import <DoraemonKit/DoraemonKit.h>
#import "DoraemonBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface DoraemonViewMetricsConfig : NSObject @interface DoraemonViewMetricsConfig : NSObject
......
...@@ -19,7 +19,12 @@ ...@@ -19,7 +19,12 @@
if([language hasPrefix:@"en"]) { if([language hasPrefix:@"en"]) {
fileNamePrefix = @"en"; fileNamePrefix = @"en";
} }
NSBundle *tmp = [NSBundle bundleWithPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.bundle/", @"DoraemonKit"]]]; // NSBundle *tmp = [NSBundle bundleWithPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.bundle/", @"DoraemonKit"]]];
NSBundle *tmpBundle = [NSBundle bundleForClass:NSClassFromString(@"DoraemonManager")];
NSURL *url = [tmpBundle URLForResource:@"DoraemonKit" withExtension:@"bundle"];
if(!url) return key;
NSBundle *tmp = [NSBundle bundleWithURL:url];
NSString *path = [tmp pathForResource:fileNamePrefix ofType:@"lproj"]; NSString *path = [tmp pathForResource:fileNamePrefix ofType:@"lproj"];
NSBundle *bundle = [NSBundle bundleWithPath:path]; NSBundle *bundle = [NSBundle bundleWithPath:path];
NSString *localizedString = [bundle localizedStringForKey:key value:nil table:@"Doraemon"]; NSString *localizedString = [bundle localizedStringForKey:key value:nil table:@"Doraemon"];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册