sentry-unity: Exporting to iOS project failed to build

Environment

How do you use Sentry? Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)

SaaS

Which version of the SDK?

0.19.0

How did you install the package? (Git-URL, Assetstore)

Git-URL

Which version of Unity?

2021.1.25f1

Is this happening in Unity (editor) or on a player like Android, iOS, Windows?

Error only occurs in iOS project, we can not build the exported project, if remove Sentry, everything works fine; Unity editor works as expected, exported Android Project works too. We are not aiming for other platforms.

Steps to Reproduce

  1. Setup Sentry followed by documentation;
  2. Export iOS project to an existing iOS project (replace);
  3. Build the iOS project in xCode as usual;

Expected Result

Build pass and everything works.

Actual Result

Failed when build iOS project:

ld: warning: object file (/Users/Clover/Desktop/_/ios_exported/Libraries/lib_burst_generated.a(lib_burst_generated_part_0_merged.o)) was built for newer iOS version (15.2) than being linked (11.0)
ld: warning: object file (/Users/Clover/Desktop/_/ios_exported/Libraries/lib_burst_generated.a(lib_burst_generated_part_4.o)) was built for newer iOS version (15.2) than being linked (11.0)
ld: warning: object file (/Users/Clover/Desktop/_/ios_exported/Libraries/lib_burst_generated.a(lib_burst_generated_part_1.o)) was built for newer iOS version (15.2) than being linked (11.0)
ld: warning: object file (/Users/Clover/Desktop/_/ios_exported/Libraries/lib_burst_generated.a(lib_burst_generated_part_3.o)) was built for newer iOS version (15.2) than being linked (11.0)
ld: warning: object file (/Users/Clover/Desktop/_/ios_exported/Libraries/lib_burst_generated.a(lib_burst_generated_part_2.o)) was built for newer iOS version (15.2) than being linked (11.0)
ld: warning: object file (/Users/Clover/Desktop/_/ios_exported/Libraries/lib_burst_generated.a(lib_burst_generated_part_0.o)) was built for newer iOS version (15.2) than being linked (11.0)
Undefined symbols for architecture arm64:
  "__NSNumberOrNil", referenced from:
      ___SentryNativeBridgeWriteScope_block_invoke in SentryNativeBridge.o
  "__NSBoolOrNil", referenced from:
      ___SentryNativeBridgeWriteScope_block_invoke in SentryNativeBridge.o
  "__NSStringOrNil", referenced from:
      ___SentryNativeBridgeWriteScope_block_invoke in SentryNativeBridge.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

I don’t understand how this is considered completed. It’s a blocker for us to be able to take this update on our project. The solution proposed here seems more of a workaround for a developer to hand edit Sentry’s il2cpp generated code and ultimately may not work.

I fumbled my communication here a bit. I originally assumed that this issue was related to the Unity project being embedded within an iOS app. But based on your additional information I could reproduce the issue and we merged a PR containing the fix in https://github.com/getsentry/sentry-unity/pull/932. It will be part of the next release.