-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add CocoaPods support #1685
Comments
What's the status of this? Do we have support for cocoapods already available? |
We do not have support for cocoapods and no one on the team is working on this yet. Happy to accept contributions if this is something you're interested in helping out with :) |
@bourdakos1 Hi I might try to get this running on my free time, no promises haha I noticed the following dependencies:
Is there a reason to continue using your fork? I think the official has the same code as the fork, it also looks like it might be trickier since I think I should add support to both of these dependencies, and maybe another one that I'm missing |
Haha no worries, any attempt is greatly appreciated, even if it doesn’t work out 😊 Nearby needs C++17 support, so my fork has a cxx17 branch that compiles abseil with C++17 instead of 14. Otherwise I get a bunch of linker errors (if I remember correctly). However, if you are able to get this building with the main abseil repo, that would be a huge win! |
@bourdakos1 I've been trying to make a pod of NearbyCoreAdapter, with no luck I want to see if I can build it before in order to debug it a little better, could you give me a hand on building the code, there's a BUILD file but not sure how to use it Thanks for your support |
The BUILD file is for Bazel, which I’m not sure if that even works for NearbyCoreAdapter. I normally use SPM to build. You should just be able to run “swift build” from the repo root. Hope that helps :) don’t hesitate to reach out if you have any other questions on the build process |
I think I hit a big wall right now. Im not experience in iOS development in the least. But for what I gathered working around with the library is that it does not support simulator. And what I found is that CocoaPods does not have a way to disable said support, I might be wrong but im getting this kind of errors when building NearbyCoreAdapter usingo cocoapods: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk/usr/include/c++/v1/stdexcept:204:62: error: unknown type name 'string' |
Hmm the library should support the simulator. (I’m able to run an app built with the SPM version on the simulator) “Unknown type name ‘string’” sounds like a C++ header is being exposed to Swift. Do you have a branch I can take a look at? |
Yep that was it, I don't have much of a branch since I'm playing around with it trying to make it work. Now I have a different error but will try to work more on it. Thanks! This is the podspec that I have for now:
|
Does anyone have a solution for Cocoapods? |
What would you like to be added?
Add CocoaPods support as an alternative to Swift Package Manager for Nearby Connections.
Why is this needed?
Frameworks like Flutter and React Native rely on CocoaPods for their plugin system. This makes it nearly impossible to distribute Nearby Connections as a plugin for these frameworks.
The text was updated successfully, but these errors were encountered: