-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Conversation
## 0.3.3 | ||
|
||
* Fixed a crash on IOS when some of the package infos are not available. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra line here
@"packageName" : [[NSBundle mainBundle] bundleIdentifier], | ||
@"version" : [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], | ||
@"buildNumber" : [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] | ||
@"appName" : [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] ?: @"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC this way the Dart side cannot tell if the property was set to an empty string or was absent.
Is it possible to use NSNull here if it's absent?
packages/package_info/pubspec.yaml
Outdated
@@ -3,7 +3,7 @@ description: Flutter plugin for querying information about the application | |||
package, such as CFBundleVersion on iOS or versionCode on Android. | |||
author: Flutter Team <flutter-dev@googlegroups.com> | |||
homepage: https://github.com/flutter/plugins/tree/master/packages/package_info | |||
version: 0.3.2 | |||
version: 0.3.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be 0.3.2+1 see: https://www.dartlang.org/tools/pub/versioning#semantic-versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adding nil checks in NSDictionary and default them to NSNull to prevent crashes.
This reverts commit dece9a6.
Adding nil checks in NSDictionary and default them to NSNull to prevent crashes.
flutter/flutter#20761