xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.42k stars 507 forks source link

iOS Binding Library Errors: Undefined symbols for Architecture arm64 (also x86_64) #20673

Closed PureWeen closed 3 weeks ago

PureWeen commented 1 month ago

Issue moved from dotnet/maui#22770


From @BrandanN21 on Friday, May 31, 2024 7:39:28 PM

Description

I am working to get the Stripe iOS SDK available to work with maui in order to support Apple Pay using Stripe and am having trouble getting the project to build erroring out on an unsupported symbols error sometimes for arm64 and others for the x86_64 architecture.

I have followed Microsoft Documentation for migrating from xamarin -> maui using native iOS bindings and consistently get this error. Has anyone done this before with Stripe? Or am I missing something with the setup and referencing of the native library?

iOS Binding Library csproj: Screenshot 2024-05-31 at 2 33 30 PM

Maui csproj reference: Screenshot 2024-05-31 at 2 34 45 PM

Steps to Reproduce

  1. Create MAUI app
  2. Create iOS Binding Library
  3. Add Native Framework (Stripe)
  4. Add Api Definitions / StructsAndEnums
  5. Reference the dll in MAUI
  6. Use classes from the Library
  7. Run app agains iOS simulators OR Physical device
  8. see errors

Link to public reproduction project repository

No response

Version with bug

8.0.10 SR3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No work arounds found

Relevant log output

Undefined symbols for architecture arm64:
      "_OBJC_CLASS_$_STPAPIClient", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPAddCardViewController", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPAddress", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPApplePayPaymentOption", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPBankAccount", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPBankAccountParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCard", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCardParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCardValidator", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPConnectAccountParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCoreScrollViewController", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCoreTableViewController", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCoreViewController", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCustomer", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCustomerContext", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPCustomerDeserializer", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPFile", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPImageLibrary", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPLegalEntityParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentActivityIndicatorView", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentCardTextField", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentConfiguration", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentContext", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentIntent", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentIntentAction", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentIntentActionRedirectToURL", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentIntentParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethod", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodAddress", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodBillingDetails", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodCard", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodCardChecks", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodCardParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodCardPresent", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodCardWallet", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodCardWalletMasterpass", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodCardWalletVisaCheckout", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodThreeDSecureUsage", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodiDEAL", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentMethodiDEALParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentOptionsViewController", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPaymentResult", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPPersonParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPShippingAddressViewController", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPSource", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPSourceCardDetails", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPSourceOwner", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPSourceParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPSourceReceiver", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPSourceRedirect", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPSourceSEPADebitDetails", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPSourceVerification", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPTheme", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPToken", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPUserInformation", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_STPVerificationParams", referenced from:
           in registrar.o
      "_OBJC_CLASS_$_Stripe", referenced from:
           in registrar.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
PureWeen commented 1 month ago

Issue moved from dotnet/maui#22770


From @github-actions[bot] on Friday, May 31, 2024 7:39:51 PM

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

BrandanN21 commented 3 weeks ago

I was able to figure out the issue I was having with the bindings. My references to my framework binding dll was incorrect! This issue can be closed.

rolfbjarne commented 3 weeks ago

Thanks for letting us know!