# Build hybrid application based on profile/configuration

**URL:** <https://community.cumulocity.com/t/build-hybrid-application-based-on-profile-configuration/830>\
**Category:** Forum\
**Tags:** cockpit, cumulocity\
**Created:** [August 3, 2022, 8:45pm UTC](https://community.cumulocity.com/t/build-hybrid-application-based-on-profile-configuration/830 "2022-08-03T20:45:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dacsystemsw](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@dacsystemsw](https://community.cumulocity.com/u/dacsystemsw)\
**Post date:** [August 3, 2022, 8:45pm UTC](https://community.cumulocity.com/t/build-hybrid-application-based-on-profile-configuration/830/1 "2022-08-03T20:45:52Z")

</div>

#### What product/components do you use and which version/fix level are you on?

Cumulocity IoT (backend **1011.0.19** frontend **1011.0.4** )

#### Is your question related to the free trail, or to a production (customer) instance?

Customer license

Hi it’s Luca

I’m developing an application starting from cockpit. I need to build my app using different profiles/configuration. For example, I need to show a component while im developing but hide it in production. To solve this from an Angular perspective we have environtment.ts and angular.json configuration (there’s no need to exaplain this solution in detail). Then we can just build the application with something like  
`ng build --configuration=dev` or `ng build --configuration=production`

Unfortunately in my scenario (hybrid application) I have neither environment.ts nor angular.json.

How can I solve this?

---

<div class="post-metadata">

**Author:** ![Tristan\_Bastian](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/tristan_bastian/32/18259_2.png) [@Tristan\_Bastian](https://community.cumulocity.com/u/Tristan_Bastian)\
**Post date:** [August 4, 2022, 2:58pm UTC](https://community.cumulocity.com/t/build-hybrid-application-based-on-profile-configuration/830/2 "2022-08-04T14:58:29Z")

</div>

Hi Luca,

The following syntax allows you to set certain attributes on your app while building/serving the app:

```auto
--app.<key>=<value>

```

So you could e.g. build the app using:

```auto
c8ycli build --app.name=MyCustomName

```

To rename the app to `MyCustomName`.  
This can also be used to adjust any other of the [default application options](http://resources.cumulocity.com/documentation/websdk/ngx-components/classes/ApplicationOptions.html).

You are also free to define you own options and set them as described above.  
You can then access these option inside of your application using the [OptionsService](http://resources.cumulocity.com/documentation/websdk/ngx-components/injectables/OptionsService.html). If this doesn’t work for you, you should also be able to access them via `window.C8Y_APP.<attribute>` within your application.

Regards,  
Tristan

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [January 31, 2023, 2:58pm UTC](https://community.cumulocity.com/t/build-hybrid-application-based-on-profile-configuration/830/3 "2023-01-31T14:58:34Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
