livekit / webrtc-xcframework

MIT License
3 stars 10 forks source link

How to build? #2

Open jazzychad opened 7 months ago

jazzychad commented 7 months ago

Hello,

I am trying to replicate the building of the SDK on my Mac using the linked resources:

I have installed gn and ninja locally, and I have checked out the livekit-prefixed branch of webrtc-sdk repo along with what I assume I need is the build repo from the Chromium project (based on the gn import directives) from https://chromium.googlesource.com/chromium/src/build

However, I cannot seem to figure out how to use the build_livekit_xcframework.sh script successfully due to many gn errors being output. I think I may have a problem with the versions of my gn tool or the version of the build repo, or I have not setup the directories/repos properly on disk so that all of the commands work as they should.

Is there a way to describe what steps I need to take in order to successfully build this framework locally?

My main motivation for doing this is trying to get a framework variant for visionOS since the prebuilt mac/catalyst/ios frameworks do not properly link against the visionOS platform in Xcode when importing through Swift Package Manager.

Thanks for any info!

derek-m-ir commented 6 months ago

@jazzychad I was wondering the exact same thing! I need to build the framework. Hopefully somebody responds here!

jazzychad commented 6 months ago

@derek-m-ir after some fumbling around with all the tooling and repos I managed to get it building locally. These are the steps I got working: https://gist.github.com/jazzychad/315e89f4ac5f9bd98d2f51f08cf551d2

I don't quite remember how I got gn and ninja installed (I think I had to build one from source and I installed one from brew but I don't remember which was which).

Fwiw, I built all this on an M1 Macbook Pro.