Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-device-info
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
放牛的园子
react-native-device-info
Commits
7f8ebc68
Commit
7f8ebc68
authored
Apr 15, 2016
by
Rebecca Hughes
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #36 from chetstone/buildVersion
Add build version
parents
c9575c59
9870cc06
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
README.md
README.md
+2
-0
RNDeviceInfo.m
RNDeviceInfo/RNDeviceInfo.m
+1
-0
deviceinfo.js
deviceinfo.js
+3
-0
No files found.
README.md
View file @
7f8ebc68
...
...
@@ -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 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 (Readable)"
,
DeviceInfo
.
getReadableVersion
());
// e.g. 1.1.0.89
...
...
RNDeviceInfo/RNDeviceInfo.m
View file @
7f8ebc68
...
...
@@ -160,6 +160,7 @@ RCT_EXPORT_MODULE()
@"bundleId"
:
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"CFBundleIdentifier"
],
@"appVersion"
:
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"CFBundleShortVersionString"
],
@"buildNumber"
:
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"CFBundleVersion"
],
@"buildVersion"
:
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"CFBundleBuildVersion"
],
@"systemManufacturer"
:
@"Apple"
,
@"userAgent"
:
self
.
userAgent
,
};
...
...
deviceinfo.js
View file @
7f8ebc68
...
...
@@ -29,6 +29,9 @@ module.exports = {
getBuildNumber
:
function
()
{
return
RNDeviceInfo
.
buildNumber
;
},
getBuildVersion
:
function
()
{
return
RNDeviceInfo
.
buildVersion
;
},
getVersion
:
function
()
{
return
RNDeviceInfo
.
appVersion
;
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment