Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build a static lib for ios/macos . include all sdk/objc classes. #645

Open
YangJie09 opened this issue Dec 24, 2024 · 0 comments
Open

build a static lib for ios/macos . include all sdk/objc classes. #645

YangJie09 opened this issue Dec 24, 2024 · 0 comments

Comments

@YangJie09
Copy link

if you do:
gn gen out/ios --args='target_os="ios"
target_environment="device"
target_cpu="arm64"
rtc_enable_symbol_export=true
rtc_enable_objc_symbol_export=true
is_component_build=false
is_debug=false
enable_dsyms=true
rtc_include_tests=false
ios_enable_code_signing=false
proprietary_codecs=true
rtc_use_h264=true
use_custom_libcxx=false
ios_deployment_target="13.0"'

ninja -C out/ios webrtc

The result libwebrtc.a is not include sdk/objc symbols. you need to modify src->build.gn file:
then find: rtc_static_library("webrtc") , in the deps , add the following options:

  "api/video_codecs:builtin_video_decoder_factory",
  "api/video_codecs:builtin_video_encoder_factory",
  "sdk:audio_device",
  "sdk:audio_device_api_objc",
  "sdk:audio_device_objc",
  "sdk:audio_objc",
  "sdk:audio_session_delegate_adapter_objc",
  "sdk:audio_session_objc",
  "sdk:base_native_additions_objc",
  "sdk:base_objc",
  "sdk:callback_logger_objc",
  "sdk:common_objc",
  "sdk:dav1d_decoder",
  "sdk:default_codec_factory_objc",
  "sdk:file_logger_objc",
  "sdk:helpers_objc",
  "sdk:libaom_av1_encoder",
  "sdk:metal_objc",
  "sdk:native_api",
  "sdk:native_api_audio_device_module",
  "sdk:native_network_monitor",
  "sdk:native_video",
  "sdk:network_monitor_objc",
  "sdk:objc_audio_device_module",
  "sdk:opengl_objc",
  "sdk:opengl_ui_objc",
  "sdk:peerconnectionfactory_base_objc",
  "sdk:videocapture_objc",
  "sdk:videocapturebase_objc",
  "sdk:videocodec_objc",
  "sdk:videoframebuffer_objc",
  "sdk:videorenderer_objc",
  "sdk:videorendereradapter_objc",
  "sdk:videosource_objc",
  "sdk:videotoolbox_objc",
  "sdk:vp8",
  "sdk:vp9",
  "sdk:vpx_codec_constants",
  "sdk:wrapped_native_codec_objc",

rebuild it. you can got a complete libwebrtc.a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant