Git Product home page Git Product logo

Comments (3)

CooperCorona avatar CooperCorona commented on May 2, 2024 1

Hi peixuan197.

Try creating a file named Podfile in the root directory (the same folder containing GTXiLib.xcodeproj) with these contents:

target 'GTXiLib' do
  pod 'Protobuf-C++'
end

Then run pod install, and open GTXiLib.xcworkspace. Not GTXiLib.xcodeproj. You can install CocoaPods using gem or Homebrew.

GTXiLib now requires Protobuf support. By far the easiest way to support this is CocoaPods. You can build Protobuf from source, but it's much more complicated. You need to build the proto compiler for "cross compilation", because you're running the compiler on MacOS but generating output for iOS.

from gtxilib.

kkorouei avatar kkorouei commented on May 2, 2024

The newest version has fixed this issue. See below:

Your Podfile should look like

use_modular_headers!
target "NameOfYourProject" do
  pod "GTXiLib"
end

with an optional version specifier for "GTXiLib". Note the use_modular_headers! line and the lack of use_frameworks!. As of CocoaPods 1.5.0, use_frameworks! is no longer required for Swift projects. use_frameworks! makes Protobuf-C++, which is a dependency of GTXiLib, fail to import properly. Thus, you cannot use use_frameworks!, which means you must use use_modular_headers!. You may also specify :modular_headers => true on a per-pod basis. Then, add import GTXiLib to your Swift files, and you can use GTXiLib APIs.

I should note that I wasn't able to make this work using the per-pod basis installation (:modular_headers=>true)

An alternative approach is to use version 3.1.0 which doesn't use Protobuf.

from gtxilib.

pranav-vempati avatar pranav-vempati commented on May 2, 2024

CooperCorona's recommendation to use the 'Protobuf-C++' pod in conjunction with specifying use_modular_headers! as kkorouei suggested did the trick for me.

from gtxilib.

Related Issues (18)

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.