I discovered the following comment in a relevant discussion: https://developer.apple.com/forums/thread/761323?answerId=827607022#827607022
By using the storeId, we were able to successfully retrieve the cookies.
async function getAllCookies(name, url) {
const stores = await browser.cookies.getAllCookieStores();
var cookies = []
for (const store of stores) {
const cookieOfStore = await browser.cookies.getAll({ name, url, storeId: store.id });
cookies.push(...cookieOfStore);
}
return cookies;
}
await getAllCookies("geo", "https://apple.com");
Topic:
Safari & Web
SubTopic:
General
Tags: