iOS Error: clang++ exited with code 1:

Jassim Al Rahma 26 Reputation points
2023-08-31T20:32:01.88+00:00

Hi,

Why i am suddenly getting this error:

Xamarin.Shared.Sdk.targets(3,3): Error: clang++ exited with code 1:
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_OSInAppMessage", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_OSInAppMessageClickEvent", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_OSInAppMessageClickResult", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_OSInAppMessageDidDismissEvent", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_OSInAppMessageDidDisplayEvent", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_OSInAppMessageTag", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_OSInAppMessageWillDismissEvent", referenced from:
      objc-class-ref in registrar.o
  "_OBJC_CLASS_$_OSInAppMessageWillDisplayEvent", referenced from:
      objc-class-ref 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)


How can I fix it please?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,813 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 25,521 Reputation points Microsoft Vendor
    2023-09-15T08:04:38.2166667+00:00

    Hello,

    I search for the OSInAppMessage, OSInAppMessageClickEvent methods from all the third-party libraries you used, the error is caused by the null reference in OneSignalSDK.DotNet SDK.

    And they list their GitHub Repo, you could get further help from them.

    (I saw there is a known issue in their issue list, third-party tools are not supported on Q&A)

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.