Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix from @ptisserand for ITMS-90338: Non-public API usage #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions BackgroundGeolocation/CocoaLumberjack.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Disable legacy macros by importing CocoaLumberjack.h or DDLogMacros.h instead of DDLog.h or add `#define DD_LEGACY_MACROS 0` before importing DDLog.h.

#ifndef LOG_LEVEL_DEF
#define LOG_LEVEL_DEF ddLogLevel
#define LOG_LEVEL_DEF myDdLogLevel
#endif

#define LOG_FLAG_ERROR DDLogFlagError
Expand Down Expand Up @@ -752,23 +752,23 @@ NSString * DDExtractFileNameWithoutExtension(const char *filePath, BOOL copy);
* The implementation can be very straight-forward:
*
* ```
* + (int)ddLogLevel
* + (int)myDdLogLevel
* {
* return ddLogLevel;
* }
*
* + (void)ddSetLogLevel:(DDLogLevel)level
* + (void)myDdSetLogLevel:(DDLogLevel)level
* {
* ddLogLevel = level;
* }
* ```
**/
+ (DDLogLevel)ddLogLevel;
+ (DDLogLevel)myDdLogLevel;

/**
* See the above description for `ddLogLevel`
*/
+ (void)ddSetLogLevel:(DDLogLevel)level;
+ (void)myDdSetLogLevel:(DDLogLevel)level;

@end

Expand Down
8 changes: 4 additions & 4 deletions BackgroundGeolocation/CocoaLumberjack.m
Original file line number Diff line number Diff line change
Expand Up @@ -2993,8 +2993,8 @@ - (void)flushLog {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

+ (BOOL)isRegisteredClass:(Class)class {
SEL getterSel = @selector(ddLogLevel);
SEL setterSel = @selector(ddSetLogLevel:);
SEL getterSel = @selector(myDdLogLevel);
SEL setterSel = @selector(myDdSetLogLevel:);

#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR

Expand Down Expand Up @@ -3122,7 +3122,7 @@ + (NSArray *)registeredClassNames {

+ (DDLogLevel)levelForClass:(Class)aClass {
if ([self isRegisteredClass:aClass]) {
return [aClass ddLogLevel];
return [aClass myDdLogLevel];
}
return (DDLogLevel)-1;
}
Expand All @@ -3135,7 +3135,7 @@ + (DDLogLevel)levelForClassWithName:(NSString *)aClassName {

+ (void)setLevel:(DDLogLevel)level forClass:(Class)aClass {
if ([self isRegisteredClass:aClass]) {
[aClass ddSetLogLevel:level];
[aClass myDdSetLogLevel:level];
}
}

Expand Down
8 changes: 4 additions & 4 deletions BackgroundGeolocation/FMDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -2207,7 +2207,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@return The `FMDatabasePool` object. `nil` on error.
*/

+ (instancetype)databasePoolWithPath:(NSString*)aPath;
+ (instancetype)myDatabasePoolWithPath:(NSString*)aPath;

/** Create pool using path and specified flags

Expand All @@ -2217,7 +2217,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@return The `FMDatabasePool` object. `nil` on error.
*/

+ (instancetype)databasePoolWithPath:(NSString*)aPath flags:(int)openFlags;
+ (instancetype)myDatabasePoolWithPath:(NSString*)aPath flags:(int)openFlags;

/** Create pool using path.

Expand Down Expand Up @@ -2342,7 +2342,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary

*/

- (BOOL)databasePool:(FMDatabasePool*)pool shouldAddDatabaseToPool:(FMDatabase*)database;
- (BOOL)myDatabasePool:(FMDatabasePool*)pool shouldAddDatabaseToPool:(FMDatabase*)database;

/** Tells the delegate that database was added to the pool.

Expand All @@ -2351,7 +2351,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary

*/

- (void)databasePool:(FMDatabasePool*)pool didAddDatabase:(FMDatabase*)database;
- (void)myDatabasePool:(FMDatabasePool*)pool didAddDatabase:(FMDatabase*)database;

@end

10 changes: 5 additions & 5 deletions BackgroundGeolocation/FMDB.m
Original file line number Diff line number Diff line change
Expand Up @@ -1755,11 +1755,11 @@ @implementation FMDatabasePool
@synthesize openFlags=_openFlags;


+ (instancetype)databasePoolWithPath:(NSString*)aPath {
+ (instancetype)myDatabasePoolWithPath:(NSString*)aPath {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]);
}

+ (instancetype)databasePoolWithPath:(NSString*)aPath flags:(int)openFlags {
+ (instancetype)myDatabasePoolWithPath:(NSString*)aPath flags:(int)openFlags {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath flags:openFlags]);
}

Expand Down Expand Up @@ -1872,7 +1872,7 @@ - (FMDatabase*)db {
BOOL success = [db open];
#endif
if (success) {
if ([self->_delegate respondsToSelector:@selector(databasePool:shouldAddDatabaseToPool:)] && ![self->_delegate databasePool:self shouldAddDatabaseToPool:db]) {
if ([self->_delegate respondsToSelector:@selector(myDatabasePool:shouldAddDatabaseToPool:)] && ![self->_delegate myDatabasePool:self shouldAddDatabaseToPool:db]) {
[db close];
db = 0x00;
}
Expand All @@ -1881,8 +1881,8 @@ - (FMDatabase*)db {
if (![self->_databaseOutPool containsObject:db]) {
[self->_databaseOutPool addObject:db];

if (shouldNotifyDelegate && [self->_delegate respondsToSelector:@selector(databasePool:didAddDatabase:)]) {
[self->_delegate databasePool:self didAddDatabase:db];
if (shouldNotifyDelegate && [self->_delegate respondsToSelector:@selector(myDatabasePool:didAddDatabase:)]) {
[self->_delegate myDatabasePool:self didAddDatabase:db];
}
}
}
Expand Down