CMWaterSubmersionManager

8 results found

Post not yet marked as solved
0 Replies
325 Views
Hi all, I am trying to build an app which, on support Apple Watch's (currently just the Ultra's), will detect when the watch has been submerged and will start to report temperature from the sensor. I have followed the developer articles I could find around CMWaterSubmersionManager and have set up a simple class to interact with it. It is now that I want to run my app and test if it is working as I expect it to etc. However I noticed that the waterSubmersionAvailable is only set to true on physical Apple Watch Ultra and Ultra 2. This is rather inconvenient as it means that for the next week or so while developing this feature I will have to stick my arm wearing the watch into a container of water to test the feature. Just wondering if there is any easier way to debug this stuff that anyone has figured out? It would be ideal if this could just be done in the simulator similar to how other device conditions can be induced. I did notice the Enable Easy Submersion option in the Debug menu, however I could
Posted
by
Post not yet marked as solved
0 Replies
637 Views
Good day, Fist I have to be honest. I was not developing for iOS for years, while I wanted to get back to if for quite some time. I started looking into CMWaterSubmresionManager documentation and I simply couldn't make it work. Then I got back to iOS basics to refresh my knowledge. I remembered and learned quite a few things, but still after hours and hours of trying and following various similar other Manager use. I still am not able to make any sense how to get CMWaterSubmresionManager delegate to work. My goal is very very simple - new Xcode project for watchOS app, witch companion app, which would allow me to capture info like water temperature, time underwater etc. I went through the documentation and did set all the prerequisites, like added authorisation for motion data, extended runtime session etc as per documentation: https://developer.apple.com/documentation/coremotion/accessing_submersion_data funny enough tried to start monitoring for data in the view. Obviously could set submersionManager.delega
Posted
by
Post not yet marked as solved
3 Replies
Thanks for the reply, your probably correct about the CMWaterSubmersionManager but the NSMotionUsageDescription entitlement is used for other features under Core Motion so I should still be able to add that entitlement shouldn't I?
Post not yet marked as solved
6 Replies
Was anyone able access CMWaterSubmersionManager? I keep getting Error 110(which is CMErrorNotEntitled) on my physical Apple Watch Ultra. Is there entitlement required for WaterSubmersionManager?
Post not yet marked as solved
3 Replies
You've definitely got some provisioning problems here, but they might all stem from the fact that CMWaterSubmersionManager cannot be used without an entitlement, and that entitlement isn't available to developers yet. Information on how to request the entitlement to read temperature and pressure should be available soon. Once you've got that entitlement, the usage description string goes in the Info.plist file. :-)
Post marked as solved
3 Replies
I've got to the bottom of my problem. I'd added the Health Capability and my mistake was to add the NSMotionUsageDescription to the entitlements files that adding the capability created. I should have added it to the pList section in build settings. Once i did this I received the authorisation request on the watch which allowed me to authorise motion data usage. Now when the CMWaterSubmersionManager is queried for the authorisation status it reports authorised.
Post not yet marked as solved
2 Replies
987 Views
Following https://developer.apple.com/documentation/coremotion/accessing_submersion_data I'm trying to just get it started. I have a provisioning profile with the Shallow Depth and Pressure active, I have set the com.apple.developer.submerged-depth-and-pressure to true in the entitlements file, and get no errors or warning when compiling and starting the app on my Apple Watch Ultra. When my view appears, I init the submersion manager with the following code: guard CMWaterSubmersionManager.waterSubmersionAvailable else { return } submersionManager = CMWaterSubmersionManager() submersionManager?.delegate = self Logger.shared.info(SubmersionManager initialized) I get the printout SubmersionManager initialized, but then I get: An error occurred: The operation couldn’t be completed. (CMErrorDomain error 110.) Googling this error tells me this error means: CMErrorNotEntitled And I cannot find WHY the app is not entitled.. I find no information that this entitlement is not publicly available or anything.
Posted
by
Post marked as solved
3 Replies
1.4k Views
Hi , I'm using Xcode 14 to develop a watch app for Apple Watch Ultra. One of the things I want it to do is read the water temperature and maybe wearers temperature. I think I need the NSMotionUsageDescription entitlement in order to access the water temperature. I deduced this from the crash that occurs when the app tries to use the CMWaterSubmersionManager. So i've added the NSMotionUsageDescription entitlement to the Entitlements file but when the automatic signing process fails with the error Automatic signing failed. Xcode failed to provision this target. Please file a bug report at https://feedbackassistant.apple.com and include the Update Signing report from the Report navigator. and Provisioning profile iOS Team Provisioning Profile: * doesn't include the NSMotionUsageDescription entitlement. I think the first error is causing the second but I'm not sure. I'm experienced software engineer but this is my first mobile app so I'm very much a newbie to Apple development. Any help with resolving th
Posted
by