Calling NavigationLink via a Function

I want to make a system that you can only play the game a certain number of times and then you have to watch an advertisement to be allowed to play again a number of times. So now I want to use the function to check if someone clicks on the game, whether they are still allowed to play or whether they have to watch an advertisement first. If they are allowed to play then I want them to continue to the game via a navigation link. Does anyone have any idea how to do this?

What is your reasoning behind wanting to display advertisements to the user?

As an observation, if you are doing that as a potential revenue stream for yourself then you are going to be disappointed. The per view payment from advertisers is a pittance and unless you have 1,000’s of users who play your App, my advice is not to go down that path. For the most part, my experience with game App’s is that those that throw up advertisements periodically get deleted pretty quickly. It is not a good user experience.

@Chris_Parker Thank you for your detailed answer! That was very helpful! I’m new in the mobile app world, so I don’t know what works and what doesn’t. Which revenue stream do you prefer?

Many do free with consumable or non-consumable in app purchases, or free with renewable subscriptions

Because yes with ads, you don’t make a lot of money unless you have thousands of users

1 Like