From c8ebe178e3995093660fd2bd4a66296781d79f95 Mon Sep 17 00:00:00 2001 From: devpark435 Date: Thu, 30 Jul 2026 16:46:27 +0900 Subject: [PATCH] =?UTF-8?q?fix(ios):=20=EC=95=84=EC=B9=B4=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=20strip=EC=9D=B4=20TFLite=20=EC=8B=AC=EB=B3=BC?= =?UTF-8?q?=EC=9D=84=20=EC=A7=80=EC=9A=B0=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TestFlight에서 분석이 항상 실패했다: Failed to lookup symbol 'TfLiteInterpreterOptionsCreate': dlsym(RTLD_DEFAULT, ...): symbol not found tflite_flutter는 iOS에서 DynamicLibrary.process()로 TensorFlowLiteC 심볼을 런타임 조회한다. Xcode 기본값 STRIP_STYLE=all로 아카이브하면 strip이 실행 파일 export trie에서 전역 심볼을 제거해 조회가 깨진다. flutter build ios는 strip을 돌리지 않아 로컬 릴리즈 빌드는 정상이고 xcodebuild archive만 실패해 TestFlight에서만 재현됐다. [ios/Flutter/Release.xcconfig] - STRIP_STYLE = non-global. 로컬 심볼만 제거하므로 바이너리 크기 감소폭은 all과 동일(41MB)하고 전역 심볼은 보존된다 검증: - 로컬 릴리즈 빌드 바이너리: TFLite export 심볼 2개 존재 - 수동 strip(all) 실행 시 0개로 소멸 — TestFlight 증상 재현 - 수정 후 xcodebuild archive: ARCHIVE SUCCEEDED, 40.5MB, 심볼 2개 생존 --- ios/Flutter/Release.xcconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index c4855bf..f8b47fe 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1,2 +1,11 @@ #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" + +// tflite_flutter는 iOS에서 DynamicLibrary.process()로 TensorFlowLiteC 심볼을 +// 런타임에 dlsym 조회한다. Xcode 기본값(STRIP_STYLE=all)으로 아카이브하면 +// strip이 실행 파일 export trie에서 전역 심볼을 지워 +// `Failed to lookup symbol 'TfLiteInterpreterOptionsCreate'`로 죽는다. +// `flutter build ios`는 strip을 돌리지 않아 로컬 릴리즈 빌드는 멀쩡하고 +// `xcodebuild archive`만 실패한다 — TestFlight에서만 재현되던 이유. +// non-global은 로컬 심볼만 제거하므로 바이너리 크기 감소폭은 all과 동일하다. +STRIP_STYLE = non-global