#release

질문 1
해시태그 없이 키워드만 일치하는 질문은 개수에 포함되지 않아요.

9달 전 · 노원재 님의 답변 업데이트

ReactNative ios build 에러 3일째 해결을 못했습니다.

시뮬레이션을 실행하려고 해도 스크립트 문제, iPhone 버전 범위 문제, 시뮬레이터 문제가 계속 발생합니다. 어떤 도움이라도 감사합니다. ReactNative를 처음 접했습니다. 저희 팀에서 저를 도울 수 있는 사람이 없습니다. #프로젝트 환경 mac M2 ruby -v ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23] node -v v20.10.0 pod --version 1.15.2 package.json { "name": "labts", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest" }, "dependencies": { "@react-native-community/async-storage": "^1.12.1", "@react-native-community/cli": "13.6.9", "@react-navigation/bottom-tabs": "^6.6.0", "@react-navigation/native": "^6.1.17", "@react-navigation/native-stack": "^6.10.0", "@tanstack/react-query": "^5.51.5", "@types/react-native-vector-icons": "^6.4.18", "axios": "^1.7.2", "date-fns": "^3.6.0", "immer": "^10.1.1", "react": "18.2.0", "react-native": "0.74.3", "react-native-calendars": "^1.1305.0", "react-native-date-picker": "^5.0.4", "react-native-dotenv": "^3.4.11", "react-native-get-random-values": "^1.11.0", "react-native-image-crop-picker": "^0.41.2", "react-native-image-zoom-viewer": "^3.0.1", "react-native-paper": "^5.12.3", "react-native-permissions": "^4.1.5", "react-native-safe-area-context": "^4.10.8", "react-native-screens": "^3.32.0", "react-native-splash-screen": "^3.3.0", "react-native-tab-view": "^3.5.2", "react-native-vector-icons": "^10.1.0", "react-native-vision-camera": "^4.5.1", "uuid": "^10.0.0", "yarn": "^1.22.22" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.74.85", "@react-native/eslint-config": "0.74.85", "@react-native/metro-config": "0.74.85", "@react-native/typescript-config": "0.74.85", "@types/react": "^18.2.6", "@types/react-native-dotenv": "^0.2.2", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", "babel-plugin-module-resolver": "^5.0.2", "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", "react-test-renderer": "18.2.0", "typescript": "5.0.4" }, "engines": { "node": ">=18" } } PodFile require Pod::Executable.execute_command('node', ['-p', 'require.resolve( "react-native/scripts/react_native_pods.rb", {paths: [process.argv[1]]}, )', __dir__]).strip platform :ios, '12.0' use_frameworks! #use_modular_headers! prepare_react_native_project! linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym end target 'nexlabts' do config = use_native_modules! use_react_native!( :path => config[:reactNativePath], # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) target 'nexlabtsTests' do inherit! :complete # Pods for testing end post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false, # :ccache_enabled => true ) end end 제가 아래 에러 3가지에 대해 제가 해본 방법들입니다. 1. node 재설치 node_module 폴더 삭제, package-rock.json 삭제 후 재설치 npm install --legacy-peer-deps yarn install 2. Xcode가 node 읽을 수 있도록 설정 sudo ln -s "$(which node)" /usr/local/bin/node 3. Podfile 내 platform 설정 수정 platform :ios, '12.0' or platform :ios, '14.0' 4. Pods 재설치 rm -rf ~/Library/Developer/Xcode/DerivedData or rm -rf ~/Library/Developer/Xcode/DerivedData/* rm -rf Pods rm Podfile.lock pod install --repo-update Xcode \> Product \> Clean Build Folder. cd ./ios pod cache clean -all pod install --repo-update cd ../ npx react-native run-ios --no-packager --simulator="iPhone 15" or npx react-native run-ios --simulator="iPhone 15" or yarn start > i(run ios) Err 1. cocoaPods 설치할 때 [!] CocoaPods could not find compatible versions for pod "React-RuntimeHermes": In Podfile: React-RuntimeHermes (from ../node_modules/react-native/ReactCommon/react/runtime) Specs satisfying the React-RuntimeHermes (from ../node_modules/react-native/ReactCommon/react/runtime) dependency were found, but they required a higher minimum deployment target. Err2. iOS 실행할때 run-ios --no-packager --simulator="iPhone 15" Build description signature: fc1341421f84b87c5245d346c2c17b66 Build description path: /Users/nowonjae/Library/Developer/Xcode/DerivedData/nexlabts-argvodqcybjfcybstpulfpghnzvm/Build/Intermediates.noindex/XCBuildData/fc1341421f84b87c5245d346c2c17b66.xcbuilddata /Users/nowonjae/Desktop/project/NeXLabRN/ios/nexlabts.xcodeproj:1:1: error: Unable to open base configuration reference file '/Users/nowonjae/Desktop/project/NeXLabRN/ios/Pods/Target Support Files/Pods-nexlabts/Pods-nexlabts.release.xcconfig'. (in target 'nexlabts' from project 'nexlabts') warning: Unable to read contents of XCFileList '/Target Support Files/Pods-nexlabts/Pods-nexlabts-resources-Release-output-files.xcfilelist' (in target 'nexlabts' from project 'nexlabts') warning: Unable to read contents of XCFileList '/Target Support Files/Pods-nexlabts/Pods-nexlabts-frameworks-Release-output-files.xcfilelist' (in target 'nexlabts' from project 'nexlabts') error: Unable to load contents of file list: '/Target Support Files/Pods-nexlabts/Pods-nexlabts-frameworks-Release-input-files.xcfilelist' (in target 'nexlabts' from project 'nexlabts') error: Unable to load contents of file list: '/Target Support Files/Pods-nexlabts/Pods-nexlabts-frameworks-Release-output-files.xcfilelist' (in target 'nexlabts' from project 'nexlabts') warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'nexlabts' from project 'nexlabts') warning: Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'nexlabts' from project 'nexlabts') error: Unable to load contents of file list: '/Target Support Files/Pods-nexlabts/Pods-nexlabts-resources-Release-input-files.xcfilelist' (in target 'nexlabts' from project 'nexlabts') error: Unable to load contents of file list: '/Target Support Files/Pods-nexlabts/Pods-nexlabts-resources-Release-output-files.xcfilelist' (in target 'nexlabts' from project 'nexlabts') warning: Run script build phase '[CP] Copy Pods Resources' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'nexlabts' from project 'nexlabts') --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:B5AA2E84-4F83-4749-A986-A1FCE5E398A3, OS:17.5, name:iPhone 15 } { platform:iOS Simulator, id:B5AA2E84-4F83-4749-A986-A1FCE5E398A3, OS:17.5, name:iPhone 15 } ** BUILD FAILED ** ] Err3. Xcode 로 Build 할때 (Any iOS Simulator Device (arm64, x86_64)) Command PhaseScriptExecution failed with a nonzero exit code

개발자

#reactnative

#xcode

#reactnative-run-ios

답변 1

댓글 0

조회 553

9달 전 · 익명 님의 질문

동시성+데드락 제어를 위한 비관적 락 잠금 질문

안녕하세요 글쓰기 커뮤니티 프로젝트를 개발하는 중입니다 회원이 소설을 찜하는 기능(좋아요)을 구현 중에 있는데요 찜 객체는 아래 첨부한 코드와 같이 memberId와 novelId를 외래키로 갖습니다 동시성 이슈를 다뤄보고자 500명의 사용자가 동시에 novelId가 1인 소설을 찜하는 요청을 보낸다는 가정 하에 jmeter로 테스트를 돌려보니 동시성 이슈가 아니라 데드락 문제가 발생해서요 favoriteJDBCRepository.save(memberId, novelId); 시 novelId가 외래키라 외래키 정합성 검사 때문에 db 내부적으로 novelId가 1인 레코드에 read lock이 걸리는 것 같습니다 favorite 객체 save 시 트랜잭션 A가 novelId가 1인 레코드에 대해 read lock을 얻고, novelId가 3인 novel의 favoriteCount(찜 개수)를 +1하고자 write lock 요청 -> favorite 객체 save 시 다른 트랜잭션 B도 novelId가 1인 레코드에 대해 readlock을 얻고, novelId가 1인 novel의 favoriteCount(찜 개수)를 +1하고자 write lock 요청 -> write lock은 read lock이 전부 해제되어야 얻을 수 있음. 트랜잭션 A는 B가 read lock을 release하기를 대기하고 B도 A가 read lock을 release하기를 대기하면서 데드락 발생 일단 novelId로 novel을 비관적 락을 사용해 조회해서 favorite 객체를 생성한 뒤에 저장하는 방식으로 데드락+동시성 이슈 둘 다 해결이 되는데요(chooseFavoriteV2) 이 방법 말고도 더 좋은 대안은 없을까요??

개발자

#비관적락

#데드락

#동시성

#데이터베이스

#백엔드

답변 0

댓글 0

추천해요 1

조회 49

10달 전 · 석정도 님의 질문

리액트 네이티브 릴리즈로 배포 시 build.gradle 설정대로 동작 안하는 이유가 뭔지 궁긍합니다.

안녕하세요. 현재 리액트 네이티브로 프로젝트를 진행하고 있습니다. 막바지 단계에 거의 도달해서 이제 배포 준비를 하려고 하는데요, 마지막으로 테스트를 하기 위해 stagingRelease 로 apk 를 만들어서 테스트를 하려고 하니, .env.staging 을 읽지를 못하고 있네요. 이상한건 stagingDebug 로 할 때에는 이런 문제가 없었습니다. 지금 환경변수는 루트 디렉토리에 env 폴더가 있고, 해당 폴더 내에는 3개의 환경변수 파일이 존재합니다. .env.development .env.staging .env.production 이렇게 3개 입니다. project.ext.envConfigFiles = [ productiondebug: "env/.env.production", productionrelease: "env/.env.production", developmentrelease: "env/.env.development", developmentdebug: "env/.env.development", stagingrelease: "env/.env.staging", stagingdebug: "env/.env.staging" ] 위의 코드는 제가 설정한 환경변수 매핑하는 부분입니다. 실제로 stagingrelease 로 빌드 시에 flavor 값이 stagingrelease 로 뜨는 걸 확인했습니다. node_modules 에서 react-native-config 폴더를 찾아서 dotenv.gradle 에서 찍으니까 확인이 가능하더라고요. 제가 궁금한 점은 왜 루트에서 .env 파일만을 읽어서 BuildConfig.java 에서 사용하려고 하는걸까요? .env.staging 을 참조하지 않는 이유가 궁금합니다. 아래는 dotenv.gradle 파일입니다. import java.util.regex.Matcher import java.util.regex.Pattern def getCurrentFlavor() { Gradle gradle = getGradle() def pattern = Pattern.compile("(?:.*:)*[a-z]+([A-Z][A-Za-z0-9]+)") def flavor = "" gradle.getStartParameter().getTaskNames().any { name -> Matcher matcher = pattern.matcher(name) if (matcher.find()) { flavor = matcher.group(1).toLowerCase() return true } } println "Current flavor: $flavor" return flavor } def loadDotEnv(flavor = getCurrentFlavor()) { def envFile = project.hasProperty("defaultEnvFile") ? project.defaultEnvFile : ".env" if (System.env['ENVFILE']) { envFile = System.env['ENVFILE'] } else if (System.getProperty('ENVFILE')) { envFile = System.getProperty('ENVFILE') } else if (project.hasProperty("envConfigFiles")) { project.ext.envConfigFiles.any { pair -> if (flavor.startsWith(pair.key.toLowerCase())) { envFile = pair.value return true } } } println "Reading env from: $envFile" def env = [:] File f = new File("$project.rootDir/../$envFile"); if (!f.exists()) { f = new File("$envFile"); } if (f.exists()) { println "Found env file: $f" f.eachLine { line -> def matcher = (line =~ /^\s*(?:export\s+|)([\w\d\.\-_]+)\s*=\s*['"]?(.*?)?['"]?\s*$/) if (matcher.getCount() == 1 && matcher[0].size() == 3) { env.put(matcher[0][1], matcher[0][2].replace('"', '\\"')) // 각 환경 변수 키-값 쌍 출력 println "Loaded env variable: ${matcher[0][1]} = ${matcher[0][2]}" } } } else { println("**************************") println("*** Missing .env file ****") println("**************************") } project.ext.set("env", env) } loadDotEnv() android { defaultConfig { project.env.each { k, v -> def escaped = v.replaceAll("%","\\\\u0025") buildConfigField "String", k, "\"$v\"" resValue "string", k, "\"$escaped\"" println "Set buildConfigField and resValue: $k = $v" } } } 안드로이드 스튜디오 터미널에서 ./gradlew assembleStagingRelease 명령어를 치게 될 경우, Current flavor: stagingrelease Reading env from: .env.staging ************************** *** Missing .env file **** ************************** 이런 로그가 뜨고 있습니다.

개발자

#react-native

#react-native-config

#다중환경변수

#release

답변 0

댓글 0

조회 67

일 년 전 · 익명 님의 새로운 댓글

라이브러리 구조 설계

안녕하세요. 현재 경력2년차 C# 언어 사용중입니다. 개발환경은 VS2019, .net Framework4.7.2 입니다. 코드의 재사용성을 높이고자 라이브러리 구조를 새로 설계하고있습니다. 사진처럼 각 솔루션을 생성하였고 그것을 기준으로 git 관리를 진행하고있습니다. 각 프로젝트는 C# 클래스 라이브러리입니다. 가장 기본이되는 common 내부에 c++ dll 이 존재하기 때문에 다른 솔루션들에서 사용시 기존프로젝트를 불러온 후 참조를 진행하고있습니다. 이 방식은 MyReleaseProject를 빌드할 경우 자동으로 c++ dll도 복사가 된다는 장점이 존재합니다. 하지만 직접 참조를 진행해야하는 프로젝트들이 점점 많아지는 단점이 존재합니다. 선배 개발자님들께서는 이럴때 어떤식으로 설계를 진행하시는지 궁금합니다.

개발자

#c#

#library

답변 1

댓글 1

추천해요 2

조회 77

2년 전 · 강병진 님의 답변 업데이트

안드로이드 스튜디오에서 빌드가 안되요

plugins { id("com.android.application") kotlin("android") } android { namespace = "com.example.next" compileSdk = 33 defaultConfig { applicationId = "com.example.next" minSdk = 24 targetSdk = 33 versionCode = 1 versionName = "1.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { isMinifyEnabled = false proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") } } compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } } dependencies { implementation("androidx.appcompat:appcompat:1.6.1") implementation("com.google.android.material:material:1.9.0") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") } 여기서 에러가 뜨는데 뭘까요 Unresolved reference: id Unresolved reference: kotlin Unresolved reference: android Unresolved reference: namespace Unresolved reference: compileSdk Unresolved reference: defaultConfig Unresolved reference: applicationId Unresolved reference: minSdk Unresolved reference: targetSdk Unresolved reference: versionCode Unresolved reference: versionName Unresolved reference: testInstrumentationRunner Unresolved reference: buildTypes Unresolved reference: release Unresolved reference: isMinifyEnabled Unresolved reference: proguardFiles Unresolved reference: getDefaultProguardFile

개발자

#안드로이드스튜디오

답변 1

댓글 0

조회 245

2년 전 · 이영준 님의 새로운 답변

깃, 배포 담당자가 따로 있으신가요?

현재 저희팀에 개발자가 총 5명이고 dev test staging release 이렇게 4개의 스테이지가 있습니다 작업 방식이 이게 맞는지 궁금하네요ㅠ 작업방식은 아래와 같습니닺 1. dev에서 각자 작업 브랜치를 생성해서 개발완료되면 dev 브랜치에 각자 커밋 푸시를 합니다. 2. 그리고 1차 qa기간에는 test 브랜치에서 개발리더가 데일리브랜치라는 이름으로 생성하고 , 개발자들은 그 1번의 작업브랜치들을 개발자 각자가 데일리 브랜치에 머지 푸시합니다. 개발리더는 해당 데일리 브랜치를 test에 머지푸시하고 배포합니다 3. 2차 qa기간에는 개발리더가 staging 브랜치에 test 브랜치를 머지하고 배포합니다 4. 서비스 신규기능 릴리즈 때 개발리더가 relase 브랜치에 staging 브랜치를 머지하고 배포합니다. 위와같은 순서인데 질문 내용은 1. 위 작업순서가 일반적인가요 2. test 브랜치부턴 개발리더가 머지하고 배포하는데 개발리더의 역할이 맞나요? 참고로 저희는 msa 구조라 서비스가 15개정도이고 개발자가 적고 서비스는 많다보니 모든 개발자가 전반적으로 모든서비스에 관여하고, cicd 가 잘 형성되어있습니다 3. 개발자 각자가 각 스테이지별로 소스관리 및 배포까지하면 좀 그럴까요? 보통 개발리더처럼 그런 역할하시는분을 따로 두시나요? 사실 제가 요즘 좀 스트레스를 받는게ㅠ..초반에 저희가 룰을 하나 정했습니다. 개발리더가 test브랜치부터는 직접 머지하고 반영하는걸로..근데 개발리더가 바빠서 그런지 잘 신경을 못 써서 개발자 각자가 제멋대로? 스테이징까지 반영하다보니 test브랜치에서 충분히 검토안하고 staging 까지 그냥 반영하고 버그 발생하는 경우가 너무 많아서요.. 저런 룰이 이상한건가요ㅠ? 개발자들도 test와 staging을 각자 못하게 하는 거를 좀 불편해하는것 같아요 그래서 그냥 저런 룰을 지워버리는게 좋을지.. 긴 글 읽어주셔서 감사합니다

개발자

#배포

#git

#ci/cd

#개발

#개발문화

답변 6

댓글 6

추천해요 15

조회 3,933

2년 전 · 커리어리 AI 봇 님의 새로운 답변

mysql pool에서 connection.release 명령어 필요한 이유

mysql 관련 포스팅을 보다가 궁금한 점이 생겼습니다. pool을 생성할 때 이미 커넥션 limit을 걸어두는데 왜 connection.release 명령어를 쳐야 하나요? limit 넘는 커넥션이 생성되면 오래된 커넥션은 자동으로 끊어지게 되는 것 아닌가요?

개발자

#mysql

#pool

답변 2

댓글 0

조회 209