iOS Question Externally change a variable value in a published app by variable name

JackKirk

Well-Known Member
Licensed User
Longtime User
I have a pair of (B4A/B4i) customer apps that I would like to add a dynamic "under the hood" ability to change some internal constants after the apps are published.

At the time the apps are published I do not know what the constants I might want to change are - so no ability to write "anticipatory" code.

I would also like the ability to change the constants for particular customers only (each being assigned a "ticket" to access the apps so this is easy).

What I am contemplating is:

1. In the cloud (AWS/S3) I save a file with name of the form "ticket"-constants.txt
2. When an app is launched it looks for the appropriate file with its ticket.
3. If found the app downloads the file and reads it.
4. The file might take the form:
variablename1 = value1
variablename2 = value2
variablename3 = value3
...
5. The app parses the file and assigns internal variables with the matching name to the appropriate new value.

In this post:
https://www.b4x.com/android/forum/t...he-name-of-a-variable-array.58197/post-371272
JordiCP describes a way to do this in Android.

Is there a way to do this in B4i?

Thanks in anticipation...
 

JackKirk

Well-Known Member
Licensed User
Longtime User
Sorry, this is not a solution.

5. The app parses the file and assigns internal variables with the matching name to the appropriate new value.

Maybe not clear enough: the variable to be changed has its name passed in the file - the app then works out which variable is to be changed from this.

I want to do what Pedrush did in Android:
https://www.b4x.com/android/forum/t...he-name-of-a-variable-array.58197/post-371272

Thanks...
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
As I know, Objective-C is compiled to native machine code (unlike Java byte-code).
Very doubt that a code keeps somewhere names and locations of variables.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…