Fastlane ์ ์ฉํ ๋ ํ์ํ ์ฌ์ดํธ๋ค
์ฆ๋ช
์, ํ๋กํ์ผ ๋ฑ ํ์ํ ๋
https://developer.apple.com/account
์ฑ ์ํธ ์ค์ ํ ๋
https://appleid.apple.com/
Shooooootig โฝ๏ธ
์๋ง์ ๋ฌธ์ ์ค์ 2๊ฐ์ง ์๋ฌ๋ฅผ ๋ค๋ฃจ๊ณ ์ ํ๋ค!
๐ฏ Trouble 1
โ /Users/leejinhee/Desktop/XCODEPROJECT/Team/meokQ-Admin-iOS/MatQ_Admin/Presentation/View/Notice/NoticeDetailView.swift:71:1: external macro implementation type 'PreviewsMacros.SwiftUIView' could not be found for macro 'Preview(_:body:)' #Preview {
The following build commands failed:SwiftCompile normal arm64 Compiling\ Market.swift,
โผ๏ธ Preview ๋์ ์์นด์ด๋ธ๋ฅผ ๋ชปํ๊ณ ์๋ ๋ฌธ์ ๋ฐ๊ฒฌ → ํ๋ฆฌ๋ทฐ ์ฃผ์์ฒ๋ฆฌํ๊ณ fastlane ์คํ ํ
์คํธ → ์์นด์ด๋ธ ์ฑ๊ณต !
ํ๋ฆฌ๋ทฐ๋ฅผ ๋งค๋ฒ ์ง์ธ ์๋ ์์ผ๋ ํด๊ฒฐ๋ฐฉ๋ฒ์ ์ฐพ์์ผ๊ฒ ๋จ ๋ง์ผ๋ก ๊ตฌ๊ธ๋ง์ ์์ํ๋ค.
ํ์ธํด๋ณด๋๊น ๋ฃจ๋น ๋ช
๋ น์ด๋ ํฐ๋ฏธ๋์ด ๋ค๋ฅธ ์ํคํ
์ฒ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์คํ๋๊ณ ์๋ ๊ฒ์ด๋ค-!....
https://github.com/fastlane/fastlane/issues/21582
xcodebuild fails with #Preview macro with Xcode 15.0
์น์ ํ ์ค๋ช
๋์ ์๋ ์์๋ก ์งํํด์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์๋ค.
ํด-!!!!! ์ด๊ฑฐ ํด๊ฒฐํ๋ฉด์ ๋น๋๋๋ฒ๊ฐ 50๋ฒ์ ๋์ด๊ฐ๊ณ , ํด๊ฒฐํ๊ณ ์๊ณ ์ถ์ด์ ์๋ฒฝ 6์๊น์ง ๋ฐค์ ์๋ฒ๋ ธ๋ค. ํด๊ฒฐํ๋ ๊ด๋ช
์ ์ฐพ์ ๊ธฐ๋ถ์ด์๋ค ๐คฉ
1. arch ๋ช
๋ น์ด๋ฅผ ์คํ → i386 ํ์ธ
arch i386
2. ์ํคํ
์ฒ๋ฅผ ๋ฐ๊ฟ์ฃผ์
arch -arm64 /bin/zsh arm64
๐ฏ Trouble 2
์ฒ์์ ๋น๋ฐ๋ฒํธ๋ฅผ ์ฑ ์ํธ๋ก ํ์ง ์์๋ค๋ฉด, fastlane ๋์ค์ ์ํธ๊ฐ ๋ค๋ฅด๋ค๊ณ ํ๋ฉฐ ๋ฐฐํฌ์ ์คํจํ๋ค.
์ด์ ์ fastlane ์ ์ฉํ ๋ .env ํ์ผ์ ์์ฑํ๋ ๊ฒ์ด ์๊ฐ๋์ ์๋๊ณผ์ ์ ๊ฑฐ์ณ ํด๊ฒฐํ๋ค.
1. ์ฑ ์ํธ ์์ฑ
https://appleid.apple.com/ ์ฌ์ดํธ ํ๋จ - ์ฑ ์ํธ - +๋ฒํผ์ผ๋ก ์ํธ ์์ฑ - ์ฑ ์ํธ ํ์ธ
2. .env ํ์ผ ์์ฑ
3. aaaa-bbbb-cccc-dddd ์ด๋ฐ ํํ๋ก ๋ ์ฑ ์ํธ๋ฅผ .env ํ์ผ ๋ด์ ์๋ ์ฝ๋๋ฅผ ์์ ํด์ ๊ธฐ์
ํด์ฃผ๋ฉด ํด๊ฒฐ!!!!!
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=appleid์์ ๋ฐ์ ์ฑ ์ํธ
Fastfile ์ฝ๋
Fastfile์คํ์ ์ํ ๊ธฐ๋ณธ ์ค๋ํซ !
์ ๋ค์๊ณผ ๊ฐ์ด ์ ์ฅํด๋์๋ค.
default_platform(:ios)
platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
get_certificates
get_provisioning_profile
#increment_build_number(xcodeproj: "MatQ_Admin.xcodeproj")
increment_build_number(
build_number: latest_testflight_build_number + 1
)
build_app(scheme: "MatQ_Admin", configuration: "Debug")
upload_to_testflight
end
end
์ต์ข Fastfile
์๋ ์ฒจ๋ถํ ๋ธ๋ก๊ทธ๋ฅผ ์ฐธ๊ณ ํด์ fastlane์ ์คํํ ๋ ์ต์ ์ผ๋ก ๋ฒ์ ์ ๋ณด๋ฅผ ์ง์ ๊ธฐ์ ํ ์ ์๋๋ก ์ถ๊ฐํด๋์๋ค.
default_platform(:ios)
platform :ios do
def updateVersion(options)
if options[:version]
version = options[:version]
else
version = prompt(text: "Enter the version type or specific version\n(major, minor, patch or 1.0.0): ")
end
re = /\d+.\d+.\d+/
versionNum = version[re, 0]
if (versionNum)
increment_version_number(
version_number: versionNum
)
elsif (version == 'major' || version == 'minor' || version == 'patch')
increment_version_number(
bump_type: version
)
else
UI.user_error!("[ERROR] Wrong version!")
end
end
desc "Push a new beta build to TestFlight"
lane :beta do |options|
updateVersion(options)
get_certificates
get_provisioning_profile
increment_build_number(xcodeproj: "MatQ_Admin.xcodeproj")
#increment_build_number(
# build_number: latest_testflight_build_number + 1
#)
build_app(scheme: "MatQ_Admin", configuration: "Debug")
upload_to_testflight
end
end
fastlane์ ์ค์นํ๊ณ ์ ์ฉํ๋ฉด์ Xcode Cloud๋ก CICD ๊ตฌ์ถํ๋๊ฒ ์ ๋ง!!! ํธํ๊ตฌ๋ ์ถ์๋ค..,,,,,,
์ฐธ๊ณ ํ ์ฌ์ดํธ์ ์ถ์ฒ - !
https://docs.fastlane.tools/getting-started/ios/setup/
https://deku.posstree.com/ko/react-native/fastlane/
'๐ Bug & Error' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Swift | XCTest] Linker command failed with exit code 1 (use -v to see invocation) (0) | 2024.10.24 |
---|