콘텐츠로 이동

문제 해결

Debug 모드 활성화

다음 구성을 통해 SDK의 Debug 기능을 활성화할 수 있습니다. 활성화하면 Android 시스템에서는 Flutter 빌드 도구에서 출력되는 Debug 로그를 직접 확인할 수 있고, iOS에서는 Xcode로 빌드 및 실행하거나 Xcode 빌드 또는 macOS 콘솔 앱을 통해 확인해야 합니다.

FTMobileFlutter.sdkConfig(
      datakitUrl: serverUrl,
      debug: true, // debug 모드 활성화
  );

참고: Release 버전을 배포할 때는 이 구성을 비활성화하는 것이 좋습니다.

Android Logcat 및 iOS Xcode Console 로그 예시

SDK는 정상적으로 동작하지만 데이터가 없음

  • Datakit 문제 해결을 통해 정상적으로 실행 중인지 확인합니다.

  • SDK 업로드 주소 datakitUrl 또는 datawayUrl이 올바르게 구성되었고 올바르게 초기화되었는지 확인합니다. debug 모드에서 Android Logcat 또는 iOS Xcode Console의 동기화 로그를 확인합니다.

  • datakit이 해당 워크스페이스로 데이터를 업로드하는지, 오프라인 상태인지 확인합니다. 이는 Guance에 로그인하여 「인프라」를 확인하면 이 문제를 확인할 수 있습니다.

빌드 과정에서 pod 오류 발생

SDK 0.5.8부터 iOS 네이티브 의존성이 GuanceSDK로 변경되었으며, 최소 iOS 버전은 15.0입니다. 업그레이드할 때 Core 및 Replay의 호환 버전, Deployment Target, 의존성 잠금 파일을 함께 동기화하고, 이전 FTMobileSDK가 동시에 링크되지 않도록 하세요. 연동 단계는 iOS 통합을 참고하세요. 다음 FTMobileSDK 오류 예시는 이전 버전 의존성에 적용됩니다.

CocoaPods could not find compatible versions for pod "FTMobileSDK/FTMobileAgent"

[!] CocoaPods could not find compatible versions for pod "FTMobileSDK/FTMobileAgent":
  In snapshot (Podfile.lock):
    FTMobileSDK/FTMobileAgent (= 1.3.9-alpha.14)

  In Podfile:
    ft_mobile_agent_flutter (from `.symlinks/plugins/ft_mobile_agent_flutter/ios`) was resolved to 0.0.2, which depends on
      FTMobileSDK/FTMobileAgent (= 1.3.10-beta.2)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `FTMobileSDK/FTMobileAgent` inside your development pod `ft_mobile_agent_flutter`.
   You should run `pod update FTMobileSDK/FTMobileAgent` to apply changes you've made.

iOS 앱을 빌드할 때 이와 유사한 버전 가져오기 문제가 발생하면 터미널에서 Flutter 프로젝트의 ios 디렉터리로 이동한 후 다음 명령을 실행해야 합니다:

pod install --repo-update

The Swift pod ft_mobile_agent_flutter depends upon FTMobileSDK, which does not define modules

ft_mobile_agent_flutter ≤ 0.5.6에서 CocoaPods 구성이 use_module_headers! 또는 use_frameworks!를 명시적으로 지정하지 않은 경우, pod install을 실행하면 다음과 같은 오류가 발생합니다:

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `ft_mobile_agent_flutter` depends upon `FTMobileSDK`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

문제 원인: ft_mobile_agent_flutter(Swift로 개발)는 OC 라이브러리 FTMobileSDK에 의존하는데, FTMobileSDK.podspec에 DEFINES_MODULE = YES 구성이 없어 iOS 정적 라이브러리 빌드 시 module을 찾을 수 없다는 오류가 발생합니다.

해결 방법: 프로젝트의 Podfile 파일에서 target 'Runner' do 코드 블록 안에 다음 구성을 추가합니다:

target 'Runner' do
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  pod 'FTMobileSDK', :modular_headers => true
end

참고: :modular_headers => true를 추가하는 것은 빌드 구성 보완일 뿐이며, SDK를 중복으로 가져오는 것이 아닙니다.

데이터 손실

일부 데이터 손실

  • RUM의 특정 Session 데이터 또는 Log, Trace의 일부 데이터가 손실된 경우 먼저 RUM, Log, Trace의 샘플링 구성을 확인하세요. SDK 0.5.8부터 권장되는 백분율 필드는 각각 sessionSamplingRate, logSamplingRate, traceSamplingRate이며, 100 미만이면 비율에 따라 샘플링합니다. 기존 sampleRate는 여전히 [0,1] 확률을 사용합니다. 새 필드가 기존 필드보다 우선하며, 원격 구성이 로컬 값을 덮어쓰는지도 확인해야 합니다.
  • 수집된 RUM 데이터가 불완전하고 Resource 또는 Action 데이터가 없나요?

    Resource 및 Action 데이터는 View에 바인딩되므로 FTRouteObserver를 통하거나 수동으로 starView를 호출하여 View를 시작해야 합니다. View 이벤트 수집은 RUM View 문서를 참고하여 구현할 수 있습니다.

  • 데이터를 업로드하는 디바이스의 네트워크와 datakit이 설치된 디바이스의 네트워크 및 부하 문제를 점검합니다.

더 보기

문서 평가

이 페이지가 도움이 되었나요?