Opened on 02/16/2017 at 04:16:11 PM
Closed on 02/27/2017 at 09:23:53 AM
#4905 closed defect (fixed)
build.py 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): |
https://github.com/adblockplus/adblockplussafariios/pull/36 |
Description
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.
Environment
OSX build box
How to reproduce
- run build.py
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
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:6 Changed on 02/27/2017 at 09:20:22 AM by abpbot
Some commits referencing this issue have landed:
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 :)
Xcode8 changed the provisioning management quite some. Two of the changes are directly relevant to build.py:
The signing step in xcodebuild is essentially driven by just 4 values:
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.