klarna / klarna-mobile-sdk

Klarna Mobile SDK for iOS
https://docs.klarna.com/mobile-sdk/ios/
Apache License 2.0
29 stars 12 forks source link

Cannot install via Carthage #52

Closed MickeMakaron closed 4 years ago

MickeMakaron commented 4 years ago

I am trying to install the Klarna Mobile SDK for iOS with Carthage.

I have added github "klarna/klarna-mobile-sdk" to the Cartfile.

When I run carthage update klarna-mobile-sdk I get: *** Skipped building klarna-mobile-sdk due to the error: Dependency "klarna-mobile-sdk" has no shared framework schemes

Am I doing something wrong?

EDIT: As a workaround I was able to use binary "https://raw.githubusercontent.com/klarna/klarna-mobile-sdk/master/KlarnaMobileSDK.xcode-11.5-fat.json" in the Cartfile instead. This seems to successfully install the SDK.

polar133 commented 4 years ago

Hi @MickeMakaron. Thanks for the update. We need to update our docs to include how to install the SDK using Carthage, as you mentioned, it's via binary.

ChrisGarmanJD commented 4 years ago

You still need to update the instructions at https://developers.klarna.com/documentation/in-app/ios/getting-started

Please can you point me to the right instructions? I have just tried binary "https://raw.githubusercontent.com/klarna/klarna-mobile-sdk/master/KlarnaMobileSDK.xcode-12.1-fat.json" without any success.

polar133 commented 4 years ago

Hi @ChrisGarmanJD, yes. We still need to update our developer page, we are working on it since it will also include on how to use Swift Package Manager.

For the latest release, we drop the variant for Carthage and we are only building one version with ABI Stability. To use it just need to specify as:

binary "https://raw.githubusercontent.com/klarna/klarna-mobile-sdk/master/KlarnaMobileSDK.json"

Please give a try and let us know how did it go. As a side note, Carthage is having a lot of issues with Xcode 12, so if there are possibilities to migrate to cocoapods or swift package manager, we can guarantee a better integration.

ChrisGarmanJD commented 4 years ago

Hi Carlos,

Thanks for the quick reply - there is a simple script to workaround the lipo problem with carthage in Xcode 12 that works.

We can't switch to cocoapods, and are reviewing SPM. Can I add our vote to keeping carthage support please?

polar133 commented 4 years ago

Sure. We will keep supporting Carthage as long as we can.

We also used that script to build the framework, but since it's not "official", we try to just give the warning. In case that there are any issues with the SDK and Carthage, please, don't hesitate to contact us again. 👍

ChrisGarmanJD commented 4 years ago

Im running on Xcode 12.1 and am seeing this error trying to compile after successfully running carthage:

error: module compiled with Swift 5.1.3 cannot be imported by the Swift 5.3 compiler

Have you got a swift 5.3 binary to make available yet please?

polar133 commented 4 years ago

it's strange since we use Xcode 12.0.1 for that build and also we release as BUILD_LIBRARY_FOR_DISTRIBUTION so it should be available for all of them. Give me a couple minutes and will update the repo with a binary updated. thanks for the info.

polar133 commented 4 years ago

Please give a try again @ChrisGarmanJD.

ChrisGarmanJD commented 4 years ago

I'm up and running now. Thanks Carlos.