Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/package_info_plus/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ requires the Xcode build folder to be rebuilt after changes to the version strin
Clean the Xcode build folder with:
`XCode Menu -> Product -> (Holding Option Key) Clean build folder`.

#### Plugin returns package version in `buildNumber` when no build number specified in pubspec.yaml

Plugin doesn't modify the output of iOS. In this case `buildNumber` in the plugin is CFBundleVersion in iOS. This property returns version when build number is not specified.buildNumber
See [CFBundleVersion docs](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion) for more inf.

### Android (and potentially all platforms)

Calling to `PackageInfo.fromPlatform()` before the `runApp()` call will cause an exception.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class PackageInfo {
final String version;

/// The build number. `CFBundleVersion` on iOS, `versionCode` on Android.
/// Note, on iOS if an app has no buildNumber specified this property will return version
/// Docs about CFBundleVersion: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion
final String buildNumber;

/// The build signature. Empty string on iOS, signing key signature (hex) on Android.
Expand Down