Environment signature isolation
In multi-developer projects, inconsistent local signing configurations can lead to uncommitted files, frequent conflicts, and repeated automatic-signing logins. While these issues are usually minor, they are hard to notice and can cause confusing runtime errors.
We’ll introduce development environment isolation in HarmonyOS, a feature that is often overlooked.
Here, we’ll walk through how to configure isolated signing certificate settings to solve this problem.
Step 1: Create a new signature
First, add your own automatic signing configuration.
Then input your signature name.
Step 2: Configure project build-profile.json5
Once the signing configuration is created, your signing profile will appear under build-profile.json5 → app → signingConfigs.
Also executing the following points:
- Add a signing configuration under
build-profile.json5 → app → products
- Add a target configuration under
build-profile.json5 → modules
Note
Here I modified both modules (mobile and shared_library) since shared_library is also used.
Step 3: Configure the entry target
Adding a target under both module's build-profile.json5 → targets
Step 4: Configure the editor product
Step 5: Compile and run
Click run button and check effects.