Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Response error. Publisher identifiers not found "ca-app-" Appended #32

Open
skytechltd opened this issue Jan 10, 2019 · 2 comments
Open

Comments

@skytechltd
Copy link

skytechltd commented Jan 10, 2019

I have an empty view controller project in iOS/Swift, after viewDidLoad() I have the following but get the error:
Error Domain=Consent Code=1 "Response error. Publisher identifiers not found: ca-app-pub-MYID"

Obs. I have my own ID and admobID inserted. Can't seem to find why/where 'ca-pub-' is prepended? And if this is whats causing the error???

        PACConsentInformation.sharedInstance.consentStatus = PACConsentStatus.unknown
        PACConsentInformation.sharedInstance.requestConsentInfoUpdate(forPublisherIdentifiers: ["pub-MYID"]){
        
        (_ error: Error?) -> Void in
        if let error = error {
            // Consent info update failed.
            print(error)
        } else {
            // Consent info update succeeded. The shared PACConsentInformation instance has been updated.
            if PACConsentInformation.sharedInstance.consentStatus == PACConsentStatus.unknown {
                
                guard let privacyUrl = URL(string: "MYURL"),
                    let form = PACConsentForm(applicationPrivacyPolicyURL: privacyUrl) else {
                        print("incorrect privacy URL.")
                        return
                }
                form.shouldOfferPersonalizedAds = true
                form.shouldOfferNonPersonalizedAds = true
                form.shouldOfferAdFree = true
                
                form.load {(_ error: Error?) -> Void in
                    print("Load complete.")
                    if let error = error {
                        // Handle error.
                        print("Error loading form: \(error.localizedDescription)")
                    } else {
                        
                        form.present(from: self) { (error, userPrefersAdFree) in
                            
                            if error != nil {
                                // Handle error.
                            } else if userPrefersAdFree {
                                // User prefers to use a paid version of the app.
                                
                                
                                //buy the pro Version
                            }
                        }
                    }
                }
            }
        }
    }
@hannojg
Copy link

hannojg commented Dec 28, 2021

This module calls an API, that looks like this:

https://adservice.google.com/getconfig/pubvendors?es=2&plat=ios&v=1.0.5&pubs=pub-XXXXXXXXX

You can insert your pub id to try it out. As you can see from the response the ca-app appendix is added automatically, in that terms, there is nothing going wrong.

I have zero knowledge about the google ad service, just reconstructed that from the source code as I get the same error as you. Still investigating.

@hannojg
Copy link

hannojg commented Dec 28, 2021

It seems that in admob under Privacy & messaging you have to activate this consent collection.

Screenshot 2021-12-28 at 2 33 46 PM

// EDIT: I added a consent form in admob, but I still get the same error. Hm.
// EDIT 2: Okay, it seems that our admob account is just not verified yet. Will try again once verified.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants