Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add device class field for iOS #945

Merged
merged 1 commit into from
Nov 1, 2021
Merged

Add device class field for iOS #945

merged 1 commit into from
Nov 1, 2021

Conversation

Qusic
Copy link
Member

@Qusic Qusic commented Oct 25, 2021

Copy link
Contributor

@sid-dahiya sid-dahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good, but would recommend getting a sign-off from @eduardo-camacho as well as he's the resident iOS/Obj-C expert.

@@ -68,3 +68,19 @@
return std::string { [[[UIDevice currentDevice] systemVersion] UTF8String] };
}

std::string GetDeviceClass() {
#if TARGET_IPHONE_SIMULATOR
return "iOS.Emulator";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually Apple refers to this as "Simulator", not Emulator. Please change

#else
switch (UIDevice.currentDevice.userInterfaceIdiom) {
case UIUserInterfaceIdiomPhone:
return "iOS.Phone";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove "iOS." prefix, it's not actually needed since tablets, phones, TV and car are iOS only.

@@ -83,3 +83,6 @@
return GetDeviceOsVersion();
}

std::string GetDeviceClass() {
return {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set this as "Mac"

Copy link
Contributor

@eduardo-camacho eduardo-camacho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left few comments

@Qusic
Copy link
Member Author

Qusic commented Oct 28, 2021

Hi @eduardo-camacho
I am referring to the common schema spec here
the defined values for iOS are iOS.Emulator iOS.Phone iOS.Tablet iOS.Phablet iOS.AppleTV
and there are no values defined for mac yet.

@eduardo-camacho
Copy link
Contributor

Hi @eduardo-camacho I am referring to the common schema spec here the defined values for iOS are iOS.Emulator iOS.Phone iOS.Tablet iOS.Phablet iOS.AppleTV and there are no values defined for mac yet.

I don't agree with documented naming, but not much to do now if it was already defined that way before, let's not break backward compatibility. Approving.

@Qusic Qusic merged commit 18957ab into main Nov 1, 2021
@Qusic Qusic deleted the user/banl/deviceclass branch November 1, 2021 03:08
Qusic added a commit that referenced this pull request Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants