cpp_client_telemetry icon indicating copy to clipboard operation
cpp_client_telemetry copied to clipboard

[Vision Pro Support] visionOS related changes in OneDS SDK

Open nishchith-cp opened this issue 2 years ago • 11 comments

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.

nishchith-cp avatar Dec 29 '23 05:12 nishchith-cp

@lalitb When can we have this fix?

nishchith-cp avatar Feb 08 '24 05:02 nishchith-cp

@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 avatar Feb 08 '24 07:02 lalitb

@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.

nishchith-cp avatar Feb 09 '24 05:02 nishchith-cp

@lalitb Any updates on this?

nishchith-cp avatar Feb 14 '24 04:02 nishchith-cp

@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.

lalitb avatar Feb 14 '24 15:02 lalitb

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 avatar Feb 14 '24 16:02 lalitb

@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?

nishchith-cp avatar Feb 16 '24 04:02 nishchith-cp

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.

lalitb avatar Feb 16 '24 06:02 lalitb

@nishchith-cp Just wondering if you plan to add this support?

lalitb avatar Apr 25 '24 20:04 lalitb

@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

nishchith-cp avatar Apr 26 '24 05:04 nishchith-cp

@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.

nishchith-cp avatar Jun 10 '24 04:06 nishchith-cp