React Native Expo

ukson·2024년 11월 25일
0

trouble shooting

목록 보기
3/4
post-thumbnail

react-native과 expo를 사용해서 eas build를 하고나니
앱에서 http로 api 요청을 보내서 network fail이 발생하였다.

이를 해결하려고 app.json에 아래와 같이 설정해주었는데

"plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "usesCleartextTraffic": true
          },
          "ios": {
            "infoPlist": {
              "NSAppTransportSecurity": {
                "NSAllowsArbitraryLoads": true
              }
            }
          }
        }
      ]
    ],
    

아무리 빌드해봐도 info.plist에 적용이 안된다...

알고보니 해결법은 간단했는데,,,

{ "expo":{
	"ios": {
    	"supportsTablet": true,
        "infoPlist": {
        	"NSappTransportSecurity": {
            	"NSAllowsArbitraryLoads": true
                }
         }
     }
  }
}

이렇게 ios 부분에 직접 적어주니 ATS를 비활성화 시킬 수 있었다.

담부턴 그냥 swift로 개발할래...

profile
one step further

0개의 댓글