Wish Private key switching in B4A

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
I wish when switching between apps development in B4A IDE, their private key to changed automatically.
Now when I switch next app, the IDE still uses private key of previous app.
 

asales

Expert
Licensed User
Longtime User
In the IDE I use my old key and in my new apps I use this lines (together with the conditional symbol #if AAB and the new key):
B4X:
#SignKeyFile
#SignKeyPassword
 

JohnC

Expert
Licensed User
Longtime User
Good, but we need it to be automatically without coding.
If you don't use @asales method to switch keys, how will the IDE know what key to "automatically" switch to without that code?

That's why you need that code in each particular project, so it will "automatically" switch to the specified key for that specific project.
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
If you have A,B,C and D projects, each one you set their private key individually & manually for first time only.
I mean the IDE when loading any project, it sholud load its (set before) private key automatically without coding.
 

JohnC

Expert
Licensed User
Longtime User
If you have A,B,C and D projects, each one you set their private key individually & manually for first time only.
I mean the IDE when loading any project, it sholud load its (set before) private key automatically without coding.
When you set the key using the menu selection in the IDE, it sets the key for all "default" projects - default projects are projects that do not have the manual key code that @asales mentions.

So, basically setting the "key" using the IDE menu is not designed to work the way you think. If you want a project to use a specific key, you need to add those lines (just once) to specify the desired key for that specific project (and not use the default key that was set in the IDE menu)
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
@asales coding is simple & easy, but for newbies they don't know about these more configurations.
It is just a suggestion for IDE improvement.
 

JohnC

Expert
Licensed User
Longtime User
I understand you now.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The current way, with the attributes, is much better:
1. In most cases you should use a single key with all projects. Why switch the key?
2. Using attributes is very simple and also very powerful as you can combine it with conditional compilation symbols.
3. You are suggesting to remove the existing attributes feature, break thousands of projects and implement a less powerful feature in order to encourage newbies to do something that they shouldn't do.
It will not happen.
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
1. In most cases you should use a single key with all projects. Why switch the key?
Because we have many projects of different customers, each customer need his project source code with his own private key. WE CAN'T share one private key between many customers, it is security breach.
You are suggesting to remove the existing attributes feature
No, I don't say it.

Anyway, we know your big big efforts in making everything easy for us, my suggestion was a WISH , you can do it or no :)
 

AnandGupta

Expert
Licensed User
Longtime User
Because we have many projects of different customers, each customer need his project source code with his own private key. WE CAN'T share one private key between many customers, it is security breach.
As I understand.
  1. Keep key as 'debug' in ide
  2. write key #SignKeyFile etc. in each project
This way key is not shared between customers.
 
Top