iOS Question error compiling

Chris Guanzon

Active Member
Licensed User
Longtime User
Hello, what is the problem with this error?

B4X:
B4i Version: 7.00
Parsing code.    (0.12s)
Building folders structure.    (0.12s)
Compiling code.    Error
Error compiling program.
Error description: Integer expected.
Error occurred on line: 39
Dim Padding As Int = 4 - ((img.Width * 3) Mod 4)
Word: mod

I can't find the error. It says it's on line 39. but the problem is, I don't know in what module that causes this error.

Tried finding this:
B4X:
Dim Padding As Int = 4 - ((img.Width * 3) Mod 4)
but I don't have this in my code.
 
Last edited:

Chris Guanzon

Active Member
Licensed User
Longtime User
Might be in one of the referenced b4xlibs. Which libraries are referenced?

These are the libraries I used.

1617862156059.png
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
The error is at line #35
no.GetField("statusBar").SetField("backgroundColor", no.ColorToUIColor(0xFF757575))


B4X:
Private Sub Application_Start (Nav As NavigationController)
    Dim no As NativeObject = App
    no.GetField("statusBar").SetField("backgroundColor", no.ColorToUIColor(0xFF757575))
    
    NavControl = Nav
    pgMain.Initialize("main")
    pgMain.RootPanel.LoadLayout("Page1")
    NavControl.ShowPage(pgMain)
    NavControl.SetNavigationBarVisibleAnimated(False)
    
    Wait For (SetGUI) Complete (Success As Boolean)
End Sub

Application_Start
*** Assertion failure in -[UIApplication _createStatusBarWithRequestedStyle: orientation:hidden:], UIApplication.m:5089
Error occurred on line: 35 (Main)
App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.

Stack Trace: (
CoreFoundation F3021642-E3C0-33F8-9911-DD303A6056D0 + 1157612
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation F3021642-E3C0-33F8-9911-DD303A6056D0 + 169228
Foundation 712A564E-5058-3EAC-AF3A-43BBD43D0D7E + 489592
UIKitCore CC6E5AC7-8248-35F6-8B42-2E25C93DCF0A + 11751696
UIKitCore CC6E5AC7-8248-35F6-8B42-2E25C93DCF0A + 11752972
Foundation 712A564E-5058-3EAC-AF3A-43BBD43D0D7E + 42672
All Access Mobile -[B4INativeObject GetField:] + 160
All Access Mobile -[ResumableSub_main_Application_Start resume::] + 700
All Access Mobile -[b4i_main _application_start:] + 516
CoreFoundation F3021642-E3C0-33F8-9911-DD303A6056D0 + 1175856
CoreFoundation F3021642-E3C0-33F8-9911-DD303A6056D0 + 8656
All Access Mobile +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1528
All Access Mobile -[B4IShell runMethod:] + 448
All Access Mobile -[B4IShell raiseEventImpl:method:args::] + 2172
All Access Mobile -[B4IShellBI raiseEvent:event: params:] + 1580
All Access Mobile __33-[B4I raiseUIEvent:event: params:]_block_invoke + 56
libdispatch.dylib AF27E74C-BE4A-3364-BB27-AED9916CE02D + 393880
libdispatch.dylib AF27E74C-BE4A-3364-BB27-AED9916CE02D + 397952
libdispatch.dylib AF27E74C-BE4A-3364-BB27-AED9916CE02D + 65628
CoreFoundation F3021642-E3C0-33F8-9911-DD303A6056D0 + 632288
CoreFoundation F3021642-E3C0-33F8-9911-DD303A6056D0 + 608904
CoreFoundation CFRunLoopRunSpecific + 572
GraphicsServices GSEventRunModal + 160
UIKitCore CC6E5AC7-8248-35F6-8B42-2E25C93DCF0A + 11723508
UIKitCore UIApplicationMain + 164
All Access Mobile main + 128
libdyld.dylib 0B475C78-3C12-3121-B7F8-2B95B83DAF44 + 5480
)
Application_Active
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I found this:
 
Upvote 0

Chris Guanzon

Active Member
Licensed User
Longtime User
I found this:

The statusbar is working fine. The error is in the Base64EncodeDecod library. I removed the library and it compiled successfully.
Gonna follow @Erel's suggestion to use stringutils instead.
 
Upvote 0
Top