Accessibility Id for Appium IOS

I add for button accessibility ID by code
and in appium UI app source the ID Is displayed in name attribute
and accessibilityId is null
How can I add Id by code

You can access the element’s ID via it’s name attribute. It is pretty much the same handle.

Both code blocks above should reference the same element(s)

For further information: