When your app starts, simply allow or disallow permission.
I’m not sure where you got stuck by the problem, so it’s hard to give you any advice. I hope you installed Appium and all dependencies and got the test project run successfully. For anything else, please be more specific.