Skip to content

Commit e105147

Browse files
authored
Cast error.code to long to avoid using NSInteger as %ld format warnings. (#1291)
1 parent 86542f6 commit e105147

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/cloud_firestore/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.12.9+6
2+
3+
* Cast error.code to long to avoid using NSInteger as %ld format warnings.
4+
15
## 0.12.9+5
26

37
* Fixes a crash on Android when running a transaction without an internet connection.

packages/cloud_firestore/ios/Classes/CloudFirestorePlugin.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
static FlutterError *getFlutterError(NSError *error) {
1111
if (error == nil) return nil;
1212

13-
return [FlutterError errorWithCode:[NSString stringWithFormat:@"Error %ld", error.code]
13+
return [FlutterError errorWithCode:[NSString stringWithFormat:@"Error %ld", (long)error.code]
1414
message:error.domain
1515
details:error.localizedDescription];
1616
}
@@ -423,7 +423,7 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
423423
}
424424
completion:^(id transactionResult, NSError *error) {
425425
if (error != nil) {
426-
result([FlutterError errorWithCode:[NSString stringWithFormat:@"%ld", error.code]
426+
result([FlutterError errorWithCode:[NSString stringWithFormat:@"%ld", (long)error.code]
427427
message:error.localizedDescription
428428
details:nil]);
429429
}

packages/cloud_firestore/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for Cloud Firestore, a cloud-hosted, noSQL database
33
live synchronization and offline support on Android and iOS.
44
author: Flutter Team <[email protected]>
55
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_firestore
6-
version: 0.12.9+5
6+
version: 0.12.9+6
77

88
flutter:
99
plugin:

0 commit comments

Comments
 (0)