Skip to content
Open
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
8 changes: 8 additions & 0 deletions flow/ui/android/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@ def proxy
frame_layout
end
end

def version_number
UI.context.applicationContext.packageManager.getPackageInfo(UI.context.applicationContext.packageName, 0).versionName
end

def build_number
UI.context.applicationContext.packageManager.getPackageInfo(UI.context.applicationContext.packageName, 0).versionCode
end
end
8 changes: 8 additions & 0 deletions flow/ui/cocoa/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,13 @@ def start
def proxy
@proxy ||= UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
end

def version_number
NSBundle.mainBundle.objectForInfoDictionaryKey('CFBundleShortVersionString')
end

def build_number
NSBundle.mainBundle.objectForInfoDictionaryKey('CFBundleVersion')
end
end
end