iOS Question Documentinteraction works only in debug

marcick

Well-Known Member
Licensed User
Longtime User
I don't know why I'm able to run this code only in debug mode.
When I compile in release, I see the list of Apps, I choose "Open with Ibooks" as usual and the screen returns to the main page, not showing the pdf.

I have Iphone Library 2.00 and the pdf is in the files folder of course

B4X:
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
    Private Page1 As Page
    Private di As DocumentInteraction
End Sub

Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.Title = "Page 1"
    Page1.RootPanel.Color = Colors.White
    NavControl.ShowPage(Page1)
    di.Initialize("di", File.DirAssets, "manuale bmap4i.pdf") '<--- open a file from the assets folder
End Sub


Sub Page1_Click
    di.OpenFile(Page1.RootPanel)
End Sub

Sub di_Closed
    Log("Dialog closed")
End Sub

Sub di_SendingFile
    Log("Opening file")
   
End Sub
 

marcick

Well-Known Member
Licensed User
Longtime User
Sorry Erel I didn't catch exactely your hint before.
Yes, now it works, thank you very much.
 
Upvote 0
Top