Commit 9870cc06 authored by Chester Wood's avatar Chester Wood

Add build version

Returns full build version on iOS, use with https://gist.github.com/karlvr/c93a98d7000ecb163895
parent c9575c59
...@@ -114,6 +114,8 @@ console.log("Bundle Id", DeviceInfo.getBundleId()); // e.g. com.learnium.mobile ...@@ -114,6 +114,8 @@ console.log("Bundle Id", DeviceInfo.getBundleId()); // e.g. com.learnium.mobile
console.log("Build Number", DeviceInfo.getBuildNumber()); // e.g. 89 console.log("Build Number", DeviceInfo.getBuildNumber()); // e.g. 89
console.log("Build Version", DeviceInfo.getBuildVersion()); // on iOS, full build info, e.g. v0.5.9-51-g71ec8a0+
console.log("App Version", DeviceInfo.getVersion()); // e.g. 1.1.0 console.log("App Version", DeviceInfo.getVersion()); // e.g. 1.1.0
console.log("App Version (Readable)", DeviceInfo.getReadableVersion()); // e.g. 1.1.0.89 console.log("App Version (Readable)", DeviceInfo.getReadableVersion()); // e.g. 1.1.0.89
......
...@@ -160,6 +160,7 @@ RCT_EXPORT_MODULE() ...@@ -160,6 +160,7 @@ RCT_EXPORT_MODULE()
@"bundleId": [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"], @"bundleId": [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"],
@"appVersion": [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"appVersion": [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"],
@"buildNumber": [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"], @"buildNumber": [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"],
@"buildVersion": [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleBuildVersion"],
@"systemManufacturer": @"Apple", @"systemManufacturer": @"Apple",
@"userAgent": self.userAgent, @"userAgent": self.userAgent,
}; };
......
...@@ -29,6 +29,9 @@ module.exports = { ...@@ -29,6 +29,9 @@ module.exports = {
getBuildNumber: function() { getBuildNumber: function() {
return RNDeviceInfo.buildNumber; return RNDeviceInfo.buildNumber;
}, },
getBuildVersion: function() {
return RNDeviceInfo.buildVersion;
},
getVersion: function() { getVersion: function() {
return RNDeviceInfo.appVersion; return RNDeviceInfo.appVersion;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment