Personalizing and re-signing the Infiniti GO iOS application

Overview

This document is provided as a guide to help resign the Infiniti application with a different name/icon/images.
 

Requirements

- Mac OSX
- Apple developer account
- An enterprise or app store certificate (created through apple)
- Provisioning profile – this will be referred to as provision.mobileprovision (created through apple)
- You will also need the following from Apple. These can be found on the App IDs page within Apple Developer account.
  • App ID e.g. com.company.myapp
  • App Prefix e.g. D7MEWDXWWW
  • App Display name – MyApp
 
Ensure that your app certificate has been imported into the mac OSX KeyChain. To execute the remaining steps, you will need the following:
  • WORKSPACE – The base folder where work will be performed
  • APP_ID (created within the apple developer account)
  • APP_PREFIX (created within the apple developer account)
  • APP_DISPLAYNAME (created within the apple developer account)
  • CERTFRIENDLY – Used to access the certificate from the command line on MacOSX machine.(obtain how to)
  • Provision.mobileprovision file
  • Entitlements.plist file  -  example attached.  
  • The folder location of Newimages(folder where replacement images are kept.)
 
unzip IPA for modification
 
unzip -o -q WORKSPACE/Infiniti.ipa -d WORKSPACE/IPA
 
Explore this package and look at the different images. As we will be resigning the app with a new certificate you are able to replace any image. It is best practice to replace any image with the same size icon.
 
Remove Intelledox code signature
 
rm -r WORKSPACE/IPA/Payload/Infiniti.app/_CodeSignature/
 
Copy in new mobile provision
 
rm -r WORKSPACE/IPA/Payload/Infiniti.app/embedded.mobileprovision
cp WORKSPACE/Provision.mobileprovision WORKSPACE/IPA/Payload/Infiniti.app/embedded.mobileprovision
 
Copy in new images – If you have any (optional)
 
chmod -R 0755 WORKSPACE/IPA/Payload/Infiniti.app/
find WORKSPACE/NewImages -name \*.png -exec cp {} WORKSPACE/IPA/Payload/Infiniti.app/ \;
 
Update plist configuration file – Creating your app
 
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier APP_ID" "WORKSPACE/IPA/Payload/Infiniti.app/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName APP_DISPLAYNAME" "WORKSPACE/IPA/Payload/Infiniti.app/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleName APP_DISPLAYNAME" "WORKSPACE/IPA/Payload/Infiniti.app/Info.plist"
 
Entitlements.plist – An example attached
 
/usr/libexec/PlistBuddy -c "Set :application-identifier APP_PREFIX.APP_ID" "entitlements.plist"
/usr/libexec/PlistBuddy -c "Set :keychain-access-groups:0 APP_PREFIX.APP_ID" "entitlements.plist"
 
rm -r WORKSPACE/IPA/Payload/Infiniti.app/archived-expanded-entitlements.xcent
cp -f entitlements.plist WORKSPACE/IPA/Payload/Infiniti.app/archived-expanded-entitlements.xcent
 
Code sign – Signing the personalised app with your supplied certificate
 
cp entitlements.plist IPA/entitlements.plist
cd IPA
codesign --deep --force -s "CERTFRIENDLY" --verbose --entitlements entitlements.plist -v Payload/*.app/
 
zip -q -r -y "APP_DISPLAYNAME.ipa" Payload
 
IPA file has been re-signed using your certificate. The IPA file is now ready for distribution by either a mobile device management solution or via submitting to apple to be made available on the app store.
 
ENTITLEMENTS FILE EXAMPLE
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
                <key>application-identifier</key>
                <string> D7MEWDXWWW.com.company.myapp</string>
                <key>aps-environment</key>
                <string>production</string>
                <key>keychain-access-groups</key>
                <array>
                                <string> D7MEWDXWWW.com. company.myapp</string>
                </array>
</dict>
</plist>
 

Additional Information

Below are links that will help you determine icon and images sizes for the mobile operating systems.
 
 

Related Articles

Keywords