I’m getting this issue now
dyld[4277]: Symbol not found: _NSStringFromCPCCardBrand
Referenced from: <9A94D6D0-6636-3BED-9341-B3906A292397> /private/var/containers/Bundle/Application/0114FD7F-F71D-43DF-8ED6-F1DD6DB41B1F/HappsNow Access.app/Frameworks/SquareMobilePaymentsSDK.framework/SquareMobilePaymentsSDK
Expected in: <002FE9CD-C7D1-3029-B67F-C8158164BAD1> /private/var/containers/Bundle/Application/0114FD7F-F71D-43DF-8ED6-F1DD6DB41B1F/HappsNow Access.app/Frameworks/CorePaymentCard.framework/CorePaymentCard
I’m not sure why it’s doing this. The app is old and we are migrating from MobilePaymentsSDK to the newer SquareMobilePaymentsSDK and I keep getting issues with it. My AI keeps telling me that the issue seems to be that it’s using an older version of CorePaymentCard, but I’m not sure why that would be the case.
When using lower versions 2.1.0 for example I get this issue
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CPCPaymentCard setSelectedApplication:]: unrecognized selector sent to instance 0x13294b780'
Edit: I have both SquareInAppPaymentsSDK (version 1.6.4) and SquareMobilePaymentsSDK (version ~> 2.1.0) in my Podfile. These two SDKs have conflicting CorePaymentCard.framework versions, which is causing the setSelectedApplication: method to not be found. This may be a problem. The SquareInAppPaymentsSDK hasn’t been updated since December 2024 and may not be using the same version.
Let me know if you have any advice on this. Its urgent we get this figured out
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Enable Apple Pay
Build on iOS
Build on iOS: In-App Payments SDK
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
The error you’re encountering, “Symbol not found: _NSStringFromCPCCardBrand,” suggests that there is a missing symbol in the SquareMobilePaymentsSDK framework, which is expected to be found in the CorePaymentCard framework. This typically occurs when there is a mismatch between the versions of the frameworks or when a required framework is not properly linked in your project.
Here are a few steps you can take to troubleshoot and resolve this issue:
-
Verify Framework Versions: Ensure that you are using compatible versions of the SquareMobilePaymentsSDK and CorePaymentCard frameworks. Check the documentation or release notes for any version compatibility requirements.
-
Check Framework Linking: Make sure that both the SquareMobilePaymentsSDK and CorePaymentCard frameworks are correctly linked in your Xcode project. You can do this by checking the “Linked Frameworks and Libraries” section in your project’s target settings.
-
Clean and Rebuild: Sometimes, Xcode caches can cause issues. Try cleaning your build folder (Product > Clean Build Folder) and then rebuilding your project.
-
Update Dependencies: If you are using a dependency manager like CocoaPods or Carthage, ensure that all dependencies are up to date. Run pod update
or carthage update
as appropriate.
-
Check for Deprecated APIs: Since you mentioned migrating from an older SDK, ensure that you are not using any deprecated APIs that might have been removed in the newer SDK version.
-
Review Migration Guide: If Square provides a migration guide for moving from MobilePaymentsSDK to SquareMobilePaymentsSDK, review it to ensure that all necessary changes have been made in your codebase.
If these steps do not resolve the issue, you may need to reach out to Square Developer Support for further assistance, as they can provide more specific guidance based on the details of your project and the SDK versions you are using.
This answer was reviewed by @Bryan-Square.