Coder Social home page Coder Social logo

Add CocoaPods support about nearby HOT 11 OPEN

google avatar google commented on May 18, 2024 4
Add CocoaPods support

from nearby.

Comments (11)

bourdakos1 avatar bourdakos1 commented on May 18, 2024 3

CC @IgVelasco @eliabruni

from nearby.

bourdakos1 avatar bourdakos1 commented on May 18, 2024 1

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 :)

from nearby.

IgVelasco avatar IgVelasco commented on May 18, 2024 1

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:

Pod::Spec.new do |s|
  s.name         = 'NearbyCoreAdapter'
  s.version      = '1.0.0'
  s.summary      = 'A summary of your NearbyCoreAdapter package.'
  s.description  = 'A detailed description of your NearbyCoreAdapter package.'
  s.homepage     = 'https://github.com/yourusername/NearbyCoreAdapter'
  s.license      = { :type => 'MIT', :file => 'LICENSE' }
  s.author       = { 'Your Name' => '[email protected]' }
  s.source       = { :git => 'https://github.com/yourusername/NearbyCoreAdapter.git', :tag => s.version.to_s }
  s.swift_version = '5.0'
  s.platform     = :ios, '13.0'
  s.compiler_flags = '-std=c++11'
  s.pod_target_xcconfig = { 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11' }

  s.public_header_files = "connections/swift/NearbyCoreAdapter/Sources/Public/NearbyCoreAdapter/*.h"
  s.source_files = [
    "connections/swift/NearbyCoreAdapter/Sources/**/*.h",
    "connections/swift/NearbyCoreAdapter/Sources/**/*.mm",
    'third_party/**/*.mm',
  ]

  # Specify dependencies located in the third_party folder
  s.private_header_files = [
    "third_party/**/*.cpp",
    "third_party/**/*.hpp",
    "third_party/**/*.h"
  ]
  
  s.dependency 'GoogleToolboxForMac'
  s.dependency 'Protobuf', '3.24'

  # You can add other third-party dependencies here
  s.preserve_paths = "NearbyCoreAdapter.framework/*"
  s.xcconfig = {
    'FRAMEWORK_SEARCH_PATH[sdk=iphoneos*]' => '$(inherited) "$(PODS_ROOT)/NearbyCoreAdapter"',
    'OTHERCFLAGS[sdk=iphoneos*]' => '$(inherited) -iframework "$(PODS_ROOT)/NearbyCoreAdapter"',
    'OTHER_LDFLAGS[sdk=iphoneos*]' => '$(inherited) -framework NearbyCoreAdapter'
}
  # ...
end

from nearby.

edgarclerigo avatar edgarclerigo commented on May 18, 2024

What's the status of this? Do we have support for cocoapods already available?

from nearby.

IgVelasco avatar IgVelasco commented on May 18, 2024

@bourdakos1 Hi I might try to get this running on my free time, no promises haha

I noticed the following dependencies:

  dependencies: [
    // Dependencies declare other packages that this package depends on.
    .package(
      name: "abseil",
      url: "https://github.com/bourdakos1/abseil-cpp-SwiftPM.git",
      branch: "cxx17"
    ),
    .package(
      name: "BoringSSL-GRPC",
      url: "https://github.com/firebase/boringssl-SwiftPM.git",
      "0.7.1"..<"0.8.0"
    ),
  ],

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

from nearby.

bourdakos1 avatar bourdakos1 commented on May 18, 2024

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!

from nearby.

IgVelasco avatar IgVelasco commented on May 18, 2024

@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

from nearby.

bourdakos1 avatar bourdakos1 commented on May 18, 2024

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

from nearby.

IgVelasco avatar IgVelasco commented on May 18, 2024

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'

from nearby.

bourdakos1 avatar bourdakos1 commented on May 18, 2024

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?

from nearby.

Droppix avatar Droppix commented on May 18, 2024

Does anyone have a solution for Cocoapods?
I'll take it...

from nearby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.