문제

In my Xcode projects I have sometimes used a category for adding zoom level functionality to MKMapView. Now I want use the category in my RubyMotion project. The files are in the vendor dir and I have included them with

app.vendor_project('vendor', :static)

It looks like the compilation goes ok, but ld complains that

ld: in /Users/admin/gitrep/bgApp/vendor/build-iPhoneSimulator/libvendor.a, 
archive has no table of contents for architecture i386

Does anyone know if this approach for including categories (and possibly also stand alone classes) work?

도움이 되었습니까?

해결책

  1. With Xcode, create a project as "Cocoa Touch Static Library" and put your codes into this project.

  2. Put this project into your vendor/.

  3. Then write like this in Rakefile to use in RubyMotion.

Rakefile

  app.vendor_project('vendor/UIFoo-Bar',
                 :xcode,
                 :headers_dir => 'UIFoo-Bar')
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top