Created
July 18, 2019 09:39
-
-
Save ptisserand/29dd8d4643c67fad47599d77a1198b25 to your computer and use it in GitHub Desktop.
Q&D workaround patch for cordova-plugin-background-geolocation ITMS-90338
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ios/CDVBackgroundGeolocation/CocoaLumberjack.h b/ios/CDVBackgroundGeolocation/CocoaLumberjack.h | |
index 32a4deb..c384e25 100644 | |
--- a/ios/CDVBackgroundGeolocation/CocoaLumberjack.h | |
+++ b/ios/CDVBackgroundGeolocation/CocoaLumberjack.h | |
@@ -739,7 +739,6 @@ NSString * DDExtractFileNameWithoutExtension(const char *filePath, BOOL copy); | |
* This protocol describes a dynamic logging component | |
*/ | |
@protocol DDRegisteredDynamicLogging | |
- | |
/** | |
* Implement these methods to allow a file's log level to be managed from a central location. | |
* | |
@@ -752,23 +751,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 | |
diff --git a/ios/CDVBackgroundGeolocation/CocoaLumberjack.m b/ios/CDVBackgroundGeolocation/CocoaLumberjack.m | |
index e1cec7b..05f0d4d 100644 | |
--- a/ios/CDVBackgroundGeolocation/CocoaLumberjack.m | |
+++ b/ios/CDVBackgroundGeolocation/CocoaLumberjack.m | |
@@ -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 | |
@@ -3122,7 +3122,7 @@ + (NSArray *)registeredClassNames { | |
+ (DDLogLevel)levelForClass:(Class)aClass { | |
if ([self isRegisteredClass:aClass]) { | |
- return [aClass ddLogLevel]; | |
+ return [aClass myDdLogLevel]; | |
} | |
return (DDLogLevel)-1; | |
} | |
@@ -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]; | |
} | |
} | |
diff --git a/ios/CDVBackgroundGeolocation/FMDB.h b/ios/CDVBackgroundGeolocation/FMDB.h | |
index 176be61..b568b91 100644 | |
--- a/ios/CDVBackgroundGeolocation/FMDB.h | |
+++ b/ios/CDVBackgroundGeolocation/FMDB.h | |
@@ -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 | |
@@ -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. | |
@@ -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. | |
@@ -2351,7 +2351,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary | |
*/ | |
-- (void)databasePool:(FMDatabasePool*)pool didAddDatabase:(FMDatabase*)database; | |
+- (void)myDatabasePool:(FMDatabasePool*)pool didAddDatabase:(FMDatabase*)database; | |
@end | |
diff --git a/ios/CDVBackgroundGeolocation/FMDB.m b/ios/CDVBackgroundGeolocation/FMDB.m | |
index 552f22a..9c23e7a 100644 | |
--- a/ios/CDVBackgroundGeolocation/FMDB.m | |
+++ b/ios/CDVBackgroundGeolocation/FMDB.m | |
@@ -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]); | |
} | |
@@ -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; | |
} | |
@@ -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]; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment