Mac OS 세쿼이아 업그레이드 했다. Xcode 16으로 업그레이드 했다.

별다른 이슈가 없는 듯 했는데, iOS 빌드 후 testflight 업로드 하려니 이슈가 발생하였다.

*** Error: [ContentDelivery.Uploader.600000068240] Asset validation failed (90482) Invalid Executable. The executable 'Runner.app/Frameworks/AdFitSDK.framework/AdFitSDK' contains bitcode.

target build 버전 등의 차이로 인한 듯 한데. adFit SDK 쪽에서 처리해줘야 하나? 따로 직접 해결할 수 있나?

예전 비슷한 이슈인가? 다른 이슈? https://devtalk.kakao.com/t/appstore-minimum-os-version/135747

 

[AppStore] 테스트플라이트 아카이브 안됨(minimum OS Version 관련)

문의 시, 사용하시는 SDK 버전 정보와 디벨로퍼스 앱ID를 알려주세요. 현재 사용 SDK 버전 - 2.21 제가 현재 엑스코드에서 테스트플라이트를 위해 아카이브를 했는데 아래와 같은 에러가 계속 뜹니

devtalk.kakao.com

메시지는 동일한 것은 아닌데, 빌드시 버전 이슈를 본것 같아서 일단 정리.

다른 정확한 해결책을 찾아보는 중.

관련이슈 2 - https://developer.apple.com/forums/thread/764576

 

Invalid Executable. The excecutabl… | Apple Developer Forums

After upgrading to XCode 16, while uploading apps to app store, it's throwing below error and not letting me upload it. It's iOS app. Please help. Invalid Executable. The excecutable ......app/Frameworks/hermes.framework/hermes contains bitcode.

developer.apple.com

역시나 SDK 쪽에서 지원해줘야 하나...

 

[해결책] bitcode 에러 조치 - Xcode 16

관련이슈 3 - https://medium.com/@hyosing92/ios-bitcode%EC%99%80-%EA%B4%80%EB%A0%A8-issue-4643dc841af7

 

[iOS]Bitcode와 관련 Issue

Bitcode 관련 이슈와 왜 deprecate되었을지

medium.com

위 글 내용상 - 직접 bitcode 를 제거해줘야 하는 듯 하다.

ios/Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'AdFitSDK'
      `xcrun --sdk iphoneos bitcode_strip -r Pods/AdFitSDK/Frameworks/AdFitSDK.framework/AdFitSDK -o Pods/AdFitSDK/Frameworks/AdFitSDK.framework/AdFitSDK`
    end

  end
end

본인의 코드중 에러나는 위치를 확인한다. 내 경우는 아래 경로.

Pods/AdFitSDK/Frameworks/AdFitSDK.framework/AdFitSDK

(SDK 종류마다 해당 위치가 차이가 난다 - Pods 에서 해당 경로 확인)

실제 동작은 체크해봐야겠다. Xcode > Product > archive 로 확인해보니

에러 메시지는 사라졌다. 아래의 경고메시지가 거슬르긴 하지만, testflight 로 업로드는 된다.

실제 내부테스트 배포가 되는지 체크해봐야 겠다. (위 경고 메시지 제거방법은 따로 체크)

...

내부테스트 정상 배포되었다. - 일단 긴급 이슈는 해결

반응형

WRITTEN BY
1day1
하루하루 즐거운일 하나씩, 행복한일 하나씩 만들어 가요.

,

플러터 앱 - 안드로이드 쪽 자동배포를 해봤는데, 이번에는 iOS 쪽도 해본다.

testFlight 로 업로드 하는 코드.

# IPA 파일 생성
flutter build ipa --release --export-options-plist=ios/exportOptions.plist

# TestFlight에 업로드 
xcrun altool --upload-app --type ios \
 --file build/ios/ipa/*.ipa \
 --username "{your-apple-develper-id}" \
 --password "{your-app-password}" \
 --primary-bundle-id "{your-app-bundle-id}"

코드 자체는 심플하다. 관련 인증 부분이 좀 어려울 수 있다.

일단 앱 암호는 https://appleid.apple.com/account/manage 애플 계정쪽에서 설정한다.

그외 다른 인증 방식으로 몇가지 시도해봤는데, 유일하게 위 방법만 동작하였다.
( --apiKey --apiIssuer 방법 , --upload-package 방법 , xcrun notarytool 방법 => 모두 실패 )
위 다른 방식들이 좀더 안전(?)한 방법인 듯 해서 시도해봤었는데, 실패.

 

다음 부분에서도 좀 헤맸다.

# cat ios/exportOptions.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>destination</key>
    <string>export</string>
    <key>method</key>
    <string>app-store</string>
    <key>teamID</key>
    <string>{your-developer-team-ID}</string>
    <key>teamName</key>
    <string>{your-developer-team-Name}</string>
    <key>provisioningProfiles</key>
    <dict>
        <key>{your-app-bundle-id}</key>
        <string>{your-project-provisioning-profile}</string>
    </dict>
    <key>signingCertificate</key>
    <string>Apple Distribution</string>
    <key>signingStyle</key>
    <string>manual</string>
    <key>stripSwiftSymbols</key>
    <true/>
    <key>uploadBitcode</key>
    <false/>
    <key>uploadSymbols</key>
    <true/>
</dict>
</plist>

위 입력사항 중 2개 teamName / bundle id 는 금방 찾았고 , 그외 2가지 항목을 찾아야 한다.

teamID / provisioning profile 은 어디?

open ios/Runner.xcworkspace 
# 플러터 프로젝트를 Xcode 를 열어본다.

Runner 쪽을 보면 Signing 부분에 있다. ( 지금 살펴보니, 모든 항목이 다 여기에 있다. )

내 경우는 계정소유자가 아니라 (앱 관리자? )권한으로 참여하는 것이라 Signing Certificate 쪽 설정하는데 고생을 좀 했다.

위 설정까지 문제없이 했다면, 맨 위 코드로 빌드 => 배포 가 정상적으로 될 것이다.

 

반응형

WRITTEN BY
1day1
하루하루 즐거운일 하나씩, 행복한일 하나씩 만들어 가요.

,

플러터 를 안드로이드 로 개발중인데 - 새버전이 나와서 업그레이드 하였다.

에러가 생길 것은 예상은 했다. 빌드해보니.

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> A problem occurred starting process 'command '/..../flutter/bin/flutter''

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
Error: Gradle task assembleDebug failed with exit code 1
Error executing devicectl: ProcessException: Process exited abnormally with exit code 3:

User cancelled
  Command: /usr/bin/arch -arm64e xcrun devicectl list devices --timeout 5 --json-output /var/folders/d7/4qd968hd0kzc21y8jggx2qcr0000gn/T/flutter_tools.w7hJCy/core_devices.D5JYTk/core_device_list.json
Error executing devicectl: ProcessException: Process exited abnormally with exit code 3:

User cancelled
  Command: /usr/bin/arch -arm64e xcrun devicectl list devices --timeout 5 --json-output /var/folders/d7/4qd968hd0kzc21y8jggx2qcr0000gn/T/flutter_tools.w7hJCy/core_devices.AHDMpc/core_device_list.json

다음과 같은 에러가 발생하였다.

flutter doctor 해봐도 특별한 이상은 안 보였다.

 


iOS 쪽을 시도 해봤다.

# xcodebuild -downloadPlatform iOS

Downloading iOS 17.5 Simulator (21F79): 83.1% (6.09 GB of 7.34 GB)2024-05-27 00:10:48.511 xcodebuild[38139:36929395]  DVTDownloadable: Download Failed. Downloadable: https://download.developer.apple.com/Developer_Tools/iOS_17.5_Simulator_Runtime/iOS_17.5_Simulator_Runtime.dmg. Error Domain=NSPOSIXErrorDomain Code=28 "No space left on device" UserInfo={NSErrorFailingURLStringKey=https://download.developer.apple.com/Developer_Tools/iOS_17.5_Simulator_Runtime/iOS_17.5_Simulator_Runtime.dmg, NSErrorFailingURLKey=https://download.developer.apple.com/Developer_Tools/iOS_17.5_Simulator_Runtime/iOS_17.5_Simulator_Runtime.dmg, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDownloadTask <D677E7D4-290F-4ABB-AE5D-98AAF40F70BC>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <D677E7D4-290F-4ABB-AE5D-98AAF40F70BC>.<1>}
Downloading iOS 17.5 Simulator (21F79): Error: Error Domain=NSPOSIXErrorDomain Code=28 "No space left on device" UserInfo={NSErrorFailingURLStringKey=https://download.developer.apple.com/Developer_Tools/iOS_17.5_Simulator_Runtime/iOS_17.5_Simulator_Runtime.dmg, NSErrorFailingURLKey=https://download.developer.apple.com/Developer_Tools/iOS_17.5_Simulator_Runtime/iOS_17.5_Simulator_Runtime.dmg, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDownloadTask <D677E7D4-290F-4ABB-AE5D-98AAF40F70BC>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <D677E7D4-290F-4ABB-AE5D-98AAF40F70BC>.<1>}

여기도 에러.

하드 공간이 없다.  오랜만에 봤더니, 6기가 정도 밖에 안 남았네. ㅜㅜ

용량이 부족하다. 조금 정리하고 다시 시도..

Registering simulator runtime with CoreSimulator failed.
Domain: DVTDownloadableErrorDomain
Code: 29
User Info: {
    DVTErrorCreationDateKey = "2024-05-26 15:36:28 +0000";
}
--
Registering simulator runtime with CoreSimulator failed.
Domain: DVTDownloadableErrorDomain
Code: 29
--
Cannot copy the image because the disk is almost full
Domain: com.apple.CoreSimulator.simdiskimaged.SimDiskImageError
Code: 14
--


System Information

macOS Version 14.4.1 (Build 23E224)
Xcode 15.4 (22622) (Build 15F31d)
Timestamp: 2024-05-27T00:36:28+09:00

더 줄여야 겠다.

하드 좀 정리하고, 다시 해보니 정상 다운로드 되었다.
그리고, 안드로이드 스튜디오에서 다시 빌드 해보니 정상 동작 했다.

이제 안드로이드 쪽 빌드를 해결해보자.(즉, iOS 쪽은 정상)

android / gradle 빌드 쪽 이슈로 좁혀졌다.


[다시 시도]

flutter upgrade --force 로 플러터 SDK 를 업그레이드 해봤다.

* What went wrong:
Execution failed for task ':gradle:compileGroovy'.
> Failed to run Gradle Worker Daemon
   > A problem occurred starting process 'Gradle Worker Daemon 1'

에러가 나지만, 메시지가 달라졌다.

android/ 에서 gradle 을 콘솔에서 명령을 내려봤다.

# ./gradlew app:installDebug

FAILURE: Build failed with an exception.

* Where:
Build file '.../android/app/build.gradle' line: 2


What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
   > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
      Your current JDK is located in /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/jre
      You can try some of the following options:
       - changing the IDE settings.
       - changing the JAVA_HOME environment variable.
       - changing `org.gradle.java.home` in `gradle.properties`.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 24s
4 actionable tasks: 2 executed, 2 up-to-date

다른 프로젝트에서 1.8 오래된 버전이 필요해서 바꿨었는데, 그것이 영향을 준것 같다.
근데, 안드로이드 스튜디오 젤리피시 버전업 하기까지는 이상이 없었는데..??

android/gradle.properties
파일에 JAVA_HOME 패스를 넣었다.(.bash_profile 등에 넣어도 된다.)

org.gradle.java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home/

 

다시 빌드...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':connectivity_plus:compileDebugJavaWithJavac'.
> error: invalid source release: 17

 

이거 점점 미궁으로 가는거 아닌가? ㅜㅜ

java 버전 17 으로 맞춰준다.

# brew install openjdk@17

sudo ln -s  /opt/homebrew/Cellar/openjdk\@17/17.0.11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk

gradle.properties 나 IDE 세팅등에 버전을 맞춘다.

org.gradle.java.home=/Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home/

 

일단 여기까지 해보니, 정상 빌드 된다.

반응형

WRITTEN BY
1day1
하루하루 즐거운일 하나씩, 행복한일 하나씩 만들어 가요.

,

예전 공부(?)하다가 중단했었는데, 다시 시도 해보려 한다.
이슈가 생기면 처음부터 정리하면서 진행하고자 한다.

flutter doctor 를 한후 다음과 같은 메시지

[!] Xcode - develop for iOS and macOS (Xcode 15.2)
    ✗ Unable to get list of installed Simulator runtimes.
    
..
..
! Doctor found issues in 1 category.

Xcode 의 시뮬레이터를 설치해준다.

xcodebuild -downloadPlatform iOS

 

다시 flutter doctor 를 해보면 정상적으로 나올 것이다.

 

[추가 - 결론 - 아래 효과 없음 - 맥 재부팅 하니, 정상 동작]

다시 저런현상이 발생했는데, 위 명령으로 해도 안된다. 시뮬레이터 리스트에 아무것도 안보인다.

혹시나 해서 다른 조치를 해봤다. (시스템 설정 => 저장공간 => 개발자 )

Xcode 캐시를 삭제 해봤다.

그래도 안된다.

반응형

WRITTEN BY
1day1
하루하루 즐거운일 하나씩, 행복한일 하나씩 만들어 가요.

,

간만에 노트북에서 git 프로젝트를 실행하려고 보니 다음과 같은 에러가 발생한다.

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), 
missing xcrun at: ...

그동안 데스크탑(맥미니)에서 하다보니, 노트북 설정이 꼬였나 했다.

검색해보니 xcode 관련 이슈인 듯 하다.

일단 xcode 를 업그레이드 한다.

xcode-select --install

... 느리네.

OO minutes later ..

완료된 후 다시 시도하면 OK

반응형

WRITTEN BY
1day1
하루하루 즐거운일 하나씩, 행복한일 하나씩 만들어 가요.

,