microsoft / plcrashreporter

Reliable, open-source crash reporting for iOS, macOS and tvOS
Other
2.88k stars 537 forks source link

The `OS Version` in crash report is not correctly #235

Closed tamwei closed 2 years ago

tamwei commented 2 years ago

Description

The OS Version was 'iPhone OS 15.4' , What we expect is iPadOS 15.4.
1650953112

I think Maybe this part of the code needs to add the type for iPadOS.

Details

  1. Which SDK version are you using? 1.10.1
  2. Which OS version did you experience the issue on? iPadOS 15.4
  3. What device version did you see this error on? Were you using an emulator or a physical device? iPad Mini 6
  4. What language are you using?
    • [x] Objective C
    • [ ] Swift
AnatolyPristensky commented 2 years ago

Hello @tamwei! Could you please explain the case where these changes are nessesary? From our side we can say that these changes could cause a lot of back compatibility issues (eg: iPadOS has been introduced only from iPadOS 13, and before iPadOS it was an iOS and we are supporting reports starting from iOS9) and the chain of other changes which are not obvious at this moment. As far as we can see - at this moment report contains all needful information (Hardware model and OS version allows to detect device definitely).

tamwei commented 2 years ago

sorry, I didn't expect this update to be complicated.

I found that some users' iPads are using iOS, such as iOS 13.6.1.
And some users' iPads are using iPadOS. While OS version is always iPhone OS. In this case, I can't accurately get the system of the user's iPad from Hardware model and OS version.

That's why I made this request.

Is it possible to add a field to get the systemName of the device?

AnatolyPristensky commented 2 years ago

@tamwei could you please explain on how this can be?

I found that some users' iPads are using iOS, such as iOS 13.6.1. And some users' iPads are using iPadOS.

iPad's running at 13.6.1 are actually running at iPadOS. It can't run iOS as the 13.6.1 version for iPad's can be only iPadOS. From 13 version it's two separate Operating Systems, iOS for iPhone's and iPadOS for iPad's.

tamwei commented 2 years ago

Thank you for your reply.

When I run this code on the iPad Mini4 with os 14.6, and I get systemName is 'iOS'. NSString *name = [UIDevice currentDevice].systemName; Does this mean that even though the systemName is iOS, it is actually running on iPadOS?

AnatolyPristensky commented 2 years ago

According to post at the StackOverflow NSString *name = [UIDevice currentDevice].systemName output have iOS for all versions below 15, but yes, even though the systemName is iOS, it is actually an iPadOS, as I said previously - iPadOS was introduced from 13 version.

tamwei commented 2 years ago

You are right! I get the md5 of UIKit use by iPad ( ~/Library/Developer/Xcode/iOS DeviceSupport/14.6 (18F72)/Symbols/System/Library/AccessibilityBundles/UIKit.axbundle/UIKit) : a715414a1545575e63745660d1cb0afb And I downloaded the ipsw files for iPadOS 14.6_18F72 and iOS 14.6_18F72.

the md5 of UIKit(iOS 14.6_18F72(arm64)) : c3dd1d542c6812fbeffdee7b7fed4099 the md5 of UIKit(iPadOS 14.6_18F72(arm64)) : a715414a1545575e63745660d1cb0afb

Thank you for reply!