IOS Native 브릿지 함수 서비스 비동기 다건 동시 호출 문제 확인 > IOS 구조적 문제
ex) AOS의 경우, 터널이 여러개라 동시 다건 응답 정상
반면, IOS의 경우, 터널이 한 개뿐이라 동시 다건 요청 시, 한개만 응답 정상, 나머지는 undefined
- check-list
- mobile web 개발 환경
- axios를 통한 다른 도메인 서버 로그인 처리가 필요한 API 호출
- domain에 대한 Cookie 정보는 Native에서 관리
- damain 개발계 외부망(LTE) 방화벽 확인 완료
this.cookieStr = this.getNativeCookie();
this.userAgentStr = this.getNativeUserAgent();
const headers = {
'Content-Type': 'application/json;charset=UTF-8',
Cookie: this.cookieStr,
'User-Agent': this.userAgentStr,
};
createAxiosInstance(withCredentials = false, headers = {}) {
const instance = this.$axios.create({
withCredentials,
headers,
}
return instance;
}
let response;
const baseURL = 'https://devwww.pjh.com';
const param = { svId: 'selMemDvC', mbNo : '999999' };
if (commonUtil.isMobileApp()) {
// 모바일 앱 : Native에서 관리하는 Cookie 정보 header 전달 > 로그인 처리
const axiosInstance = this.createAxiosInstance(true, headers);
response = await axiosInstance.$post(baseURL, param);
} else {
// 로컬 브라우저 : 개발계 임시 로그인 처리 서비스 호출 > 로그인 처리 > 다른 서비스 호출
reponse = await this.$axios.$post(baseURL, param);
}
return response;