[Vision Pro Support] visionOS related changes in OneDS SDK
Describe your environment. Apple Vision Pro simulator in Xcode Version 15.2 beta (15C5500c)
Steps to reproduce. Run the code in the Apple Vision Pro simulator in Xcode Version 15.2 beta (15C5500c) Apple Vision Pro related informations are not populated properly
| DeviceInfo_OsName | DeviceInfo_Model | DeviceInfo_Make | DeviceInfo_OsBuild |
|---|---|---|---|
| iOS | RealityDevice14,1 | Apple |
DeviceInfo_OsName - Should be visionOS
DeviceInfo_OsBuild - Not populated
Not sure if any other details are missing.
What is the expected behavior? All the VisionOS errors/warning if present should be fixed. Vision OS related details should be populated properly.
@lalitb When can we have this fix?
@nishchith-cp Sorry for the late reply. Our Observability team doesn't have the necessary bandwidth to support VisionOS for now. We will discuss with @eduardo-camacho during the next community meeting if their team can help on this. But changes are in general straightforward, and if you would like to contribute, we can help you with guidance and review.
@lalitb Could you please check with @eduardo-camacho for the same for help on this. It would be great if we can just the DeviceInfo_OsName details correctly for now.
@lalitb Any updates on this?
@nishchith-cp - Yes this was discussed yesterday. @eduardo-camacho suggested using the DeviceInfo.OsVersion to identify visionOS. The OS name would remain the same, however the version would be the actual version of visionOS on the device.
Also, the core C++ SDK provides the SemanticContext method to override the OsName -
virtual void ISemanticContext::SetOsName(const std::string &x)
{
SetCommonField(COMMONFIELDS_OS_NAME, x);
};
This method is implemented for Java, but not for obj-c. The obj-c binding can be created for this in ODWSemanticContext.mm as below:
-(void)setOsName:(nonnull NSString*)osName
{
std::string strOsName = std::string([osName UTF8String]);
_wrappedSemanticContext->SetAppExperimentIds(strOsName);
}
And then in the application code:
#include "TargetConditionals.h"
#if defined(TARGET_OS_XR) && TARGET_OS_XR
[self setOsName:@"visionOS"];
#elif defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
[self setOsName:@"iOS"];
#elif defined(TARGET_OS_MAC) && TARGET_OS_MAC
[self setOsName:@"MacOSX"];
#else
[self setOsName:@"UnknownApple"];
#endif
cc @absaroj and @eduardo-camacho just in case there is a better way.
@lalitb Device_OsVersion just gives the os versions and not much information. It would be hard to track as the new OS versions as for the dashboards.
For the suggested changes, when can we expect the SDK release?
For the suggested changes, when can we expect the SDK release?
As I mentioned earlier, we can help with guidance and reviews if someone would like to contribute to the changes. Or else, please raise a dependency ask with us to prioritize.
@nishchith-cp Just wondering if you plan to add this support?
@lalitb Caught up with some priority items. Will take up once I am done with them. Was facing some issue with the setup as well. Thanks
@lalitb @eduardo-camacho What is the recommended value that is expected for DeviceInfo_OsName?
For Android, the value is Android and for iphone and ipads, I see the values being populated as iOS itself.
For iPad we have iPadOS and iPhones we have iOS values as per Apple.
We are driving schema enforcement for the telemetry columns, and we were looking into a column that will differentiate the 2 platforms. And we are thinking of using DeviceInfo_OsName to group iOS and Android. If we start sending iPadOS and VisionOS here, the dashboards will break since the extra values for VisionOS will start flowing in.
What is the recommendation here? We should have 1 column to group the platforms and may be a separate column for the Sub OS categories.