Okay, so I've got Cosmoem in my Moon version. I wanted to know before I level it too much, if I go through my Moone portal into the Sun version, and evolved Cosmoem there, would it evolve into Solgaleo? Or is the only way to get Solgaleo is to trade it to someone who bought Sun and have them evolve it?
The only way to get Solgaleo in Pokemon Moon is by trading so no, Cosmoem won't evolve into Solgaleo in in the Sun Portal in Moon. It will evolve into Lunala in Moon. Same goes for Rockruff ---> Lycanroc. But you can get the other Lycanroc forme in the wild. Lycanroc Midday Forme in Daytime, Lycanroc Midnight Forme in Nighttime.
Hope this helps :)