iOS

Multiple WorxMail Instances

Multiple WorxMail Instances

There are several circumstances where you want to offer Multiple WorxMail Instances with preconfigured Application Settings. For example a WorxMail Version for your Microsoft Exchange Users and another Version for your Lotus Notes Users. If you just import a second Version of WorxMail in your AppController and only changing the Application Name you will experience some problems. With this hack you will be able to offer your Users preconfigured Multiple WorxMail Instances. But it is still not possible to use both Versions of this App on the same Device at the same Time. In this Case you will still get the usual behavior. This will work ofcourse with other WorksApps too, i.e. WorxWeb.

We will start with downloading the latest Version of WorxMail from Citrix. You have to wrap this .ipa as you are used to by using the Citrix MDX Toolkit. After you have your .mdx file you need to extract the policy_metadata.xml file from the .mdx. You need to do this because after we modified the .ipa the Citrix MDX Toolkit will not recognize the .ipa as WorxMail anymore.

Now to the fun part :)

Open the WorxMail.ipa file with WinZip or similar Tools and extract the PayLoad Folder somewhere where you will find it. Open the Folder and Right Click WorxMail.app. Open the app by selecting Show Package Content.

Multiple WorxMail Instances

Here you need to find the Info.plist File and copy it to Location where you can edit it i.e. the Desktop. Open the File with your Favorite Editor and search for CFBundleIdentifier. Below this entry you will see <string>com.citrix.mail</string>. If you are editing WorxWeb this string will be named “com.citrix.browser

Multiple WorxMail InstancesMultiple WorxMail Instances

 

This Value needs to changed! If you want to deploy a second WorxMail Version for Example for Lotus Notes change the Value to com.citrix.maillotus. Save the Info.plist and copy the file back to the WorxMail.app File by using Drag&Drop. After that you can zip the Payload Folder again into WorxMail.ipa or just replace the Folder within the existing .ipa. Please be aware of the following fact; If you want to use the Update Function within the AppController when new Versions of WorxMail are available you need to edit the Info.plist again and replace the String with the same Value! If not it is not possible to update the App.

Now it is time to wrap your modified .ipa file as usual. Before you can Upload the .mdx file to your AppController you need to replace the policy_metadata.xml within the .mdx from the beginning. After that you can upload the .mdx to your AppController give the Application a Name and start testing.

About Jens

My name is Jens Trendelkamp. I currently work as an IT Consultant at sepago GmbH. My fields of specialty are Application Delivery, SBC\VDI Solutions and Enterprise Mobility based on Products from Microsoft and Citrix.

Automated Application Wrapping

Automated Application Wrapping

If you are deploying and/or managing Citrix XenMobile Environments one small part of work you have to deal with is the Application Wrapping. If you do have to do this often because of new Application Versions or you have to wrap the Applications for multiple Customers you will be quite quickly annoyed by the Citrix MDX Toolkit GUI. Because of that (and because the GUI does not work on virtualized Macs running on Windows. Why does the GUI need OpenGL?! WindowServer: _CGXGLDisplayContextForDisplayDevice: No matching context for device – disabling OpenGL) i started to use to MDX Toolkit CLI. Since May the MDX Toolkit is very well documented!  XenMobile MDX Toolkit Documentation

But let´s get to the point. I created two little bash scripts for Automated Application Wrapping. One for iOS and one for Android.

 

Android Version:

######################################################################################################
# Purpose:
# Automatically wrap Android Applications for XenMobile
#
# Scriptname:
# Android-wrapping.sh
#
# $ScriptVersion = “0.000.0002
#
# Comments:
#
# Prerequisites:
# – Citrix MDXToolkit
# – Java JDK 1.6 or 1.7
# – Android SDK 19.0.0 or later
# – Valid User Generated Keystore
#
# Author(s):
# Jens Trendelkamp, Jens.Trendelkamp@sepago.de, sepago GmbH
#
# Change history:
# 21.05.2014, Jens Trendelkamp, Jens.Trendelkamp@sepago.de
# – Initial version
# 24.08.2014, Jens Trendelkamp, Jens.Trendelkamp@sepago.de
# – Updated CLI Commands to work with the latest MDX Toolkit
#
#######################################################################################################
#
# KEYSTORE = Keystore Path
# ALIAS = Key Alias
# STOREPASS = Keystore Password
# KEYPASS = Private Key Password
# APKDIR = Path to the unwrapped Android Applications
#######################################################################################################
#!/bin/sh
KEYSTORE=~/Keystore_path/appwrapping.keystore
ALIAS=appwrapping
STOREPASS=password
KEYPASS=password
APKDIR=/User/Jens/APKs

APKS=`ls -r $APKDIR/*.apk`
rm -rf $APKDIR/wrapped && mkdir -p $APKDIR/wrapped

for i in $APKS ; do
bname=`basename -s .apk $i`
java -jar -Xmx1024M /Applications/Citrix/MDXToolkit/ManagedAppUtility.jar wrap \
-in $i \
-keystore $KEYSTORE \
-keyalias $ALIAS \
-keypass $KEYPASS \
-storepass $STOREPASS \
-out $APKDIR/wrapped/$bname.mdx
done

iOS Version:

######################################################################################################
# Purpose:
# Automatically wrap iOS Applications for XenMobile
#
# Scriptname:
# iOS-wrapping.sh
#
# $ScriptVersion = “0.000.0002”
#
# Comments:
#
# Prerequisites:
# – Citrix MDXToolkit
# – Xcode 5.0+
# – Xcode Command Line Tools 
# – Valid Certificate and Provisioning Profile
#
# Author(s):
# Jens Trendelkamp, Jens.Trendelkamp@sepago.de, sepago GmbH
#
# Change history:
# 21.05.2014, Jens Trendelkamp, Jens.Trendelkamp@sepago.de
# – Initial version
# 24.08.2014, Jens Trendelkamp, Jens.Trendelkamp@sepago.de
# – Updated CLI Commands to work with the latest MDX Toolkit
#
#######################################################################################################
#
# CERT = Name of the signing certificate
# PROFILE = Path to the Provisioning Profile
# IPADIR = Path to the unwrapped iOS Applications
#
#######################################################################################################
#!/bin/sh
CERT=”iPhone Distribution: some company”
PROFILE=/Users/Jens/provisioning_profile.mobileprovision
IPADIR=/User/Jens/IPAs

IPAS=`ls -r $IPADIR/*.ipa`
rm -rf $IPADIR/wrapped && mkdir -p $IPADIR/wrapped

for i in $IPAS ; do
bname=`basename -s .ipa $i`
/Applications/Citrix/MDXToolkit/CGAppCLPrepTool Wrap \
-in $i \
-Cert “$CERT” \
-Profile $PROFILE \
-out $IPADIR/wrapped/$bname.mdx
done

 

If you modified the setting and start the script you will see something like this:

App Wrapping OS XOf Course these bash scripts are pretty simple but it´s a good way to start using the MDX Toolkit CLI :)

About Jens

My name is Jens Trendelkamp. I currently work as an IT Consultant at sepago GmbH. My fields of specialty are Application Delivery, SBC\VDI Solutions and Enterprise Mobility based on Products from Microsoft and Citrix.

How to change/modify iOS WorxApp Icons

How to change/modify iOS WorxApp Icons

I was asked how to modify the WorxApp Icons to match the Cooperate Identity Policy. To accomplish this you will need a Mac with XCode installed, an Image Editor like Gimp and of course the .ipa file you want to modify.

Let´s start with extracting the icons from the .ipa file. If you do this by simply extracting the images from the .ipa file you will get the following error in Gimp and similar Programs.

iOS WorxApp

iOS WorxApp

This is absolutely normal since these Images have been optimized. To undo this we need to “uncrush” them. I found a nice script by Peter Boctor which “uncrushes” whole .ipa files. The script can be found here.

Start the script with the .ipa file you want to edit.

iOS WorxApp

iOS WorxApp

After the script successful ended you will find a new folder named like the .ipa file and an Images at the end.

For a better overview I move the files i need to edit to a separate folder. Now you can now start to edit/replace the images as you wish.

iOS WorxApp

iOS WorxApp

After we have finished editing or replacing the images we want to “crush” them again. Since I ‘am a lazy guy I created a little script which “crushes” a whole directory.

#!/bin/sh

for png in `find $1 -name “*.png”`;

do

echo “crushing $png”

pngcrush -rem allb -brute “$png” temp.png

mv -f temp.png $png

done;

I also added the path to pngcrush binary to my Environment Variable

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/

iOS WorxApp

iOS WorxApp

You´ll start the script with the following command: ./crush.sh foldername

iOS WorxApp

iOS WorxApp

iOS WorxApp

iOS WorxApp

Your folder (in my example it´s called “png”) now contains “crushed” .png files which need to be moved to your original .ipa file. To do this I extracted the WorxMail Application folder from the .ipa/Payload folder. After that I opened the WorxMail Package by clicking “Show Package Contents”. Copy the modified Icons from your folder to the WorxMail Package and make sure you replace the files.

iOS WorxApp

iOS WorxApp

iOS WorxApp

iOS WorxApp

Of course you need to put the WorxMail Application back to the .ipa file. In my case I used WinZip and simply dragged the file to the correct place.

iOS WorxApp

iOS WorxApp

Now it´s time to wrap the app as usual with the MDX Toolkit and upload it to your AppController. If all worked well you can now install/update the customized app which hopefully looks better than mine J

iOS WorxApp

iOS WorxApp

About Jens

My name is Jens Trendelkamp. I currently work as an IT Consultant at sepago GmbH. My fields of specialty are Application Delivery, SBC\VDI Solutions and Enterprise Mobility based on Products from Microsoft and Citrix.

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close