Unable to set up Video SDK for iOS using cocoapods

Description
I have an outline iOS project which compiles fine. It is using cocoapods for dependency management. But as soon as I add the ZoomVideoSDK dependency, the app fails to compile, producing numerous linking errors (details below).

Would be great if there was step-by-step guidance on how to correctly integrate ZoomSDK using cocoapods. Or a sample app that does this (the current sample app doesn’t use cocoapods).

Which iOS Video SDK version?
The default one, currently 1.10.11.

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Have a basic iOS Project using cocoapods. Here is my initial Pod file with which the app compiles fine:
target 'iosApp' do
  use_frameworks!
  platform :ios, '14.1'
  pod 'shared', :path => '../shared'
  pod 'FirebaseMessaging'
end
  1. Now add ZoomVideoSDK
target 'iosApp' do
  use_frameworks!
  platform :ios, '14.1'
  pod 'shared', :path => '../shared'
  pod 'FirebaseMessaging'
  pod 'ZoomVideoSDK'  # <--this line added
end
  1. Install updated pods:
 $ pod install --repo-update
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing ZoomVideoSDK (1.10.11)
Generating Pods project
Integrating client project
Pod installation complete! There are 3 dependencies from the Podfile and 10 total pods installed.
  1. Attempt to compile (NB no code using the Zoom SDK has been added, simply adding the dependency causes the app to fail to compile)
  2. See error:
Showing Recent Messages
ld: warning: -ld64 is deprecated, use -ld_classic instead
Undefined symbols for architecture arm64:
  "_CMAudioFormatDescriptionGetRichestDecodableFormat", referenced from:
      l490 in ZoomVideoSDKScreenShare
  "_CMBlockBufferGetDataPointer", referenced from:
      l372 in ZoomVideoSDKScreenShare
      l379 in ZoomVideoSDKScreenShare
  "_CMGetAttachment", referenced from:
      l507 in ZoomVideoSDKScreenShare
  "_CMSampleBufferDataIsReady", referenced from:
      l485 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer", referenced from:
      l490 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetDataBuffer", referenced from:
      l372 in ZoomVideoSDKScreenShare
      l379 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetDuration", referenced from:
      l367 in ZoomVideoSDKScreenShare
      l377 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetFormatDescription", referenced from:
      l372 in ZoomVideoSDKScreenShare
      l490 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetImageBuffer", referenced from:
      l367 in ZoomVideoSDKScreenShare
      l377 in ZoomVideoSDKScreenShare
      l507 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetNumSamples", referenced from:
      l490 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetPresentationTimeStamp", referenced from:
      l367 in ZoomVideoSDKScreenShare
      l372 in ZoomVideoSDKScreenShare
      l377 in ZoomVideoSDKScreenShare
      l379 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetSampleAttachmentsArray", referenced from:
      l372 in ZoomVideoSDKScreenShare
  "_CMSampleBufferGetSampleTimingInfoArray", referenced from:
      l490 in ZoomVideoSDKScreenShare
  "_CMSampleBufferIsValid", referenced from:
      l485 in ZoomVideoSDKScreenShare
  "_CMVideoFormatDescriptionGetH264ParameterSetAtIndex", referenced from:
      l372 in ZoomVideoSDKScreenShare
  "_VTCompressionSessionCompleteFrames", referenced from:
      l368 in ZoomVideoSDKScreenShare
      l375 in ZoomVideoSDKScreenShare
  "_VTCompressionSessionCreate", referenced from:
      l369 in ZoomVideoSDKScreenShare
      l376 in ZoomVideoSDKScreenShare
  "_VTCompressionSessionEncodeFrame", referenced from:
      l371 in ZoomVideoSDKScreenShare
      l378 in ZoomVideoSDKScreenShare
  "_VTCompressionSessionInvalidate", referenced from:
      l368 in ZoomVideoSDKScreenShare
      l375 in ZoomVideoSDKScreenShare
  "_VTSessionSetProperty", referenced from:
      l369 in ZoomVideoSDKScreenShare
      l376 in ZoomVideoSDKScreenShare
  "_kCMSampleAttachmentKey_NotSync", referenced from:
      l372 in ZoomVideoSDKScreenShare
  "_kCMTimeInvalid", referenced from:
      l368 in ZoomVideoSDKScreenShare
      l375 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_AllowFrameReordering", referenced from:
      l369 in ZoomVideoSDKScreenShare
      l376 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_AverageBitRate", referenced from:
      l369 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_DataRateLimits", referenced from:
      l369 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_ExpectedFrameRate", referenced from:
      l369 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_FieldCount", referenced from:
      l376 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_MaxFrameDelayCount", referenced from:
      l376 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_ProfileLevel", referenced from:
      l369 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_Quality", referenced from:
      l376 in ZoomVideoSDKScreenShare
  "_kVTCompressionPropertyKey_RealTime", referenced from:
      l369 in ZoomVideoSDKScreenShare
      l376 in ZoomVideoSDKScreenShare
  "_kVTProfileLevel_H264_Baseline_AutoLevel", referenced from:
      l369 in ZoomVideoSDKScreenShare
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
-ld64 is deprecated, use -ld_classic instead
Undefined symbol: _CMAudioFormatDescriptionGetRichestDecodableFormat
Undefined symbol: _CMBlockBufferGetDataPointer
Undefined symbol: _CMGetAttachment
Undefined symbol: _CMSampleBufferDataIsReady
Undefined symbol: _CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer
Undefined symbol: _CMSampleBufferGetDataBuffer
Undefined symbol: _CMSampleBufferGetDuration
Undefined symbol: _CMSampleBufferGetFormatDescription
Undefined symbol: _CMSampleBufferGetImageBuffer
Undefined symbol: _CMSampleBufferGetNumSamples
Undefined symbol: _CMSampleBufferGetPresentationTimeStamp
Undefined symbol: _CMSampleBufferGetSampleAttachmentsArray
Undefined symbol: _CMSampleBufferGetSampleTimingInfoArray
Undefined symbol: _CMSampleBufferIsValid
Undefined symbol: _CMVideoFormatDescriptionGetH264ParameterSetAtIndex
Undefined symbol: _VTCompressionSessionCompleteFrames
Undefined symbol: _VTCompressionSessionCreate
Undefined symbol: _VTCompressionSessionEncodeFrame
Undefined symbol: _VTCompressionSessionInvalidate
Undefined symbol: _VTSessionSetProperty
Undefined symbol: _kCMSampleAttachmentKey_NotSync
Undefined symbol: _kCMTimeInvalid
Undefined symbol: _kVTCompressionPropertyKey_AllowFrameReordering
Undefined symbol: _kVTCompressionPropertyKey_AverageBitRate
Undefined symbol: _kVTCompressionPropertyKey_DataRateLimits
Undefined symbol: _kVTCompressionPropertyKey_ExpectedFrameRate
Undefined symbol: _kVTCompressionPropertyKey_FieldCount
Undefined symbol: _kVTCompressionPropertyKey_MaxFrameDelayCount
Undefined symbol: _kVTCompressionPropertyKey_ProfileLevel
Undefined symbol: _kVTCompressionPropertyKey_Quality
Undefined symbol: _kVTCompressionPropertyKey_RealTime
Undefined symbol: _kVTProfileLevel_H264_Baseline_AutoLevel
Linker command failed with exit code 1 (use -v to see invocation)

Smartphone target

  • Simulator iPhone 15 v17.2
  • iPhone SE v17.4.1

Development machine
MacBook Pro - Apple M1

Hi,

Please first upgrade Xcode.

Then Open project in Xcode & add target with screenshare xcframework & required media frameworks from Xcode.

Thanks for the response - initially I didn’t understand what you meant (I’m very not familiar with iOS, I’m more of an Android dev), but after a bit of research and asking copilot a few questions about it, I found out what needs to be done, so let me post the specifics here in case others get stuck with this:

  1. In Xcode, go to the project’s “Build Phases” tab.
  2. Find the “Link binary with Libraries” panel.
  3. Add these two new entries:
  • CoreMedia.framework
  • VideoToolbox.framework

Project is now building successfully!