When trying to set a custom prebid server, I always get the following error:
Fatal error: 'try!' expression unexpectedly raised an error: PrebidMobile.ErrorCode.prebidServerURLInvalid("https://example.com")
I have followed the steps from the official docs, but I am always getting the same error message, no matter what URL I am using.
When looking at the root of this problem, I see that in the Pods -> PrebidMobile -> core -> Host file, there's a verifyUrl method that contains the following line of code:
return UIApplication.shared.canOpenURL(url)
This line is causing the error to be thrown, because of the canOpenURL method returning false.
After thoroughly reading the Apple docs regarding this function, I still don't understand why it returns false when using regular URL, like https://example.com
Describe the bug
When trying to set a custom prebid server, I always get the following error:
Fatal error: 'try!' expression unexpectedly raised an error: PrebidMobile.ErrorCode.prebidServerURLInvalid("https://example.com")
I have followed the steps from the official docs, but I am always getting the same error message, no matter what URL I am using.
When looking at the root of this problem, I see that in the
Pods -> PrebidMobile -> core -> Host
file, there's averifyUrl
method that contains the following line of code:return UIApplication.shared.canOpenURL(url)
This line is causing the error to be thrown, because of the
canOpenURL
method returning false.After thoroughly reading the Apple docs regarding this function, I still don't understand why it returns false when using regular URL, like
https://example.com
To Reproduce
Expected behavior
A successful connection to my self-hosted prebid server.
Desktop:
Smartphone: