Posts

Showing posts with the label Sudoku-app dev

Ads not showing and debugging

Image
This project was based on below environment. Expo bare project ( npx expo prebuild ) with template TypeScript. expo: 54.0.23 react-native: 0.81.5 react-native-google-mobile-ads: 16.0.0 Suddenly Ads were not working! Yesterday they were all fine, all ads were showing correctly. But now Banner area empty, rewarded ads not loaded (if not loaded, gray inactivated button)  I didn't change anything from yesterday. No package added, no coding editied, it was same as before, but just 1day after, it's not working. I have banner, interstitial, rewarded ads but they all are not showing. The first thing I tried was making bare project again. Simply erase android, ios folder and make it again with expo prebuild. $ rm -rf android ios $ npx expo prebuild $ npx expo start:android Ads still not showing. So this time I tried to wipe data in simulator and even delete the simulator and made it again. Not working. I started to doubt about some AdMob server error, since I heard rec...

Rewarded Ads logic and debugging

Image
  This writing is about how I make some logic to show the correct hint in Sudoku after watching Google AdMob rewarded ads. The project is based on expo bare project with package, react-native-google-mobile-ads. This project was based on below environment. Expo bare project ( npx expo prebuild ) with template TypeScript. expo: 54.0.23 react-native: 0.81.5 react-native-google-mobile-ads: 16.0.0 What I was trying to achieve is that in the hint modal, if I touch the WATCH AD button, it shows rewarded ads from Google AdMob. After watching it, hint modal should be closed automatically and 1 hidden sudoku number should appear in random as a reward. The first challenge that I encounter was that the reward action was not carried out at the first ads watch. From the second ads watch reward action was carried out well, but not the first one. After several trial and error I found that it was because when reward action function was called it referred old status of the function so first reward w...