sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Compiler Error with Xcode 16 Beta 6

Open dehlen opened this issue 1 year ago • 5 comments

Platform

iOS

Environment

Other

Installed

CocoaPods

Version

8.34.0

Xcode Version

16.0 Beta 6

Did it work on previous versions?

No issues in Xcode Version 15.4 (15F31d)

Steps to Reproduce

  1. Compile App with sentry-cocoa
  2. Build Issues in Sentry target in the Pods project

Expected Result

No compiler errors

Actual Result

Build throws multiple errors:

Image

Are you willing to submit a PR?

No response

dehlen avatar Aug 26 '24 09:08 dehlen

Hello @dehlen, thanks for reaching out. I was unable to reproduce this. Do you know if your project has any specific setup?

Could you try to reproduce this in a new project?

brustolin avatar Aug 26 '24 12:08 brustolin

Nothing too fancy I am aware of. We have a bridging header which includes this line:

#import <Sentry/Sentry.h>

Also the build issues do not occur with Xcode 15.4 only using Xcode 16.

dehlen avatar Aug 26 '24 12:08 dehlen

Oh and also we are using Sentry via react-native-sentry here are the important lines from Podfile which states we are using 8.34.0:

- RNSentry (5.30.0):
    - hermes-engine
    - React-Core
    - React-hermes
    - Sentry/HybridSDK (= 8.34.0)

dehlen avatar Aug 26 '24 12:08 dehlen

@krystofwoldrich, can you give this a try on a RN sample?

brustolin avatar Aug 26 '24 12:08 brustolin

I just did.

  1. Created a new project via npx @react-native-community/cli init
  2. Added sentry dependency to the package.json
  3. Ran yarn, bundle install, bundle exec pod install
  4. Opened xcworkspace with Xcode 16 Beta 6 I am receiving the same build errors with this template project.

dehlen avatar Aug 26 '24 12:08 dehlen

Do you think it makes sense to forward this to the react-native-sentry repository? As it is a problem with Xcode and the error seems to be happening compiling the Sentry framework for me I thought it would be best to open this issue here. However if you think it might be related to the react-native-sentry SDK I can duplicate this issue in the other repo.

dehlen avatar Sep 02 '24 12:09 dehlen

I removed derived data, did another sentry update and rebuild my project and now it seems to be working 🤷‍♂️ Sorry for the time you invested in this. I could reproduce the issue. Not sure what ultimately fixed it but it seems Xcode just had some invalid caches causing it to build unsuccessfully.

dehlen avatar Sep 02 '24 13:09 dehlen

Thanks for the update @dehlen!!

brustolin avatar Sep 02 '24 14:09 brustolin