Opened on 02/16/2017 at 04:16:11 PM

Closed on 02/27/2017 at 09:23:53 AM

#4905 closed defect (fixed) script failing

Reported by: pavelz Assignee:
Priority: Unknown Milestone:
Module: Adblock-Plus-for-iOS/macOS Keywords:
Cc: fhd, mario Blocked By:
Blocking: Platform: iOS
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):


This ticket is a re-creation of #4650 which already had a pull request attached, but meanwhile got completely obsoleted by further Xcode8 reengineering of code signing process. The reengineering was so radical that it warrants a new issue where the changes are explained and a new pull request created. Previous issue and pull request will be closed.


OSX build box

How to reproduce

  1. run

Observed behaviour

Build fails on missing libpods and consequently also missing eligible signing assets

Expected behaviour

Build is successful and signed

Attachments (0)

Change History (7)

comment:1 Changed on 02/17/2017 at 01:08:40 PM by pavelz

Xcode8 changed the provisioning management quite some. Two of the changes are directly relevant to

  1. provisioning profiles are not referenced by UUID anymore. Config key PROVISIONING_PROFILE is obsoleted. For referencing specific provisioning profiles there is a new key PROVISIONING_PROFILE_SPECIFIER with value of the profile's symbolic text name. But Xcode8 does not expect the users to need this normally anymore (see point 2)
  2. the preferred method of provisioning configuration is through clicking a new God Checkbox "Automatically manage signing". It cannot be used for ABP: it does not expect that a single project would want to sign with multiple development teams. ABP has one team for devbuilds (enterprise) and another for release (appstore). So ABP must not use automatism.

The signing step in xcodebuild is essentially driven by just 4 values:

    • e.g. org.adblockplus.AdblockPlusSafari
  • DEVELOPMENT_TEAM the short team code
    • e.g. GRYYZR985A
  • CODE_SIGN_IDENTITY certificate type, holder name, and optionally the team id again
    • e.g. iPhone Distribution: Eyeo GmbH (GRYYZR985A)
  • PROVISIONING_PROFILE_SPECIFIER the new reference to profile by name
    • e.g. Adblock Plus Extension App Store (without quotes!)

These are normally scattered throughout pbxproj, separated by targets and schemes. There is a better way to do it: xcconfig file, which is essentially a listing of pbxproj values, assignable to targets and schemes centrally. Writing a value in xcconfig and assigning the xcconfig to a target has the same effect as modifying the value in the huge project file editor for that specific target.

The advantage is ultimate: contrary to obscure format of the huge UUID-filled pbxproj, xcconfig is just a simple key-value file, in editability and comprehension comparable to a shell script. Scheme/target specific configuration can be removed from the shell script.

So the patch introduces 4 separate xcconfigs: for devbuild vs. release, and for adblock main app vs. extension. All values which are now in xcconfig were removed from pbxproj, wherever it was specified explicitly. Xcode project editor is so clever that it immediately shows the values drawn from xcconfig instead, so its validity can be verified. It should show the same value, obviously.

SAD DISCLAIMER: assignment of xcconfigs to schemes/targets is hijacked by CocoaPods. Pod is detecting whether Pods xcconfigs are assigned to the project, and is refusing to continue building if it finds some other xcconfig. For that reason, only global level xcconfig could be assigned to AdblockPlus target. xcconfigs for Extension target cannot be applied, so the values in relevant xcconfigs are still configured also in pbxproj. This duplication can be removed once ABP drops CocoaPods integration.

Last edited on 02/17/2017 at 01:12:17 PM by pavelz

comment:2 Changed on 02/17/2017 at 01:09:07 PM by pavelz

  • Cc fhd added

comment:3 Changed on 02/17/2017 at 01:11:06 PM by pavelz

comment:4 Changed on 02/17/2017 at 01:11:29 PM by mario

  • Cc mario added

comment:5 Changed on 02/27/2017 at 08:29:47 AM by fhd

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:7 Changed on 02/27/2017 at 09:23:53 AM by fhd

  • Resolution set to fixed
  • Status changed from reviewing to closed

Build works again :)

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
Note: See TracTickets for help on using tickets.