iOS Question AppLabel, ApplicationVersionName ?

MitchBu

Well-Known Member
Licensed User
In B4A, I do this for the About dialog:


B4X:
Log("---About_click")
    Msgbox(M("By") & " Michel Bujardet", AppLabel & " " & Application.VersionName)


Is there an equivalent in B4i ?
 

Erel

Administrator
Staff member
Licensed User
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
In B4A, I do this for the About dialog:


B4X:
Log("---About_click")
    Msgbox(M("By") & " Michel Bujardet", AppLabel & " " & Application.VersionName)


Is there an equivalent in B4i ?

i customized a bit the "AppVersion" sub, so I can retrive also the relative Integer value to do some checks when i need
B4X:
Sub AppVersion(intval As Boolean) As Object
    Dim no As NativeObject
    no = no.Initialize("NSBundle").RunMethod("mainBundle", Null)
    Dim version As Object = no.RunMethod("objectForInfoDictionaryKey:", Array("CFBundleShortVersionString"))
    Dim sver As String = version
    Dim intver As Int = sver.Replace(".", "")
    
    If intval Then
        Return intver
    Else
        Return version
    End If
End Sub

Sub AppName As String
    Dim no As NativeObject
    no = no.Initialize("NSBundle").RunMethod("mainBundle", Null)
    Dim name As Object = no.RunMethod("objectForInfoDictionaryKey:", Array("CFBundleDisplayName"))
    Return name
End Sub
 
Upvote 0

MitchBu

Well-Known Member
Licensed User
Upvote 0
Top