Skip to Content

Configuration HWC Container App Settings through Afaria

Providing settings for HWC application can be set manually and also can be set by using SAP Afaria MDM automatically while you install application through afaria. If your company uses Afaria and distribute application through it so this is the basic method and i suggest to use this method.

Basically you can provide those setting by creating a simple text file with .cfg extension.

1- Create .cfg extension file

The name prefix for file should start with Sybase_Messaging_ and rest of it will the application ID and version of the application. For instance, your application id is com.test.hwc and version 2.2 so the file name will be as


For IOS you can get application ID and version on xcode in summary tab;

Screen Shot 2013-06-17 at 11.21.59 PM.png

For Android you can get application ID and version in AndroidManfiest.xml file;


And also if you created a policy on Afaria and attached application you can get as below;

Screen Shot 2013-06-17 at 10.55.42 PM.png

2- Fill the file with the configuration settings

Open the file with text editor and add the following settings separated by a semicolon.



    0 – No preference. The application implementation decides what is the default method to use

    1 – Default to automatic registration using password authentication

    2 – Default to manual registration

    3 – Default to automatic registration using a provisioned certificate from Afaria. (Afaria Certificate)

    4 – Default to automatic registration using certificate from a local source preferred. (Local Certificate)

3-    Add the created file to the Policy you created in Afaria for distribution

In Application setting go to Conguriton tab and select text(file) radio button then attach the .cfg file. Then publish the application.

Screen Shot 2013-06-17 at 10.55.56 PM.png

You must be Logged on to comment or reply to a post.
  • When I first read the title my interpretation was: provisioning of HWC apps, but it’s about the configuration of the HWC container only.

    Thanks for sharing.

  • hi Tahir,

    Can you please give me detail how to use password field in configuration file.

    because we are able to push the all details like username ,protocol and server address everything is coming now but password detail is not coming.

    there is any method or any format for password field.

    please give me a details.


    Naveen jain

    • Hi Naveen,

      The password field should match with your active directory server. So why you need to fill password field ? because that should be unique for each user.

  • Hi Tahir,

    I am agree with your point but i am using substitution variable in password field.

    user will input the password.


    i am not using cfg file i am enter the detail directly in Text field of application policy there we can select the substitution variable.

    detail like


    and we are adding two substitution variable like username and password in enrollment policy.

    after put the enrollment code in device it will ask the username and password detail.

    username is coming now but password is not coming so there is any formate for password also.

    kindly provide me input on the same.


    Naveen jain

    • It seems there is no pre-defined for Password format as seen below, but there is an approach in SUP 2.2 which provisining with Afaria certificate.

      Screen Shot 2013-06-22 at 10.09.18 AM.png

      Screen Shot 2013-06-22 at 10.09.18 AM.png
      • Hi Tahir,

        Please let me know  how can we use afaria certificate for portal package server .

        acording to documentation we have to configure CA server for portal package server also.

        and how can we get challenge code and comman name.

        it will be good if you will give me overall flow of this.


        Naveen Jain

  • Tahir, Thanks for the information.

    In this case,How you will handle if there are 100 users ? Keeping individual group for each user is not practical.

    – Midhun VP

      • We are hard coding the values (credentials) for an application right. And the credentials will be different for each user. Hence we need multiple policies for each user practically. Each user will be linked with a group, so how to use this scenario in a production environment. Is there any ways to use this scenario for multiple users with different credentials ?

        – Midhun VP

        • At the time of Enrollment you need to set variable .hence when user will enroll the device the variable will prompt on device and user need to put the input ( eg . username , credential or Defined variable) .

          • I was mentioning about the credentials that we need to pass during registration of HWC application as per the approach mentioned by Tahir not the credentials that we need to pass during enrollment.

      • You are right Tahir. Here we are passing only the server, port etc not the credentials. Hence the user has to enter only his credentials in the device and no need to bother about port or IP. Thanks

        – Midhun VP

  • Hi Tahir

    I have been attempting to auto-configure a hwc app using the above approach for about 2 days. I still cannot get it to work.

    I have a few questions:

    1. Does the developer have to add code into the hwc app to extract the provisioned data OR will it just extract the data from afaria without any extra code.

    2. Do the signing certificates come into play here? There is a an area at the bottom of the config page that is enabled by default with the signing certiticate name. Does this certificate have to be the same as the developers certificate that is used to create the ipa file?

    When I start my HWC app it opens up the afaria client, then returns to the HWC app but nothing happens, it doesn’t connect to SMP. If I manually configure it works fine.

    I can see a final 406 response on the server returning the certificate I think, but nothing happens after that.

    There are a few errors in the iphone config log:

    Oct  8 14:30:13 andrewbs-iPad kernel[0] <Debug>: launchd[1317] Container: /private/var/mobile/Applications/1FE234CE-E30E-4C13-B99E-2DFA800104EF (sandbox)

    Oct  8 14:30:13 andrewbs-iPad backboardd[28] <Error>: HID: The ‘Passive’ connection ‘****’ access to protected services is denied.

    Oct  8 14:30:13 andrewbs-iPad ****[1317] <Warning>: Multi-tasking -> Device: YES, App: YES

    Oct  8 14:30:13 andrewbs-iPad ****[1317] <Warning>: ENTER – (void)applicationDidFinishLaunching:(UIApplication *)application

    Oct  8 14:30:14 andrewbs-iPad backboardd[28] <Error>: HID: The ‘Rate Controlled’ connection ‘****’ access to protected services is denied.

    Oct  8 14:30:15 andrewbs-iPad kernel[0] <Debug>: AppleAP3GDL::handleInterrupt2 FIFO is Empty

    Oct  8 14:30:25 andrewbs-iPad lsd[74] <Warning>: LaunchServices: application launch failed – received error code 11

    Oct  8 14:30:25 andrewbs-iPad ****[1317] <Warning>: – (void)applicationDidBecomeActive:(UIApplication *)application

    Oct  8 14:30:26 andrewbs-iPad kernel[0] <Debug>: launchd[1318] Container: /private/var/mobile/Applications/6BF230B2-70E5-42D3-B64B-C18B66A1F270 (sandbox)

    Oct  8 14:30:26 andrewbs-iPad backboardd[28] <Error>: HID: The ‘Passive’ connection ‘Afaria’ access to protected services is denied.

    Oct  8 14:30:26 andrewbs-iPad securityd[81] <Error>:  securityd_xpc_dictionary_handler Afaria[1318] add The operation couldnt be completed. (OSStatus error -25243 – NoAccessForItem)

    Oct  8 14:30:26 andrewbs-iPad Afaria[1318] <Error>:  SecOSStatusWith error:[-25243] The operation couldnt be completed. (OSStatus error -25243 – Remote error : The operation couldnt be completed. (OSStatus error -25243 – NoAccessForItem))

    Oct  8 14:30:31 andrewbs-iPad wifid[15] <Notice>: WiFi:[434467831.210469]: WiFiLocaleManagerCheckLocale: locale has been valid since 434467711.223559, for 119.99 secs

    If you have any spare time to take a look it would be greatly appreciated.