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

Support for iOS? #10

Closed
andreragsilva opened this issue Oct 21, 2020 · 13 comments
Closed

Support for iOS? #10

andreragsilva opened this issue Oct 21, 2020 · 13 comments
Labels
platform: apple An issue with the macOS or iOS implementation type: question General questions (we may not have time to provide an answer)

Comments

@andreragsilva
Copy link

Will there ever be support for iOS?

@bourdakos1 bourdakos1 added type: question General questions (we may not have time to provide an answer) platform: apple An issue with the macOS or iOS implementation labels Mar 19, 2023
@bourdakos1
Copy link
Collaborator

We currently have support for iOS through Swift Package Manager. This isn’t yet documented, but we will hopefully have some new documentation soon.

Until then, feel free to re-open this issue with any questions on how to get this running on iOS.

@andreragsilva
Copy link
Author

@bourdakos1 thank you for the update 👀

@IgVelasco
Copy link

Hi, I'm looking to be able to install this in my iOS project, any links or documentation that could help me?

Thank you for the help

@bourdakos1
Copy link
Collaborator

Hey @IgVelasco, you can check out the sample app here: https://github.com/google/nearby/tree/main/connections/swift/NearbyConnections/Example

and the full getting started guide here: https://developers.google.com/nearby/connections/swift/get-started

Hope this helps :)

@IgVelasco
Copy link

Hey!

Yea saw all those links already, they were helpful. But I'm encountering issues when I try adding the package to my swift code.

For more context, I'm developing a Flutter plugin to use this library and make it easier to use and connect cross-device. So I need to add the package inside the Development Pod of my plugin.

But when I do the module is nowhere to be found, do you have any idea why that could be?

NearbyCoreAdapter was showing in the imports, but not NearbyConnections!

image

I hope you can help me, if not thanks for the fast response!

@bourdakos1
Copy link
Collaborator

Do you mind sharing a screenshot of the “Package Dependencies” tab of your project settings?

@IgVelasco
Copy link

Sorry for the delay, I think the problem is that since Flutter uses CocoaPods it has issues getting the dependency inside the development pod. Is there any plan on getting it to work in CocoaPods?

image

@bourdakos1
Copy link
Collaborator

hmm yea I agree, I think that CocoaPods doesn't play nice with SPM. I was able to get NearbyConnections working with the Flutter Runner project directly, but had the same issue when trying to add NearbyConnections to a Flutter plugin. This person https://forums.swift.org/t/possible-to-use-spm-packages-from-cocoapods-pods-project/53187 had a similar experience where one of the sub-package are visible, but not the top level package.

It sounds like Flutter might be adding SPM support for plugins as discussed here: flutter/flutter#33850 and flutter/flutter#126005

Unfortunately, I don't have much CocoaPod experience. I don't think I'll be able to get CocoaPods working with the project anytime soon, as the project is quite large and has dependencies on other projects that also don't support CocoaPods.

I recommend giving the Flutter issues a thumbs-up, so they know there are people interested in using SPM in plugins and prioritize the feature.

In the meantime, if NearbyCoreAdapter is working, you could just use that since NearbyConnections is just a very thin wrapper on top of NearbyCoreAdapter.

I hope this helps a bit, sorry it's not ideal 😕

@IgVelasco
Copy link

Awesome response, yeah I got to the same point, thanks for helping me corroborate the issue I was having. I'm thinking of maybe making a React Native module. Thanks again for the help!

@eliabruni
Copy link

Awesome response, yeah I got to the same point, thanks for helping me corroborate the issue I was having. I'm thinking of maybe making a React Native module. Thanks again for the help!

Hey, just to say that a react-native module would be awesome and would definitely get quite popular - there is quite a gap to fill.

@bourdakos1
Copy link
Collaborator

It sounds like React Native also relies on CocoaPods. I'll open a new issue to track potentially adding CocoaPods support :)

@bourdakos1
Copy link
Collaborator

CocoaPods support is now being tracking in #1685

@IgVelasco
Copy link

I was able to get it running with flutter adding it manually, and using NearbyCoreAdapter. Thanks for making the ticket for tracking it! @bourdakos1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: apple An issue with the macOS or iOS implementation type: question General questions (we may not have time to provide an answer)
Projects
None yet
Development

No branches or pull requests

4 participants