Closed fabricetayou closed 6 years ago
I will fork my copy and suggest the changes
What code snippet are you using?
Here is the sniped code which is called on init of the app..
Core.AppStatus.Device = new UserDevice
{
Id = Plugin.DeviceInfo.CrossDeviceInfo.Current.Id,
Manufacturer = Plugin.DeviceInfo.CrossDeviceInfo.Current.Manufacturer,
DeviceName = Plugin.DeviceInfo.CrossDeviceInfo.Current.DeviceName,
Model = Plugin.DeviceInfo.CrossDeviceInfo.Current.Model,
Idiom = Plugin.DeviceInfo.CrossDeviceInfo.Current.Idiom,
Platform = Plugin.DeviceInfo.CrossDeviceInfo.Current.Platform,
Version = Plugin.DeviceInfo.CrossDeviceInfo.Current.Version,
};
The Core.AppStatus.Device
is saved for further use. As I'm working on both my Mac and PC, yesterday I took a look at the test saved devices, it should be 4 but I saw 11. The "doublons" had the same name, the name of my MacBook : this is where my mistake come from.
As I am far from my PC I suggest you to wait for me to check that on the PC. My first idea is that the iPhone simulator change ID either on every boot either on data reset and gives the name of its host Mac as its own name.
NOTE
Before I create this issue entry I hadn't debugged the snipped code into my Mac. I just tried to debug it and share the values or screenshot, and I observed that the snipped was not executed in the Mac. I forced its execution by moving that in another place in the global code and got System.NotImplementedException
I just added a MacOS project and tested. In the screenshot you can see the Model issue.
You can close this issue. The System.NotImplementedException
exception that I got was from an old nuget version. It is a challenge to deal with VS for Mac :) ... sory
Thanks for your hard work
I have a Macbook Pro in which I tried to create a MacOS version of my app Every devices used are indexed by their Id which is supposed to be unique. For my Mac I got many different IDs
Ex. 5B5DDEA3-7B09-4D6B-XXXX-D42F1D84814D FA1E24F4-DCC5-4BA0-XXXX-D8B015C52EED 98FD8A6E-8F14-4F77-XXXX-C83EEA9DFCCC
(the xxxx are used to obfuscate the IDs in any case)
Bug Information
Version Number of Plugin: 3.1.0.57 Device Tested On: Mac Simulator Tested On:Real machine Version of VS: 2017 (15.5.3) Version of Xamarin: Versions of other things you are
PS. Also the Idiom gives Phone (3) and model is iPhone