All quotes from https://en.wikipedia.org/wiki/Visa_policy_of_Svalbard:
Everybody may live and work in Svalbard indefinitely regardless of country of citizenship. The Svalbard Treaty grants treaty nationals equal right of abode as Norwegian nationals. Non-treaty nationals may live and work indefinitely visa-free as well.
"It has been a chosen policy so far that we haven't made any difference between the treaty citizens and those from outside the treaty"
Grounds for exclusion include lack of means of support, and violation of laws or regulations.
So, the Svalbard Treaty appears pretty irrelevant. Everybody may live in Svalbard, as long as they have means of support and don't violate any local laws.
However, travelers who have a visa requirement to enter mainland Norway/the Schengen area must have a Schengen visa if they travel via mainland Norway/the Schengen area. This must be a double-entry visa so they can return to mainland Norway/the Schengen area.
If you find a way to travel to Svalbard avoiding the Schengen area, then you don't need any specific visa whatsoever. In practice however, most flights to Longyearbyen originate from Oslo and Tromsø. Even with a direct connection from a non-Schengen country, as an Iranian citizen, you need at least a transit visa unless exempted for some reason. Tromsø doesn't offer any direct non-Schengen connections, so the only realistic approach there would be via Oslo, for example Tehran - İstanbul - Oslo - Longyearbyen. Most other routes would probably require you do get a full Schengen visa; and it's possible you may need a full Schengen visa anyway (see comments).
Other options are very limited; possibly the occasional cargo ship from Murmansk being one of the few options that do not require traversing the Schengen area. Iranian citizens do not require or can easily obtain a visa for Russia.