Skip to content

Commit b23b63b

Browse files
committed
Merge branch 'master' into firebase_auth_macos
2 parents 68ccc12 + d5569b1 commit b23b63b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

40 files changed

+1465
-107
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Pods/
2121
**/Flutter/flutter_assets/
2222
ServiceDefinitions.json
2323
xcuserdata/
24-
*.xcworkspace
2524

2625
local.properties
2726
keystore.properties

packages/cloud_firestore/cloud_firestore_web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.0+3
2+
3+
- Removed unit test that was only testing dart-lang behavior.
4+
15
## 0.1.0+2
26

37
- Update documentation about this package being the endorsed platform for web.

packages/cloud_firestore/cloud_firestore_web/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: cloud_firestore_web
22
description: The web implementation of cloud_firestore
33
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_web
4-
version: 0.1.0+2
4+
version: 0.1.0+3
55

66
flutter:
77
plugin:

packages/cloud_firestore/cloud_firestore_web/test/field_value_factory_web_test.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ void main() {
3535
expect(actualDouble.data, isInstanceOf<web.FieldValue>());
3636
});
3737

38-
test(
39-
"increment throws when attempting to increment something that is not a number",
40-
() {
41-
expect(() {
42-
dynamic malformed = "nope";
43-
factory.increment(malformed);
44-
}, throwsA(isA<TypeError>()));
45-
});
46-
4738
test("serverTimestamp", () {
4839
final FieldValueWeb actual = factory.serverTimestamp();
4940
expect(actual.data, isInstanceOf<web.FieldValue>());

packages/firebase_core/firebase_core/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.4
2+
3+
* Add macOS support
4+
15
## 0.4.3+3
26

37
* Fix overrides a deprecated API.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
// Copyright 2017 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
#import "FLTFirebaseCorePlugin.h"
6+
#import "UserAgent.h"
7+
8+
#import <Firebase/Firebase.h>
9+
10+
static NSDictionary *getDictionaryFromFIROptions(FIROptions *options) {
11+
if (!options) {
12+
return nil;
13+
}
14+
return @{
15+
@"googleAppID" : options.googleAppID ?: [NSNull null],
16+
@"bundleID" : options.bundleID ?: [NSNull null],
17+
@"GCMSenderID" : options.GCMSenderID ?: [NSNull null],
18+
@"APIKey" : options.APIKey ?: [NSNull null],
19+
@"clientID" : options.clientID ?: [NSNull null],
20+
@"trackingID" : options.trackingID ?: [NSNull null],
21+
@"projectID" : options.projectID ?: [NSNull null],
22+
@"androidClientID" : options.androidClientID ?: [NSNull null],
23+
@"databaseUrl" : options.databaseURL ?: [NSNull null],
24+
@"storageBucket" : options.storageBucket ?: [NSNull null],
25+
@"deepLinkURLScheme" : options.deepLinkURLScheme ?: [NSNull null],
26+
};
27+
}
28+
29+
static NSDictionary *getDictionaryFromFIRApp(FIRApp *app) {
30+
if (!app) {
31+
return nil;
32+
}
33+
return @{@"name" : app.name, @"options" : getDictionaryFromFIROptions(app.options)};
34+
}
35+
36+
@implementation FLTFirebaseCorePlugin
37+
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
38+
FlutterMethodChannel *channel =
39+
[FlutterMethodChannel methodChannelWithName:@"plugins.flutter.io/firebase_core"
40+
binaryMessenger:[registrar messenger]];
41+
FLTFirebaseCorePlugin *instance = [[FLTFirebaseCorePlugin alloc] init];
42+
[registrar addMethodCallDelegate:instance channel:channel];
43+
44+
SEL sel = NSSelectorFromString(@"registerLibrary:withVersion:");
45+
if ([FIRApp respondsToSelector:sel]) {
46+
[FIRApp performSelector:sel withObject:LIBRARY_NAME withObject:LIBRARY_VERSION];
47+
}
48+
}
49+
50+
- (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result {
51+
if ([@"FirebaseApp#configure" isEqualToString:call.method]) {
52+
NSString *name = call.arguments[@"name"];
53+
NSDictionary *optionsDictionary = call.arguments[@"options"];
54+
FIROptions *options =
55+
[[FIROptions alloc] initWithGoogleAppID:optionsDictionary[@"googleAppID"]
56+
GCMSenderID:optionsDictionary[@"GCMSenderID"]];
57+
if (![optionsDictionary[@"bundleID"] isEqual:[NSNull null]])
58+
options.bundleID = optionsDictionary[@"bundleID"];
59+
if (![optionsDictionary[@"APIKey"] isEqual:[NSNull null]])
60+
options.APIKey = optionsDictionary[@"APIKey"];
61+
if (![optionsDictionary[@"clientID"] isEqual:[NSNull null]])
62+
options.clientID = optionsDictionary[@"clientID"];
63+
if (![optionsDictionary[@"trackingID"] isEqual:[NSNull null]])
64+
options.trackingID = optionsDictionary[@"trackingID"];
65+
if (![optionsDictionary[@"projectID"] isEqual:[NSNull null]])
66+
options.projectID = optionsDictionary[@"projectID"];
67+
if (![optionsDictionary[@"androidClientID"] isEqual:[NSNull null]])
68+
options.androidClientID = optionsDictionary[@"androidClientID"];
69+
if (![optionsDictionary[@"databaseURL"] isEqual:[NSNull null]])
70+
options.databaseURL = optionsDictionary[@"databaseURL"];
71+
if (![optionsDictionary[@"storageBucket"] isEqual:[NSNull null]])
72+
options.storageBucket = optionsDictionary[@"storageBucket"];
73+
if (![optionsDictionary[@"deepLinkURLScheme"] isEqual:[NSNull null]])
74+
options.deepLinkURLScheme = optionsDictionary[@"deepLinkURLScheme"];
75+
[FIRApp configureWithName:name options:options];
76+
result(nil);
77+
} else if ([@"FirebaseApp#allApps" isEqualToString:call.method]) {
78+
NSDictionary<NSString *, FIRApp *> *allApps = [FIRApp allApps];
79+
NSMutableArray *appsList = [NSMutableArray array];
80+
for (NSString *name in allApps) {
81+
FIRApp *app = allApps[name];
82+
[appsList addObject:getDictionaryFromFIRApp(app)];
83+
}
84+
result(appsList.count > 0 ? appsList : nil);
85+
} else if ([@"FirebaseApp#appNamed" isEqualToString:call.method]) {
86+
NSString *name = call.arguments;
87+
FIRApp *app = [FIRApp appNamed:name];
88+
result(getDictionaryFromFIRApp(app));
89+
} else {
90+
result(FlutterMethodNotImplemented);
91+
}
92+
}
93+
94+
@end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Flutter-related
2+
**/Flutter/ephemeral/
3+
**/Pods/
4+
5+
# Xcode-related
6+
**/xcuserdata/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2+
#include "ephemeral/Flutter-Generated.xcconfig"

0 commit comments

Comments
 (0)