Thread 1: EXC_BAD_ACCESS using bridge(ptr:context)

edited October 2020 in iOS

I'm running into issues using the bridge function provided
My goal is just to display the live accelerometer data in the user interface, the connection is successful and I can print the output to console, but I can't get the data into a variable outside the C callback function, Every example posted in the IOS repo uses the bridge(ptr:context!) function to access self. But mine always fails.

I'm using the newest version of everything, the project is brand new,
Xcode:Version 12.1 (12A7403)
IOS: 14.1


  • Have you been able to fix this?

  • Yes, but I'm still unsure what fixed it, I basically restarted the project and it worked.

  • Always make sure to keep Xcode updated. Also since we use a bridge between our C APIs and swift, sometimes it may take a minute for Xcode to process.

Sign In or Register to comment.