iOS Question iOS Debug vs Release or Release (obfuscated)

Erick Kalugdan

Member
Licensed User
In B4A, there are 2 kinds of Release builds:

1. Release
2. Release (obfuscated)

I noticed that my Android app doesn't work with Release (obfuscated) but works only with Release build so all my Android apps that are published are Release build only.

Now with B4i, it looks like it only has one build and that is Release (obfuscated) only. When I run the app in debug mode, it works but once I build it in Release (obfuscated), it doesn't. Just like the scenario in B4A when Release (obfuscated) is used.

What could be causing this? What's the difference between Release and Release (obfuscated)?

FYI, in my app, I only use WebView and Map objects.
 

Erick Kalugdan

Member
Licensed User
This is the code. It returns the correct HTML page in DEBUG but displays a blank white screen when in RELEASE :-(

B4X:
Private Sub Application_Start (Nav As NavigationController)
Page1.Initialize("Page1")
Page1.Title = "Sample app"
   
WV1.Initialize("WV1")
Page1.RootPanel.AddView(WV1, 0, 0, 100%x, 100%y)

NavControl = Nav
NavControl.ShowPage(Page1)
   
WV1.LoadUrl(File.DirAssets & "/start.htm")
End Sub
 
Upvote 0

Eumel

Active Member
Licensed User
Longtime User
Look at your Code and the Tutorial about Obfuscation

It seems that you use Variables or Subnames that will renamed by compiling and makes your code not work.

In the Tutorial is explained, how you pretend needed variables and subnames from the obfuscator
 
Upvote 0

Erick Kalugdan

Member
Licensed User
1. That link is for B4A. I have problems with B4i now.

2. I also tried to rename my Process_Globals variables to have underscore "_" in it so it won't be renamed (assuming that is what B4i is doing in Release build) but it still is not working.
 
Upvote 0

Erick Kalugdan

Member
Licensed User
Whether I use the ff code:

B4X:
WV1.LoadUrl("file://" & File.Combine(File.DirAssets, "start.htm"))

Or this code:

B4X:
WV1.LoadUrl(File.DirAssets & "/start.htm")

Both codes work with B4i DEBUG build but leaves me with a blank white webview in RELEASE build :-(
 
Upvote 0

Erick Kalugdan

Member
Licensed User
Here's an observation that might help you trace too... I tried to use a full website URL like so:
B4X:
WV1.LoadUrl("http://www.google.com")

It works for both DEBUG build and RELEASE build.

So... maybe there is something inconsistent with File.DirAssets between DEBUG and RELEASE builds? If yes, how do we fix this?
 
Upvote 0
Top