checkout / frames-ios

Frames iOS: making native card payments simple

Home Page:https://www.checkout.com/docs/integrate/sdks/ios-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation issue using Swift Package Manager and v3.4.3

harryblam opened this issue · comments

Describe the bug
I'm seeing a compilation issue using Swift Package Manager after updating to v3.4.3.

To Reproduce
Steps to reproduce the behavior:

  1. pull down v3.4.3
  2. Go to build, see below build error

Screenshots
Screenshot 2021-08-09 at 17 04 45

Hi @harryblam

Just tried the same and I am not been able to reproduce the issue. Can you please let us know what version iOS & xcode you are trying to build with ?

see below reference.

Screenshot 2021-08-09 at 16 40 33

Screenshot 2021-08-10 at 09 48 29

Hi @harryblam

Just tried the same and I am not been able to reproduce the issue. Can you please let us know what version iOS & xcode you are trying to build with ?

see below reference.

Screenshot 2021-08-09 at 16 40 33 Screenshot 2021-08-10 at 09 48 29

Hi @deepesh-vasthimal-cko ,

I'm using Xcode 12.5.1 building onto a Simulator running iOS 14.5

Hi @harryblam
Just tried the same and I am not been able to reproduce the issue. Can you please let us know what version iOS & xcode you are trying to build with ?
see below reference.
Screenshot 2021-08-09 at 16 40 33
Screenshot 2021-08-10 at 09 48 29

Hi @deepesh-vasthimal-cko ,

I'm using Xcode 12.5.1 building onto a Simulator running iOS 14.5

Thanks @harryblam. Can you also please let us know what are the details steps you used to configure the SDK. Would really help to reproduce the issue.

Hello Team, I am also facing similar issue from past few days, it was working fine before. I am using this plugin in my flutter project.

Error:CheckoutAPIClient.swift:3:8: error: no such module 'CheckoutEventLoggerKit'

Please help

Hi @deepesh-vasthimal-cko , i'll put some more detailed steps below with some screenshots of what i'm seeing.

In terms of configuring the SDK, we're following closely the CardViewController steps as defined in the README (however this is irrelevant as the compile error is happening within the Frames module).

I haven't had the time to create a new project and try this in a clean environment, but i'm simply saying that upgrading the package is not working for me.

Thanks.

Steps

  1. Quit Xcode, clean derived data
  2. Open Xcode, open project file, click into the Swift packages
  3. Remove current Frames reference, add a new Frame package pointing at v3.4.3 (as in below screenshot)

Screenshot 2021-08-16 at 17 17 50

4. Resolve packages and build project 5. Observe compilation error (as below in screenshot)

Screenshot 2021-08-16 at 17 46 12

@deepesh-vasthimal-cko I've realised that the build is succeeding for me when building for iOS device (arm64), and it's failing when building for simulator.

Hope that helps you in debugging further.

Hi @harryblam Thanks for the details, Can you please help me answer a few queries for me.

  1. What version of SPM Frames you were previously using before migrating to 3.4.3 ?
  2. Can you also please check if you have added the i386 architecture in your build settings? if so please can you remove it and try again to see if the build succeeds ?
  3. Can you please reset package caches and try again ?
  4. Can you please confirm the Swift package dependencies loaded in your xcode is as similar to below screen shot along with version numbers of each dependency ?

Screenshot 2021-08-16 at 21 41 14

Also I did tried if on a fresh project using xcode 12.5.1 and simulator and everything seems to be working fine for me. See below.

Screenshot 2021-08-16 at 21 34 16

Thanks
Deepesh

Hi @deepesh-vasthimal-cko, this is on my list, I will look into rebuilding to try and reproduce the issue sometime this week!

I can confirm quickly now though, that:

  1. I was using frames version 3.4.1.
  2. I cannot see any specific i386 architecture in my build settings
  3. I did clear derived data (which resets the caches) last time. I can check again though.
  4. I can confirm the packages were exactly the versions that you mention here yes.

@harryblam Dont bother on above, I am able to replicate this now. This happens when you try to build the frames SDK in release mode on simulator. For time being you could run the release mode on device and perform the testing / development unless the simulator is required to do something specific on release mode. Since we are now able to reproduce this we will plan for a fix in our next releases.

Screenshot 2021-08-23 at 12 49 18

@deepesh-vasthimal-cko we've added the architecture settings outlined in the readme as we are using SPM however we are still getting the following error when running our tests. The app builds and tests run & pass it just fails right at the end.

No such module 'CheckoutEventLoggerKit'

@deepesh-vasthimal-cko we've added the architecture settings outlined in the readme as we are using SPM however we are still getting the following error when running our tests. The app builds and tests run & pass it just fails right at the end.

No such module 'CheckoutEventLoggerKit'

Hi @joshgare This is something which we are currently working on and hopefully should be fixed in our next release.

@deepesh-vasthimal-cko @harry-brown-cko I've updated to the new release from a few days ago that is supposed to fix this issue but our tests are still breaking with the same error.

image

Are there any other changes we need to make?

Hi @joshgare Thanks for raising this.

I have just tested a new sample app integration with SPM and tried to run both on release and debug modes. I am able to generate the token successfully without any issues. Attached is the sample project.

Can you please let us know what are you exactly doing with your test target etc or if you can replicate the issue in the sample project attached I have attached. Can you Please send it back to us for further investigation with your changes made to it.

TestFramesSPM.zip

@deepesh-vasthimal-cko do we need to remove i386 from the excluded architectures now that this PR has gone through?

As for testing it runs on Circle CI using fastlane run_tests command nothing particularly unusual.

@joshgare you don't need to remove anything from you project set up now with respect to i386. Just refer my test project I attached on my previous comment.