Opened 3 years ago

Closed 3 years ago

#5657 closed change (fixed)

Create a build script to strip simulator slices from frameworks built by Carthage to use when creating an archive for distribution

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

Description (last modified by dzhang)


The app store does not accept simulator slices (i386, x86_64) in frameworks.

Dynamic frameworks are copied into an ipa with all slices intact, whereas static frameworks are compiled in.

The solution is to strip simulator slices from dynamic frameworks.

Why not use Carthage’s copy frameworks? It slows down every single build unnecessarily - it has been reported to slow down CI.

As an example, running the following before producing an archive for distribution accomplishes the stripping as needed for a single framework (in this case, YAJL):

$ lipo -remove i386 -output yajl.framework/yajl yajl.framework/yajl
$ lipo -remove x86_64 -output yajl.framework/yajl yajl.framework/yajl

What to change

Create a script that can be run before producing an archive that performs the needed stripping of frameworks built by Carthage. The script should not have to run for any other build.

Change History (4)

comment:1 Changed 3 years ago by dzhang

  • Description modified (diff)

comment:2 Changed 3 years ago by dzhang

  • Owner set to dzhang

comment:3 Changed 3 years ago by dzhang

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

comment:4 Changed 3 years ago by dzhang

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.