webkit.messageHandlers not working on iPad

Summarize the problem

I registered my iOS app on the App Store, but it was rejected.
Basically it works fine on iPhone.
But I’ve heard that there is a feature that doesn’t work properly on the iPad.
The app partially has a webview.
In my tests, it didn’t work on iPads (15.2, 15.1). It may not work on older versions as well.
Calling webkit.messageHandlers from webview not working

Describe what you’ve tried

At the beginning of the project we developed using modern JavaScript syntax.
However, the import/export syntax in iOS version 14.2 caused problems and fixed code compatibility issues with webpack.
I haven’t tried the solution because I can’t figure out why iPhones and iPads behave differently.

My Code

import { checkAndroid, checkIos } from "../../js/utils/index.js";

const step1El = document.querySelector("#step1");
const step2El = document.querySelector("#step2");
const btnEl = document.querySelector("button");

btnEl.onclick = function () {
  if (!step1El.checked)
    return alert("블록체인 간편인증 서비스 이용약관에 동의해주세요");
  if (!step2El.checked)
    return alert("개인정보 수집 및 이용 동의서에 동의해주세요");

  if (checkAndroid()) window.Android.agree();
  if (checkIos()) webkit.messageHandlers.agree.postMessage(""); // not working on iPad
};

document.querySelector(".tos_btn").onclick = () => {
  if (checkAndroid()) window.Android.goTermsConditions(true);
  if (checkIos()) webkit.messageHandlers.goTermsConditions.postMessage(true); // not working on iPad
};
document.querySelector(".policy_btn").onclick = () => {
  if (checkAndroid()) window.Android.goCollectionAgreement();
  if (checkIos()) webkit.messageHandlers.goCollectionAgreement.postMessage(""); // not working on iPad
};