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

Adding new devices has become really complicated #20

Open
GregOriol opened this issue Dec 14, 2022 · 4 comments
Open

Adding new devices has become really complicated #20

GregOriol opened this issue Dec 14, 2022 · 4 comments

Comments

@GregOriol
Copy link
Contributor

Hi @andrealufino,

I'm keen to contribute when new devices are released, but today adding just 3 iPads was a really complicated task: there are changes to be made in 5 files and it's really hard to navigate, I've been mostly looking at "switch must be exhaustive" errors... to make it.

Couldn't this be made easier? Maybe one file containing all the specs could be enough and the rest like Mapper/Groups could be calculated from the attributes?

@andrealufino
Copy link
Owner

Hi @GregOriol. I guess you're right. There are too many things to touch in too many places. I will take a look at the code in the next days and come with an idea. Maybe yes, putting all the needed files together could be an idea.

@andrealufino
Copy link
Owner

A quick update to this issue to say I did not have time to work on this, it will take a longer than expected as it's a busy period. Will post more news on this as soon as I'll have some.

@andrealufino
Copy link
Owner

Hi @GregOriol. I've spent some time thinking how to make things easier, but honestly I had no revolutionary ideas on this. The way the library is structured is good to me and allows also to simulate a specific device in case of need. Also put some of the structs in the same file is not something that I particularly like.
I can think about writing a part of the Readme or a create a specific file in the repo with the steps to add new devices.

If you have different ideas I'm all ears :)

@GregOriol
Copy link
Contributor Author

Hi @andrealufino, I haven't really thought about it, but one idea (because we also use this kind of device information in many technologies, not only Deviice on iOS) could be to have a "device information file" like a CSV or JSON, that would be easier to read for a human and update, and then have a script to generate the actual swift structures used by the code?

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

No branches or pull requests

2 participants