We have an app that takes data from the accelerometer of the iPhone and watchOS. Some updates ago we included the high-frequency accelerometer for the watchOS with the CMBatchedSensorManager framework.
We didn't test our app on iOS 16 or 15 devices, where that framework is unavailable, because the update was just for watchOS. We refer to that class just on a shared class, and was wrapped with an #if os(watchOS) condition.
In our iPhone app, we import the CoreMotion framework but CMBatchedSensorManager is not used.
Now, when you run the app on a device with iOS 15 you find this issue: dyld[17071]:
Symbol not found: (OBJC_CLASS$_CMBatchedSensorManager) Referenced from: '/private/var/containers/Bundle/Application/C3CC754F-1674-4CBD-AD83-93229DDCF38D/Spleeft.app/Spleeft' Expected in: '/System/Library/Frameworks/CoreMotion.framework/CoreMotion'
We need a solution to keep running our app on devices with iOS 15.0
Are you sure you used the #if os(watchOS)
condition everywhere you use CMBatchedSensorManager
? I'm pretty sure that it should've removed all references.
Do you use the shared class somewhere in your iOS code? Maybe that's part of the issue - perhaps a method of that class that you use on iOS uses the CMBatchedSensorManager
.