Skip to content

Instantly share code, notes, and snippets.

@m9tdev
Created September 2, 2024 19:03
Show Gist options
  • Select an option

  • Save m9tdev/f26b50bf3b4966b7e6b1218e29686037 to your computer and use it in GitHub Desktop.

Select an option

Save m9tdev/f26b50bf3b4966b7e6b1218e29686037 to your computer and use it in GitHub Desktop.
React Native Google Mobile Ads Patch
diff --git a/node_modules/react-native-google-mobile-ads/ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.mm b/node_modules/react-native-google-mobile-ads/ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.mm
index 7fc1d42..c9afe28 100644
--- a/node_modules/react-native-google-mobile-ads/ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.mm
+++ b/node_modules/react-native-google-mobile-ads/ios/RNGoogleMobileAds/RNGoogleMobileAdsModule.mm
@@ -21,9 +21,9 @@
#import <React/RCTUtils.h>
#import "RNGoogleMobileAdsModule.h"
-#ifdef RCT_NEW_ARCH_ENABLED
-#import "RNGoogleMobileAdsSpec.h"
-#endif
+// #ifdef RCT_NEW_ARCH_ENABLED
+// #import "RNGoogleMobileAdsSpec.h"
+// #endif
#import "common/RNSharedUtils.h"
@implementation RNGoogleMobileAdsModule
@m9tdev
Copy link
Author

m9tdev commented Sep 2, 2024

Place in ./patches/ and set scripts.postinstall like this in package.json:

{
...
  "scripts": {
...
    "postinstall": "patch-package && npx sort-package-json",
...
  }
...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment