Skip to content

Commit 586c27f

Browse files
committed
refactor: public utils
1 parent de36e21 commit 586c27f

File tree

15 files changed

+58
-137
lines changed

15 files changed

+58
-137
lines changed

AVOS/AVOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@
304304
D33127D326CBAD6D00BBDE09 /* LCFileTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D33127D226CBAD6D00BBDE09 /* LCFileTestCase.swift */; };
305305
D33127D526CE391500BBDE09 /* LCLeaderboardTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D33127D426CE391500BBDE09 /* LCLeaderboardTestCase.swift */; };
306306
D33127D726CFAC5100BBDE09 /* LCLeaderboard_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = D33127D626CFAC5100BBDE09 /* LCLeaderboard_Internal.h */; };
307+
D357146E26D50405009E611C /* LCUtils_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = D357146D26D50405009E611C /* LCUtils_Internal.h */; };
307308
D365E42426C3D29F00148DE8 /* LCLeaderboard.h in Headers */ = {isa = PBXBuildFile; fileRef = D365E42226C3D29F00148DE8 /* LCLeaderboard.h */; settings = {ATTRIBUTES = (Public, ); }; };
308309
D365E42526C3D29F00148DE8 /* LCLeaderboard.m in Sources */ = {isa = PBXBuildFile; fileRef = D365E42326C3D29F00148DE8 /* LCLeaderboard.m */; };
309310
D36A095A25BEA75000A4F312 /* IMMessageTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D36A095925BEA75000A4F312 /* IMMessageTestCase.swift */; };
@@ -557,6 +558,7 @@
557558
D34C417D2483C3FD00CD2459 /* LCRTMConnection_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LCRTMConnection_Internal.h; sourceTree = "<group>"; };
558559
D34EBDCC211C20FF0092A538 /* LCRouter_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LCRouter_Internal.h; sourceTree = "<group>"; };
559560
D34FD72B2068CFE900B7C11B /* LCLiveQuery_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LCLiveQuery_Internal.h; sourceTree = "<group>"; };
561+
D357146D26D50405009E611C /* LCUtils_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LCUtils_Internal.h; sourceTree = "<group>"; };
560562
D3596DAC2480EEED002D2D22 /* LCApplication_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LCApplication_Internal.h; sourceTree = "<group>"; };
561563
D365E42226C3D29F00148DE8 /* LCLeaderboard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LCLeaderboard.h; sourceTree = "<group>"; };
562564
D365E42326C3D29F00148DE8 /* LCLeaderboard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LCLeaderboard.m; sourceTree = "<group>"; };
@@ -1045,6 +1047,7 @@
10451047
8C841AA61A5A7A0000C5C6C4 /* LCLogger.h */,
10461048
8C841AA71A5A7A0000C5C6C4 /* LCLogger.m */,
10471049
8C841AAA1A5A7A0000C5C6C4 /* LCUtils.h */,
1050+
D357146D26D50405009E611C /* LCUtils_Internal.h */,
10481051
8C841AAB1A5A7A0000C5C6C4 /* LCUtils.m */,
10491052
830E7CFE1B1CB07B005F4B22 /* LCDatabaseCommon.h */,
10501053
830E7CF61B1CA2A2005F4B22 /* LCDatabaseCoordinator.h */,
@@ -1461,6 +1464,7 @@
14611464
D30B6B0224A09F1F006ABE09 /* LCGPBStruct.pbobjc.h in Headers */,
14621465
D30B6A4824A09CFE006ABE09 /* LCFile_Internal.h in Headers */,
14631466
D30B6ACC24A09ED2006ABE09 /* LCIMConversationQuery.h in Headers */,
1467+
D357146E26D50405009E611C /* LCUtils_Internal.h in Headers */,
14641468
D32AA480263BF2F30044E74E /* Foundation.h in Headers */,
14651469
D30B6B5C24A0A03D006ABE09 /* LCLiveQuery_Internal.h in Headers */,
14661470
D30B6AA124A09E35006ABE09 /* LCLogger.h in Headers */,

AVOS/Sources/Foundation/Cache/LCCacheManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#import "LCErrorUtils.h"
1111
#import "LCUtils.h"
1212
#import "LCPersistenceUtils.h"
13-
13+
#import "LCHelpers.h"
1414

1515
@interface LCCacheManager ()
1616
@property (nonatomic, copy) NSString *diskCachePath;

AVOS/Sources/Foundation/Cache/LCPersistenceUtils.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#import "LCPersistenceUtils.h"
1010
#import <TargetConditionals.h>
1111
#import "LCUtils.h"
12+
#import "LCLogger.h"
13+
#import "LCApplication_Internal.h"
1214

1315
#define LCRootDirName @"LeanCloud"
1416
#define LCMessageCacheDirName @"MessageCache"

AVOS/Sources/Foundation/File/LCFile.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
#import <Foundation/Foundation.h>
3+
#import <CommonCrypto/CommonCrypto.h>
4+
35
#import "LCConstants.h"
4-
#import "LCFile.h"
56
#import "LCFile_Internal.h"
67
#import "LCFileTaskManager.h"
78
#import "LCPaasClient.h"
@@ -11,7 +12,9 @@
1112
#import "LCPersistenceUtils.h"
1213
#import "LCObjectUtils.h"
1314
#import "LCACL_Internal.h"
14-
#import <CommonCrypto/CommonCrypto.h>
15+
#import "LCUser_Internal.h"
16+
#import "LCFileQuery.h"
17+
#import "LCLogger.h"
1518

1619
static NSString * LCFile_CustomPersistentCacheDirectory = nil;
1720

AVOS/Sources/Foundation/LCApplication.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#import "LCScheduler.h"
1313
#import "LCUtils.h"
1414
#import "LCObjectUtils.h"
15+
#import "LCLogger.h"
1516

1617
@implementation LCApplication
1718

AVOS/Sources/Foundation/Object/LCObject.m

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
// LCObject.h
22
// Copyright 2011 LeanCloud Inc. All rights reserved.
33

4+
#import <objc/runtime.h>
5+
#import <objc/message.h>
6+
#import <libkern/OSAtomic.h>
7+
48
#import "LCObject_Internal.h"
59
#import "LCPaasClient.h"
6-
#import "LCUtils.h"
7-
#import "LCRelation.h"
8-
#import "LCObject_Internal.h"
10+
#import "LCUtils_Internal.h"
911
#import "LCRelation_Internal.h"
10-
#import "LCACL.h"
1112
#import "LCACL_Internal.h"
1213
#import "LCGeoPoint_Internal.h"
1314
#import "LCObjectUtils.h"
1415
#import "LCErrorUtils.h"
1516
#import "LCQuery_Internal.h"
16-
17+
#import "LCLogger.h"
1718
#import "LCObject+Subclass.h"
1819
#import "LCSubclassing.h"
1920
#import "LCSaveOption.h"
2021
#import "LCSaveOption_internal.h"
21-
22-
#import <objc/runtime.h>
23-
#import <objc/message.h>
24-
#import <libkern/OSAtomic.h>
25-
2622
#import "LCUser_Internal.h"
2723
#import "LCInstallation_Internal.h"
24+
#import "LCFile_Internal.h"
2825

2926
#define LC_BATCH_SAVE_SIZE 100
3027
#define LC_BATCH_CONCURRENT_SIZE 20

AVOS/Sources/Foundation/Object/LCObjectUtils.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#import "LCRelation_Internal.h"
2323
#import "LCUtils.h"
2424
#import "LCFriendship.h"
25+
#import "LCHelpers.h"
2526

2627
@implementation LCDate
2728

AVOS/Sources/Foundation/Push/LCPush.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
//
55

66
#import <Foundation/Foundation.h>
7-
#import "LCPush.h"
87
#import "LCPush_Internal.h"
98
#import "LCPaasClient.h"
109
#import "LCUtils.h"
1110
#import "LCQuery_Internal.h"
1211
#import "LCInstallation_Internal.h"
1312
#import "LCObjectUtils.h"
1413
#import "LCRouter_Internal.h"
14+
#import "LCApplication_Internal.h"
1515

1616
/*!
1717
A class which defines a push notification that can be sent from

AVOS/Sources/Foundation/Request/LCPaasClient.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#import "LCRouter_Internal.h"
2222
#import "LCConstants.h"
2323
#import "LCApplication_Internal.h"
24+
#import "LCLogger.h"
25+
#import "LCHelpers.h"
2426

2527
NSString * const LCHeaderFieldNameId = @"X-LC-Id";
2628
NSString * const LCHeaderFieldNameKey = @"X-LC-Key";

AVOS/Sources/Foundation/Router/LCRouter.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#import "LCErrorUtils.h"
1313
#import "LCPaasClient.h"
1414
#import "LCPersistenceUtils.h"
15+
#import "LCLogger.h"
1516

1617
RouterCacheKey const RouterCacheKeyApp = @"RouterCacheDataApp";
1718
RouterCacheKey const RouterCacheKeyRTM = @"RouterCacheDataRTM";

0 commit comments

Comments
 (0)