Latest Flutter Plugin (1.7.6) Doesn't Build on iOS

We previously had some issues working with the 1.7.5 Flutter in app payments SDK. We upgraded to the latest version and it doesn’t build at all on iOS. Android isn’t a problem but we’re testing thoroughly just in case.

Flutter Version: 3.0.6.pre.7 channel master (although we upgraded to latest and same effect)
Dart: 2.19.0
MacBook Pro 2021
MacOS Monterey 12.6
M1 Pro

This is hugely problematic because the 1.7.5 version of the in app payments is preventing potential customers from adding cards as the verification step freezes…

Would be great to get some feedback on this asap!

Many thanks,
Peter

What errors are you getting when the build fails? :slightly_smiling_face:

Hey Bryan,

Firstly, want to correct the title. The ipa builds but crashes immediately. The below error is what is provided in the logs:

Library not loaded: @rpath/ThreeDS_SDK.framework/ThreeDS_SDK referenced from ..... SquareBuyerVerificationSDK

Our iOS developer then updated to the newest flutter version but had other issues. He reverted everything back and dropped down to 1.7.5 and it worked.

This stack overflow post is very similar to the problem we are seeing:

Thanks!

If you remove the framework and reinstall it does the build work? :slightly_smiling_face:

I’m not sure I follow entirely. The flutter plugin has all of the Square magic packaged away. We only add that specific entry to the pubspec.yaml and then we get the 1.7.x version of the in app payments.

The 1.7.5 version works as expected apart from the inabilty for certain users to add cards. This is why we have bumped up the version. Our app version with 1.7.5 is live on the App Store.

Thanks,
Peter

Hey Bryan, could you elaborate on the above? We’re still having trouble with this!

Thanks,
Peter

Hello, I am currently facing this situation any solution on how you can fix it?

1 Like

Same issue. Looks like flutter 3.x doesn’t supported…

Hey,

It definitely does work, it’s been a while since we got it working and I can’t remember what caused the issue I’m sorry to say. There was an issue with cards not adding properly on iOS due to the wrong callback being triggered but there’s a fix on github for this, we use a specific reference to this commit.

To double check, I’d create a brand new flutter project and then only add the Square Payments plugin. This will confirm it works.

I do have to admit that the flutter plugin needs some more rigorous testing from the Square team…

I updated flutter to last version and started to get this error
Can you clarify which one commit do you mean?

This is what we have in our pubspec.yaml

square_in_app_payments:
git:
url: GitHub - square/in-app-payments-flutter-plugin: Flutter Plugin for Square In-App Payments SDK
ref: 619d83bf9cb6d560d44829971192c9a0b82ec84f

I’m not the iOS dev in our team so I can’t offer much more advice I’m afraid. Did you try with a blank project?

Not yet. I’ll try adding a link to the commit, if that doesn’t fix the problem, I’ll try with an empty app.

Still getting error:(

(lldb) dyld[10418]: Library not loaded: @rpath/ThreeDS_SDK.framework/ThreeDS_SDK
  Referenced from: <0726CB86-4823-304F-8193-465C4B7818F1> /private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/SquareBuyerVerificationSDK.framework/SquareBuyerVerificationSDK
  Reason: tried: '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/preboot/Cryptexes/OS@rpath/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2), '/System/Library/Frameworks/ThreeDS_SDK.framework/ThreeDS_SDK' (errno=2, not in dyld cache)Library not loaded: @rpath/CorePaymentCard.framework/CorePaymentCard
  Referenced from: <3BDBDC68-0A8F-3D5D-8347-889E85906FC0> /private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/SquareInAppPaymentsSDK.framework/SquareInAppPaymentsSDK
  Reason: tried: '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/preboot/Cryptexes/OS@rpath/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/private/var/containers/Bundle/Application/8EFEFEBD-42D5-41B3-BE8C-1E6FBDCD64EF/Runner.app/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2), '/System/Library/Frameworks/CorePaymentCard.framework/CorePaymentCard' (errno=2, not in dyld cache)
* thread #1, stop reason = signal SIGABRT
    frame #0: 0x00000001c51b4ebc dyld`__abort_with_payload + 8
dyld`:
->  0x1c51b4ebc <+8>:  b.lo   0x1c51b4edc               ; <+40>
    0x1c51b4ec0 <+12>: pacibsp 
    0x1c51b4ec4 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1c51b4ec8 <+20>: mov    x29, sp
Target 0: (Runner) stopped.

Did you got same error?

Are the build scripts updated? :slight_smile:

It didn’t work for me either, I’m still getting the same error.


Translated Report (Full Report Below)

Incident Identifier: 1F1A2FFB-399E-4B66-973E-25CB4B97D300
CrashReporter Key: 85A50935-1763-54DE-36E9-464A49EB0CA1
Hardware Model: MacBookPro17,1
Process: Runner [73973]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/26831C8E-0E1A-480A-B31B-355794728BE4/data/Containers/Bundle/Application/E17E288E-B4EB-4204-A421-8AE5AAB2BE73/Runner.app/Runner
Identifier: com.shack15llc.shack15.v2
Version: 2.0.0 (1)
Code Type: X86-64 (Native)
Role: Foreground
Parent Process: launchd_sim [71440]
Coalition: com.apple.CoreSimulator.SimDevice.26831C8E-0E1A-480A-B31B-355794728BE4 [7998]
Responsible Process: SimulatorTrampoline [2767]

Date/Time: 2023-08-31 18:16:26.6783 +0000
Launch Time: 2023-08-31 18:16:24.2021 +0000
OS Version: macOS 13.5.1 (22G90)
Release Type: User
Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: DYLD 1 Library missing
Library not loaded: @rpath/ThreeDS_SDK.framework/ThreeDS_SDK
Referenced from: /Users/mac/Library/Developer/CoreSimulator/Devices/26831C8E-0E1A-480A-B31B-355794728BE4/data/Containers/Bundle/Application/E17E288E-B4EB-4204-A421-8AE5AAB2BE73/Runner.app/Frameworks/SquareBuyerVerificationSDK.framework/SquareBuyerVerificationSDK
Reason: tried: ‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK’ (no such file), ‘/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK’ (no such file, no dyld cache), ‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK’ (no such file), ‘/usr/lib/swift/ThreeDS_SDK.framework/ThreeDS_SDK’ (no such file, no dyld cache), '/Applicati
(terminated at launch; ignore backtrace)

Triggered by Thread: 0

Kindly share with me your findings when you get a solution. I will also do the same.

I resolve this issue when add code to the new script(in Xcode project) in step 3:

Hello, could I kindly get your email so you walk me through how you solved it, please? Or you can simply post the detailed steps you used in resolving it here please.

You’ll need to add another Build Phase to your project and add:

FRAMEWORKS="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
"${FRAMEWORKS}/SquareBuyerVerificationSDK.framework/setup"

:slight_smile:

Oh okay so that’s what you meant by adding a build phase, ohh okay I get it now. Initially, I wasn’t getting you.
I will try that this weekend and let you know the output, Thank you very much @Bryan-Square