SDK Overrides SwiftUI App’s Custom AccentColor

22 views
Skip to first unread message

Peter

unread,
Nov 4, 2024, 4:00:49 PMNov 4
to Google Mobile Ads SDK Developers
Hi everyone,

I’m experiencing an issue with the Swift SDK in my SwiftUI project where the app’s custom accent color is somehow overridden or ignored after the SDK has been added to the project.

Description of the Issue:

In Xcode, I’ve set a custom accent color using the AccentColor property in the asset catalog. This color is used as the primary accent color across my SwiftUI views. However, after integrating the Google AdMob SDK, the app no longer respects this custom color setting. Instead, the accent color reverts to the default blue, regardless of what’s set in the asset catalog.

Reproduction Steps:
  1. Set a custom accent color in the asset catalog under AccentColor.
  2. Build and run the app to verify the custom color appears as intended across views.
  3. Integrate the Google AdMob SDK by following the official setup instructions.
  4. Build and run the app again.

After integrating the SDK, the accent color reverts to the default blue, ignoring the custom color.

Has anyone else experienced this issue, or found a way to ensure the app’s custom accent color is respected with the AdMob SDK?

Thanks in advance!

Mobile Ads SDK Forum Advisor

unread,
Nov 5, 2024, 8:21:12 AMNov 5
to coderex...@gmail.com, google-adm...@googlegroups.com

Hi Peter,

Thank you for contacting the Mobile Ads SDK support team. 

The issue about accent color is because by default, your accent color applies to all views and controls in your app that use a tint color, unless you override the color for a specific subset of the view hierarchy. However, you might want to incorporate the accent color into other parts of your user interface that don’t rely on a tint color, like static text elements. 

Can you please confirm if the mentioned issue is replicating in our SwiftUIDemo application? If yes, Kindly provide the below details privately for further investigation so that we can check your implementation debug and may provide the solution: 

  • SDK version being used
  • Sample project reproducing the issue
  • Video recording of the issue (If possible)

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002vGi7mQAC&entry.80707362=00274326

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGi7m:ref" (ADR-00274326)

Thanks,
 
Google Logo Mobile Ads SDK Team


Mobile Ads SDK Forum Advisor

unread,
Dec 1, 2024, 10:03:15 PM (12 hours ago) Dec 1
to coderex...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for getting back to us.

We are in the process of following up with the team regarding your inquiry. Once we receive any updates, we will intimate you. Meanwhile, your patience is important.  

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGi7m:ref" (ADR-00274326)

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5 



Reply all
Reply to author
Forward
0 new messages