iOS Question Package Name in B4i

Matt S.

Member
Licensed User
Hi everybody!
There is "Application.PackageName" in B4A to get the PackageName.
What is its equivalent in B4i?
 

mcqueccu

Well-Known Member
Licensed User
Longtime User
B4X:
Sub GetPackageName As String
    Dim bundle As NativeObject
    bundle = bundle.Initialize("NSBundle").RunMethod("mainBundle", Null)
    Dim bundleIdentifier As String = bundle.GetField("bundleIdentifier").AsString
    Return bundleIdentifier
End Sub
 
Upvote 1
Top