Terminal Resign Codesign Mac App Example

About Terminal. Probably the most useful tool to check and kill processes is called Terminal, which is an application that provides access to the lower levels of the Mac OS X operating system and files.Terminal is a text-based tool which lets you conduct all manner of routine tasks such as viewing directories, copying, moving and deleting files, as well as obtain detailed information about. Jun 07, 2017  New Issue Checklist. Updated fastlane to the latest version; I have read the Contribution Guidelines; Issue Description. We have a White label app that we build once, and then use act to change configs, assets, info.plist. We use act and resign to create. Oct 10, 2016  I don't believe you can do this. You can't resign a signed file as you don't have the private key to unsign it. You would need an unencrypted/unsigned IPA or the original source code I think?

All


I'm working for a worldwide company that requires the apps we produce to be initially resigned for enterprise distribution for testing purposes before submitting to the App Store. This is so that testers who are based in branches all over the world can rigorously test and scrutinise the apps we produce before they are submitted onto the Apple App store.


I notice how the simpler apps we produce can be so easily resigned using iResign, where I just need to point to the enterprise distribution provisioning profile and the In-House distribution certificate and the apps then resign, install and work fine.

However, some more complex apps we produce only install & work when I resign using Ad hoc distribution or developer cert & provisioning profile, but fail when I resign them for In-house enterprise distribution.

I find these more complex apps that deploy watch kit and have many entitlements in the AppID are the apps I cannot resign for enterprise distribution using simple iResign, because they just fail to install or crash upon launch.


Are there any restrictions on what the apps signed for In-house enterprise distribution can contain? Compared to what apps signed for Ad hoc distribution can contain?


Also, all the Apple account certificates in my keychain have a certificate id in brackets after the certificate name other than the certificate for In-house enterprise distribution. See item 2 in the list below after the following terminal command, which may be the source of the problem:

$ security find-identity -v

1) DF3E9EB66DDFD9464C9E9C8B7978C031DB5E7478 'iPhone Distribution: Smart Phone App Design Ltd (5T87Z3V53D)'

2) 65AB5C69BF03D8DCB98B468BDB075A69CA06C6FA 'iPhone Distribution: Smart Phone App Design Limited'

3) E8768633790130B0262C7F1E6AE3BB67BAEE1A93 'iPhone Developer: Gavin Norman (XKD25VK538)'

4) 24AD3C52FBA815EB890C0DC9423A8724780727D1 'iPhone Developer: Smart Phone App Design Limited (D4ECBYFEZX)'

5) 64A424D387BEFCF8C10C08D8358994A21517564E 'iPhone Distribution: Smart Phone App Design (H6**934YRM)'

6) C9C0B4B054B23DC0EA52C37ABC9517C50CFEA3C2 'iPhone Developer: Smart Phone App Design (ZP36FJ4Y5Z)'

7) 4F652CB23B920C831643D64B75A7184626F3F361 'iPhone Distribution: Gavin Norman (AJT88LS67C)'



I have even tried resigning from scratch using the following process:

$ unzip GN-GoPro.ipa


Remove the existing signature by going into the application folder

$ rm -rf ./Payload/GN-GoPro.app/_CodeSignature


Remove the existing provisioning profile and replace it with the one tied to the cert I'm signing with.

$ rm -rf ./Payload/GN-GoPro.app/embedded.mobileprovision

$ cp GoProAppDistnProvProfile.mobileprovision ./Payload/GN-GoPro.app/embedded.mobileprovision

Change the bundle identifier (in the example below to com.smartdesign.app7.resigned.gntest)

$ /usr/libexec/PlistBuddy -c 'Set :CFBundleIdentifier com.smartdesign.app7.resigned.gntest' ./Payload/GN-GoPro.app/Info.plist

Example


I use an entitlements.plist file when code signing even if the app requests no additional entitlements.

I grab the appname.xcent from a build, copy it somewhere and then modify it to contain the bundle id I'm resigning to and my in-house enterprise distribution team identifier.

Now resign the app...

$ /usr/bin/codesign -f -s 65AB5C69BF03D8DCB98B468BDB075A69CA06C6FA --entitlements entitlements.plist Payload/GN-GoPro.app

Payload/GN-GoPro.app: replacing existing signature

$ zip -qr GN-GoPro_resigned.ipa ./Payload


Codesign Mac Os

Using the above approach, the in-house enterprise apps resign, but fail to install unfortunately.

Anyone experienced with In-house enterprise distribution resigning, I would really appreciate your help?

Mac Codesign Command Line

Modifying this control will update this page automatically

Terminal User Guide

Use the inspector to view and manage running processes, quickly edit window titles and background colours, and more.

Send a command to a running process

  1. In the Terminal app on your Mac, select a window or tab.

  2. Choose Shell > Show Inspector.

  3. Select a process in the Running Processes list.

  4. Click the Action pop-up menu , then choose a command from Signal Process Group.

Change the profile used by the active window

  1. In the Terminal app on your Mac, select a window or tab.

  2. Choose Shell > Show Inspector.

  3. Click Profile, then select a profile.

Change window titles, background colour or size

Terminal Resign Codesign Mac App Examples

  1. In the Terminal app on your Mac, select a window or tab.

  2. Choose Shell > Show Inspector.

  3. Do any of the following:

    • Change the window title: Enter a title in the Window Title field.

    • Change the tab title: Enter a title in the Tab Title field.

    • Change the window size: Enter values in the Columns and Rows fields.

    • Change the background colour: Click the Background colour well, then choose a colour in the Colours window. If you want to revert to the original profile colour, click Restore Profile Colour in the Colours window.

See alsoUse profiles to change the look of Terminal windows on MacChange Profiles Text preferences in Terminal on MacChange Profiles Window preferences in Terminal on Mac