iOS Question Application is closed on iPhone

Alberto SN

Member
Licensed User
Hi!!

I got an app with three pages.

Main:

B4X:
'Code module
#Region  Project Attributes
    #ApplicationLabel: Myapp
    #Version: 1.0.0
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait
    #iPadOrientations: Portrait
 #End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Public NavControl As NavigationController
    Public SQL1 As SQL
End Sub

Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    NavControl.NavigationBarVisible = False
    intro.Show
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
   
End Sub

Private Sub Application_Background
   
End Sub

intro (2 seconds of pause and call Next):

B4X:
'Code module

Sub Process_Globals
    Private pg As Page
    Public csu As CallSubUtils
End Sub

Public Sub Show
    If pg.IsInitialized = False Then
        pg.Initialize("pg")
        pg.RootPanel.LoadLayout("intro")
       
        csu.Initialize
        csu.CallSubPlus(Me, "Next", 2000)
    End If
    Main.NavControl.ShowPage(pg)
End Sub

Sub Next
    loading.Show
End Sub

loading:

B4X:
'Code module

Sub Process_Globals
    Private pg As Page
End Sub

Public Sub Show
    If pg.IsInitialized = False Then
        pg.Initialize("pg")
        pg.RootPanel.LoadLayout("loading")
    End If
    Main.NavControl.ShowPage(pg)
End Sub

In the simulator it Works successfully, but when I install in my iPhone, the page appears and the application quits without explanation, no shows loading page.

What I can be doing wrong?

Thank so much.
 

ilan

Expert
Licensed User
Longtime User
try to rename sub "Next"
"next" belongs to loop (for...next) maybe that is the problem

you can call it "Sub NextPage"
(csu.CallSubPlus(Me, "NextPage", 2000))
 
Upvote 0

Alberto SN

Member
Licensed User
ilan not works changing name.

Erel, I ran in simulator and works fine, I use "build release app" option in Tools-> build server menu, then I download last build and I install my app with iTunes on my iPhone.

I got next code on main:

B4X:
#If RELEASE
   #CertificateFile: ios_distribution.cer
   #ProvisionFile: Distribution.mobileprovision
#END IF

I do not know if you mean it:

upload_2016-1-24_21-26-41.png


Thanks so much guys
 
Upvote 0

Alberto SN

Member
Licensed User
After dozens of test, the problem was for a label control that badly assigned the font.

I was not put in the code because he thought he had nothing to do.

Code works fine!

Thank so much.
 
Upvote 0
Top