googleads / googleads-mobile-ios-examples

googleads-mobile-ios
Apache License 2.0
962 stars 808 forks source link

Google Mobile Ads SDK Causing Crash in iPad App Running on macOS #456

Open Charchoghlyan opened 2 months ago

Charchoghlyan commented 2 months ago

I am experiencing a crash in my iOS project when using the Google Mobile Ads SDK. The issue occurs specifically when running my iPad app on macOS (Mac Catalyst). Removing the Google Mobile Ads Swift Package Manager (SPM) dependency resolves the issue, but I need to continue using the SDK in my app on iOS/iPadOS.

Failed to look up symbolic reference at 0x1018991b1 - offset 754711 - symbol symbolic _____Sg 14MarketplaceKit14AppDistributorO in /private/var/folders/3p/*/

Xa69 commented 2 months ago

I’ll pick this up and give it a shot @Charchoghlyan

Charchoghlyan commented 2 months ago

@Xa69 thx, let me know if I can provide more info anything else

Xa69 commented 2 months ago

@Charchoghlyan from looking the issue up online it looks to be related to the SDK’s dependency on “MarketplaceKit” which is not available for MacOS due to which the app is crashing when run on the Mac Platform.

Reference Link : https://stackoverflow.com/questions/78808081/why-does-running-an-ios-app-through-macos-cause-failed-to-look-up-symbolic-refe

Please try using a downgraded version and see if it works, as per the suggestion in the link I attached downgrading the SDK version worked.

Also, if you see the Apple documentation I’ve linked below, MarketPlaceKit is only available for iOS and iPadOS right now Apple Documentation : https://developer.apple.com/documentation/marketplacekit

Was able to reproduce the issue on the Sample app provided by Google in this repository inside "googleads-mobile-ios-examples/Swift/admob/AppOpenExample" as well.

If you see the complete error message "Failed to look up symbolic reference at 0x1010ec149 - offset 311735 - symbol symbolic _____Sg 14MarketplaceKit14AppDistributorO in /private/var/folders/jq/mswtm58d0wqbpd0st342h2840000gp/X/4B690486-4C3B-5FEB-8B04-EFB469A1EC41/d/Wrapper/AppOpenExample.app/AppOpenExample”

Can confirm the issue you are seeing is due to MarketplaceKit which does not support MacOS yet.

Charchoghlyan commented 2 months ago

@Xa69 11.1.0 is okay I see only this Failed to look up symbolic reference at 0x1018991b1 - offset 754711 - symbol symbolic _____Sg 14MarketplaceKit14AppDistributorO in /private/var/folders/3p/*/

Xa69 commented 2 months ago

@Charchoghlyan Yes that is an expected error when you try to run it for MacOS as per my above comments, it's because MarketplaceKit is not supported for MacOS only iOS/iPadOS is supported as of now.

malandr2 commented 1 month ago

Hi @Charchoghlyan, try updating to SDK version 11.9.0, it's expected that should resolve your issue.

Charchoghlyan commented 1 month ago

Hi @malandr2 , okay, thx