Was it a random encounter? Soft-resetted starters/legendaries/gift pokemon? Hatched? SOS-chained?
Of course, (spoilers for who haven't cleared the game yet)
Battling that one NPC in the 4th island pokemon center with a shiny Exeggcute
I haven't tried SOS-chaining yet, but since it's gotten a lot easier to hatch eggs, I'm currently using the Masuda Method to be safe. I'm paranoid about meeting shinies in the wild because they always seem to faint... Hopefully, I can get one within the next three boxes of eggs.
Very early this morning, I entered Resolution Cave to collect Zygarde pieces and the first encounter happened to be a shiny Dugtrio. Wasn't exactly well prepared, since I was working on some level evolutions at the time. Let it be known that using a Sylveon and a Marowak was not the best idea. It was a rough fight, but hey, I did catch her in the end. And I decided to come back later to complete the Zygarde quest.
On a non-Shiny note...
about 12 hours later, after I went back to pick up my last Zygarde cell, I got Pokérus after catching a Barboach on the way out of Poni Meadow. Sure has been a lucky day for me!
I got a shiny Rockruff from SOSing, an Abra while breeding for synchronizers, an Eevee while breeding for Eeveelutions, another Eevee while SOSing to try and fine a wild Espeon (never found one), a Riolu (my dream shiny) from SOSing, an A-Grimer while SOSing, and a Klefki from a random encounter. Although the Klefki was after I got the shiny charm so I'm not sure if it counts as purely random.
Reminds me of TheKingNappy's LP. He discovers the Seaward Cave hidden in MeleMele meadow and makes an offhand comment that he'll probably only encounter Zubats and Digletts . . . not five seconds later his first encounter is a shiny Alolan Diglett.
As for me, no Gen 7 shinies yet, but I already beat the odds by contracting wild Pokerus.
Yesterday, after 91 encounters searching for a Bagon AFTER I started counting (who knows how many encounters I had before I started counting) I found one. Just a normal Bagon, I was just trying to find one so it would call upon a Salamence.
So I started stalling it, when PUFF! A shiny Bagon appeared, on turn 8.
I recorded it with a (look-a-like) Go-Pro, because I wanted to see how long it would take me to find a Salamence. Then I found that, and I'm happy. Here is my reaction if anyone is interested: View: https://www.youtube.com/watch?v=lVBALcTs03A
Also, about the Salamence: just captured a level 10 Salamence. It doesn't have the best nature, but, who cares; got it on a Beast Ball, it was holding a Dragon Fang, and has 31 IVs on Special Attack, Attack, Defense and Speed. Amazing.