react-native-admob-native-ads icon indicating copy to clipboard operation
react-native-admob-native-ads copied to clipboard

M1 build fails

Open rogerkerse opened this issue 3 years ago • 16 comments

Building latest master or 0.5.0 to iOS Simulator fails:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GADFBNetworkExtras", referenced from:
      objc-class-ref in libreact-native-admob-native-ads.a(RNGADNativeView.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

rogerkerse avatar Feb 07 '22 08:02 rogerkerse

Came across this as well, try running this in your ios directory:

pod deintegrate

arch -x86_64 pod install --repo-update

Then try building for iOS again

michaeldadi avatar Feb 09 '22 05:02 michaeldadi

Building latest master or 0.5.0 to iOS Simulator fails:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GADFBNetworkExtras", referenced from:
      objc-class-ref in libreact-native-admob-native-ads.a(RNGADNativeView.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@rogerkerse have you found the solution?

haresh4d avatar Mar 23 '22 11:03 haresh4d

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_GADFBNetworkExtras", referenced from: objc-class-ref in libreact-native-admob-native-ads.a(RNGADNativeView.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Getting this error no matter what I do. Please suggest any solution for this.

haresh4d avatar Mar 24 '22 03:03 haresh4d

I have confirmed that the error only comes when you run on simulator. In real device there is no problem. @ammarahm-ed can you please help?

haresh4d avatar Apr 01 '22 09:04 haresh4d

Please give some solution. I am unable to run apps on simulator and its very difficult to develop with real device. Please.

haresh4d avatar Apr 18 '22 11:04 haresh4d

Its been a month I am finding the sollution for this but I am unable to build on simulator. I have lots of dependency on this library as I am using it on more than 20 apps. Please @ammarahm-ed @rogerkerse If you have any suggestion or solution please let me know. I am using Xcode 13.3.1 and tried the latest react-native version also but nothing works.

haresh4d avatar Apr 23 '22 03:04 haresh4d

Check my gist, I might help https://gist.github.com/ildfreelancer/c161628115e590749599ceb6e623125c

ildfreelancer avatar May 11 '22 17:05 ildfreelancer

Check my gist, I might help https://gist.github.com/ildfreelancer/c161628115e590749599ceb6e623125c

Tried this. But I am also using @react-native-admob/admob for interstitial ads. If I apply this workaround it says RNAdmob.modulemap is not found and the build fails immediately.

haresh4d avatar May 17 '22 03:05 haresh4d

Is there any solution for this?

haresh4d avatar May 18 '22 02:05 haresh4d

I don't have a M1 to test and fix this.

ammarahm-ed avatar May 22 '22 12:05 ammarahm-ed

Are you using facebook mediation @haresh4d? Check docs for the installation guide and add facebook mediation sdk in podfile. then try again.

ammarahm-ed avatar May 22 '22 12:05 ammarahm-ed

@haresh4d If you have AnyDesk, we can connect there and I can debug this probably on your PC.

ammarahm-ed avatar May 22 '22 12:05 ammarahm-ed

@ammarahm-ed Yes, I have AnyDesk let me know whenever its suitable to you.

haresh4d avatar May 24 '22 10:05 haresh4d

@ammarahm-ed any progress? Can you please debug on my M1?

haresh4d avatar Jun 03 '22 13:06 haresh4d

Finally, I was able to run my app on Simulator by not using @react-native-admob/admob and replacing it with react-native-google-mobile-ads

haresh4d avatar Jun 06 '22 03:06 haresh4d

6.9.0.1

after donwgrading I have these issues

Showing Recent Messages Undefined symbol: OBJC_CLASS$_GADAdLoader

Showing Recent Messages Undefined symbol: OBJC_CLASS$_GADMultipleAdsAdLoaderOptions

Showing Recent Messages Undefined symbol: OBJC_METACLASS$_GADNativeAdView

Showing Recent Messages Undefined symbol: OBJC_CLASS$_GADCustomEventExtras

Showing Recent Messages Undefined symbol: _GADSimulatorID

Showing Recent Messages Undefined symbol: OBJC_CLASS$_GADCustomEventExtras

Showing Recent Messages Undefined symbol: OBJC_CLASS$_GADNativeAdMediaAdLoaderOptions

Showing Recent Messages Undefined symbol: OBJC_CLASS$_GADNativeAdViewAdOptions

zoobibackups avatar Aug 27 '22 17:08 zoobibackups