card-io / card.io-iOS-source

The open-source code for the card.io-iOS-SDK: provides fast, easy credit card scanning in mobile apps
Other
686 stars 369 forks source link

Update CardIO and CardIO-static build architectures to Standard. #64

Open hadibadjian opened 8 years ago

hadibadjian commented 8 years ago

This is to avoid build issues using different SDKs (iphoneos and iphonesimulator).

bluk commented 8 years ago

Can you be more specific about the build error that you encountered?

The reason why ARCHS_STANDARD isn't used is because we would lose the armv7s support out of the box. While A6(X) processors (iPhone 5/iPad 4) are probably an overall tiny minority and they should be able to use the armv7 generated code, some other dependent apps/libraries may encounter build trouble if armv7s is dropped by default. If anyone has thoughts around this, please leave a comment.

Also, we can probably just delete the lines from https://github.com/card-io/card.io-iOS-source/blob/master/build_configs/CardIO_Static_Library.xcconfig#L7 and https://github.com/card-io/card.io-iOS-source/blob/master/build_configs/CardIO_Framework.xcconfig#L7 .

hadibadjian commented 8 years ago

I think the problem is the limitation of the supported architectures when the build is targeting the iPhone simulator SDK using the following build settings (in Debug build configuration):

    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    PLATFORM_NAME = iphonesimulator
    SDKROOT = iphonesimulator9.2

I am trying to find a way that would not affect CardIO's supported architectures. I tried to modify the build config to build only for active architecture but no luck yet.

I will investigate more and update this Pull Request accordingly.