Archived
Configured colours and added additional images to ready app for iOS 13 dark mode
This commit is contained in:
+6
-1
@@ -161,7 +161,12 @@ void GULLogBasic(GULLoggerLevel level,
|
||||
range:messageCodeRange];
|
||||
NSCAssert(numberOfMatches == 1, @"Incorrect message code format.");
|
||||
#endif
|
||||
NSString *logMsg = [[NSString alloc] initWithFormat:message arguments:args_ptr];
|
||||
NSString *logMsg;
|
||||
if (args_ptr == NULL) {
|
||||
logMsg = message;
|
||||
} else {
|
||||
logMsg = [[NSString alloc] initWithFormat:message arguments:args_ptr];
|
||||
}
|
||||
logMsg = [NSString stringWithFormat:@"%s - %@[%@] %@", sVersion, service, messageCode, logMsg];
|
||||
dispatch_async(sGULClientQueue, ^{
|
||||
asl_log(sGULLoggerClient, NULL, (int)level, "%s", logMsg.UTF8String);
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
- (id)objectForKey:(id)key {
|
||||
__block id object;
|
||||
dispatch_sync(_queue, ^{
|
||||
object = self->_objects[key];
|
||||
object = [self->_objects objectForKey:key];
|
||||
});
|
||||
return object;
|
||||
}
|
||||
|
||||
- (void)setObject:(id)object forKey:(id<NSCopying>)key {
|
||||
dispatch_async(_queue, ^{
|
||||
self->_objects[key] = object;
|
||||
[self->_objects setObject:object forKey:key];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,13 +77,17 @@
|
||||
}
|
||||
|
||||
- (id)objectForKeyedSubscript:(id<NSCopying>)key {
|
||||
// The method this calls is already synchronized.
|
||||
return [self objectForKey:key];
|
||||
__block id object;
|
||||
dispatch_sync(_queue, ^{
|
||||
object = self->_objects[key];
|
||||
});
|
||||
return object;
|
||||
}
|
||||
|
||||
- (void)setObject:(id)obj forKeyedSubscript:(id<NSCopying>)key {
|
||||
// The method this calls is already synchronized.
|
||||
[self setObject:obj forKey:key];
|
||||
dispatch_async(_queue, ^{
|
||||
self->_objects[key] = obj;
|
||||
});
|
||||
}
|
||||
|
||||
- (NSDictionary *)dictionary {
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
#import "Private/GULNetworkMessageCode.h"
|
||||
|
||||
@interface GULNetworkURLSession () <NSURLSessionDelegate,
|
||||
NSURLSessionTaskDelegate,
|
||||
NSURLSessionDownloadDelegate>
|
||||
NSURLSessionDataDelegate,
|
||||
NSURLSessionDownloadDelegate,
|
||||
NSURLSessionTaskDelegate>
|
||||
@end
|
||||
|
||||
@implementation GULNetworkURLSession {
|
||||
@@ -221,6 +222,24 @@
|
||||
return _sessionID;
|
||||
}
|
||||
|
||||
#pragma mark - NSURLSessionDataDelegate
|
||||
|
||||
/// Called by the NSURLSession when the data task has received some of the expected data.
|
||||
/// Once the session is completed, URLSession:task:didCompleteWithError will be called and the
|
||||
/// completion handler will be called with the downloaded data.
|
||||
- (void)URLSession:(NSURLSession *)session
|
||||
dataTask:(NSURLSessionDataTask *)dataTask
|
||||
didReceiveData:(NSData *)data {
|
||||
@synchronized(self) {
|
||||
NSMutableData *mutableData = [[NSMutableData alloc] init];
|
||||
if (_downloadedData) {
|
||||
mutableData = _downloadedData.mutableCopy;
|
||||
}
|
||||
[mutableData appendData:data];
|
||||
_downloadedData = mutableData;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - NSURLSessionTaskDelegate
|
||||
|
||||
/// Called by the NSURLSession once the download task is completed. The file is saved in the
|
||||
|
||||
@@ -195,28 +195,6 @@ typedef NS_ENUM(NSInteger, GULUDMessageCode) {
|
||||
|
||||
#pragma mark - Private methods
|
||||
|
||||
/// Removes all values from the search list entry specified by 'domainName', the current user, and
|
||||
/// any host. The change is persistent. Equivalent to -removePersistentDomainForName: of
|
||||
/// NSUserDefaults.
|
||||
- (void)clearAllData {
|
||||
// On macOS, using `kCFPreferencesCurrentHost` will not set all the keys necessary to match
|
||||
// `NSUserDefaults`.
|
||||
#if TARGET_OS_OSX
|
||||
CFStringRef host = kCFPreferencesAnyHost;
|
||||
#else
|
||||
CFStringRef host = kCFPreferencesCurrentHost;
|
||||
#endif // TARGET_OS_OSX
|
||||
|
||||
CFArrayRef keyList = CFPreferencesCopyKeyList(_appNameRef, kCFPreferencesCurrentUser, host);
|
||||
if (!keyList) {
|
||||
return;
|
||||
}
|
||||
|
||||
CFPreferencesSetMultiple(NULL, keyList, _appNameRef, kCFPreferencesCurrentUser, host);
|
||||
CFRelease(keyList);
|
||||
[self scheduleSynchronize];
|
||||
}
|
||||
|
||||
- (void)scheduleSynchronize {
|
||||
// Synchronize data using a timer so that multiple set... calls can be coalesced under one
|
||||
// synchronize.
|
||||
|
||||
Generated
+17
-10
@@ -1,9 +1,10 @@
|
||||
# Firebase iOS Open Source Development [](https://travis-ci.org/firebase/firebase-ios-sdk)
|
||||
|
||||
This repository contains a subset of the Firebase iOS SDK source. It currently
|
||||
includes FirebaseCore, FirebaseAuth, FirebaseDatabase, FirebaseFirestore,
|
||||
FirebaseFunctions, FirebaseInstanceID, FirebaseInAppMessaging,
|
||||
FirebaseInAppMessagingDisplay, FirebaseMessaging and FirebaseStorage.
|
||||
includes FirebaseCore, FirebaseABTesting, FirebaseAuth, FirebaseDatabase,
|
||||
FirebaseFirestore, FirebaseFunctions, FirebaseInstanceID, FirebaseInAppMessaging,
|
||||
FirebaseInAppMessagingDisplay, FirebaseMessaging, FirebaseRemoteConfig, and
|
||||
FirebaseStorage.
|
||||
|
||||
The repository also includes GoogleUtilities source. The
|
||||
[GoogleUtilities](GoogleUtilities/README.md) pod is
|
||||
@@ -80,9 +81,8 @@ For the pod that you want to develop:
|
||||
|
||||
`pod gen Firebase{name here}.podspec --local-sources=./ --auto-open`
|
||||
|
||||
Firestore and Functions have self contained Xcode projects. See
|
||||
[Firestore/README.md](Firestore/README.md) and
|
||||
[Functions/README.md](Functions/README.md).
|
||||
Firestore has a self contained Xcode project. See
|
||||
[Firestore/README.md](Firestore/README.md).
|
||||
|
||||
### Adding a New Firebase Pod
|
||||
|
||||
@@ -99,13 +99,17 @@ Travis will verify that any code changes are done in a style compliant way. Inst
|
||||
These commands will get the right versions:
|
||||
|
||||
```
|
||||
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/773cb75d360b58f32048f5964038d09825a507c8/Formula/clang-format.rb
|
||||
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/3dfea1004e0736754bbf49673cca8aaed8a94089/Formula/swiftformat.rb
|
||||
brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e3496d9/Formula/clang-format.rb
|
||||
brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/7963c3d/Formula/swiftformat.rb
|
||||
```
|
||||
|
||||
Note: if you already have a newer version of these installed you may need to
|
||||
`brew switch` to this version.
|
||||
|
||||
To update this section, find the versions of clang-format and swiftformat.rb to
|
||||
match the versions in the CI failure logs
|
||||
[here](https://github.com/Homebrew/homebrew-core/tree/master/Formula).
|
||||
|
||||
### Running Unit Tests
|
||||
|
||||
Select a scheme and press Command-u to build a component and run its unit tests.
|
||||
@@ -179,8 +183,9 @@ very grateful! We'd like to empower as many developers as we can to be able to
|
||||
participate in the Firebase community.
|
||||
|
||||
### macOS and tvOS
|
||||
Thanks to contributions from the community, FirebaseAuth, FirebaseCore, FirebaseDatabase, FirebaseMessaging,
|
||||
FirebaseFirestore, FirebaseFunctions and FirebaseStorage now compile, run unit tests, and work on
|
||||
Thanks to contributions from the community, FirebaseABTesting, FirebaseAuth, FirebaseCore,
|
||||
FirebaseDatabase, FirebaseMessaging, FirebaseFirestore,
|
||||
FirebaseFunctions, FirebaseRemoteConfig, and FirebaseStorage now compile, run unit tests, and work on
|
||||
macOS and tvOS.
|
||||
|
||||
For tvOS, checkout the [Sample](Example/tvOSSample).
|
||||
@@ -195,12 +200,14 @@ Note that the Firebase pod is not available for macOS and tvOS.
|
||||
To install, add a subset of the following to the Podfile:
|
||||
|
||||
```
|
||||
pod 'FirebaseABTesting'
|
||||
pod 'FirebaseAuth'
|
||||
pod 'FirebaseCore'
|
||||
pod 'FirebaseDatabase'
|
||||
pod 'FirebaseFirestore'
|
||||
pod 'FirebaseFunctions'
|
||||
pod 'FirebaseMessaging'
|
||||
pod 'FirebaseRemoteConfig'
|
||||
pod 'FirebaseStorage'
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user