Im trying to integrate Apples Music Kit into the app. But at auth in build version i get redirected to a browser tab. From there the app does not collect anything from session and i can’t get dev token. I tried use InAppBrowser package to override window.open to be in in app browser but there is no use in it. Inside apple’s script i found out that script creates a form via document.createElement(“form”)
ServiceSetupView.prototype._buildFormElement = function (e, t, r) {
void 0 === t && (t = this.target), void 0 === r && (r = this.developerToken);
var i = document.createElement("form");
i.setAttribute("method", "post"), i.setAttribute("action", e), i.setAttribute("target", t), i.style.display = "none";
var n = document.createElement("input");
n.setAttribute("name", "jwtToken"), n.setAttribute("value", r), i.appendChild(n);
var o = document.createElement("input");
o.setAttribute("name", "isWebPlayer"), o.setAttribute("value", "true"), i.appendChild(o);
var a = document.createElement("input");
return a.setAttribute("name", "LogoURL"), a.setAttribute("value", "test"), i.appendChild(a), i
}
I tried to replace
i.setAttribute("target", t)
with
i.setAttribute("target", "_self")
and it did work in dev env when app launches in browser but on native build it still opens a system browser
If someone had such issue before and can help it would be great. Thanks!