RN

RN & expo 배포

fullfish 2023. 11. 30. 13:37

app.json에

  "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "compileSdkVersion": 33, // 안드로이드 버전 13이상으로 맞춰줘야함  시스템버전 33이 안드로이드 13임
            "targetSdkVersion": 33,
            "minSdkVersion": 33,
            "buildToolsVersion": "31.0.0"
          },
          "ios": {
            "deploymentTarget": "13.0"
          }
        }
      ]
    ]

추가 해줘야함

scheme(패키지 네임과 같아야함)과 slug(expo이름과 같아야함)도 잊지 말고 추가 해줘야함

 

app.json 예시

{
  "expo": {
    "scheme": "koback-coach",
    "name": "코백 코치",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#FFFFFF"
    },
    "extra": {
      "eas": {
        "projectId": "11111111111111111`11111111111"
      }
    },
    "android": {
      "googleServicesFile": "./google-services.json",
      "package": "com.koback.coach",
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "versionCode": 6
    },
    "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "compileSdkVersion": 33,
            "targetSdkVersion": 33,
            "minSdkVersion": 33,
            "buildToolsVersion": "31.0.0"
          },
          "ios": {
            "deploymentTarget": "13.0"
          }
        }
      ]
    ],
    "owner": "koback-ceo",
    "slug": "koback-coach",
    "ios": {
      "bundleIdentifier": "com.koback.coach",
      "buildNumber": "4"
    }
  }
}

 

eas.json 예시

{
  "cli": {
    "version": ">= 3.17.1"
  },
  "build": {
    "apk": {
      "android": {
        "buildType": "apk"
      }
    },
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal"
    },
    "production": {
      "autoIncrement": true,
      "ios": {
        "buildArtifactPaths": ["ios/build/*"]
      }
    }
  },
  "submit": {
    "production": {
      "android": {
        "serviceAccountKeyPath": "./koback-coach-07d7da60f33a.json"
      }
    }
  }
}

 

설치 필요

npx expo install expo-build-properties

 

안드로이드

apk 만들기 (뒤에 apk는 eas.json에서 저렇게 선언해서 그럼)

eas build -p android --profile apk <--local>

 

aab 만들기 (이게 구글플레이 콘솔에서 심사받는 파일)

eas build --platform android <--local>

 

IOS

ipa파일 만들기

eas build --platform ios <--local>

 

테스트 플라이어트에 올리기 (테스트 플라이어트에 올려야지 심사할때 첨부 가능 첨부는 애플 홈피에서 함)

eas submit -p ios

'RN' 카테고리의 다른 글

riteSql 사용  (0) 2023.12.04
구글드라이브에 업로드  (0) 2023.12.04
구글 로그인  (0) 2023.12.01
react-native-webview 웹뷰 흰페이지 나올때 해결법 (ssl ignore)  (0) 2023.11.30
RN 공부  (0) 2023.05.21