Carthage: Add Option for ignoring architecture i386

Created on 20 Feb 2017  ·  9Comments  ·  Source: Carthage/Carthage

  • carthage version: 0.19.1
  • xcodebuild -version: 8.2
  • Are you using --no-build? no
  • Are you using --no-use-binaries? no
  • Are you using --use-submodules? no

More and more SDKs provide by third-party vendor is removed that architecture.
But using Carthage to build it will crash

question

Most helpful comment

You should be able to setup your framework target like this:

2017-03-08 0 35 11

Then the output will be:

$ xcodebuild -showBuildSettings -scheme Result-iOS -sdk iphonesimulator | grep ARCHS
    ARCHS = x86_64
    ARCHS_STANDARD = i386 x86_64
    ARCHS_STANDARD_32_64_BIT = i386 x86_64
    ARCHS_STANDARD_32_BIT = i386
    ARCHS_STANDARD_64_BIT = x86_64
    ARCHS_STANDARD_INCLUDING_64_BIT = i386 x86_64
    ARCHS_UNIVERSAL_IPHONE_OS = i386 x86_64
    VALID_ARCHS = x86_64

All 9 comments

Can you point to an example SDK that crashes?

The situation is that:
I wrap a static library such as libSomething.a in to a framework target written in swift.
Because that static library only contain armv7 x86_64 arm64, no i386
when build this repo --no-skip-current with Carthage
will stop lacking i386

It'll be much easier for someone to fix this if you can point to an example project.

But it's a trend that, more and more third-party will drop i386, QQ come first

image

The latest SDK, already remove i386.

Looks like you should remove i386 from VALID_ARCHS build setting in your framework target.

image

Does $(ARCHS_STANDARD) contains i386?

See the differences between the two of the followings:

$ xcodebuild -showBuildSettings -scheme Result-iOS -sdk iphoneos | grep ARCHS
    ARCHS = armv7 arm64
    ARCHS_STANDARD = armv7 arm64
    ARCHS_STANDARD_32_64_BIT = armv7 arm64
    ARCHS_STANDARD_32_BIT = armv7
    ARCHS_STANDARD_64_BIT = arm64
    ARCHS_STANDARD_INCLUDING_64_BIT = armv7 arm64
    ARCHS_UNIVERSAL_IPHONE_OS = armv7 arm64
    VALID_ARCHS = arm64 armv7 armv7s
$ xcodebuild -showBuildSettings -scheme Result-iOS -sdk iphonesimulator | grep ARCHS
    ARCHS = i386 x86_64
    ARCHS_STANDARD = i386 x86_64
    ARCHS_STANDARD_32_64_BIT = i386 x86_64
    ARCHS_STANDARD_32_BIT = i386
    ARCHS_STANDARD_64_BIT = x86_64
    ARCHS_STANDARD_INCLUDING_64_BIT = i386 x86_64
    ARCHS_UNIVERSAL_IPHONE_OS = i386 x86_64
    VALID_ARCHS = i386 x86_64

You should be able to setup your framework target like this:

2017-03-08 0 35 11

Then the output will be:

$ xcodebuild -showBuildSettings -scheme Result-iOS -sdk iphonesimulator | grep ARCHS
    ARCHS = x86_64
    ARCHS_STANDARD = i386 x86_64
    ARCHS_STANDARD_32_64_BIT = i386 x86_64
    ARCHS_STANDARD_32_BIT = i386
    ARCHS_STANDARD_64_BIT = x86_64
    ARCHS_STANDARD_INCLUDING_64_BIT = i386 x86_64
    ARCHS_UNIVERSAL_IPHONE_OS = i386 x86_64
    VALID_ARCHS = x86_64

Thanks,that helps a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josercc picture josercc  ·  3Comments

abbeyjackson picture abbeyjackson  ·  3Comments

faustperic picture faustperic  ·  3Comments

3lvis picture 3lvis  ·  3Comments

mdiep picture mdiep  ·  3Comments