iOS Troubleshooting
This document provides solutions to common issues encountered while loading GlamAR SDK output images in iOS integrations.
Common Issues and Solutions
Image URL Not Loading
If the API returns a delivery.pixelbin.io image URL but the image does not render, load the image with a URLRequest that sends an empty Referer request header.
guard let url = URL(string: imageUrl) else { return }
var request = URLRequest(url: url)
request.setValue("", forHTTPHeaderField: "Referer")
URLSession.shared.dataTask(with: request) { data, _, error in
guard
let data = data,
let image = UIImage(data: data),
error == nil
else {
return
}
DispatchQueue.main.async {
imageView.image = image
}
}.resume()
If you use an image loading library, use its request-header option to set Referer to an empty value. iOS image views do not support the browser-only referrerPolicy="no-referrer" prop.