ios - RubyMotion 和 Dropbox

标签 ios dropbox rubymotion

我正在努力让 Dropbox Sync SDK 在我的 RubyMotion 应用中运行。我环顾四周,只发现另一个人在寻找 help ,但是他使用的是 Dropbox Core SDK,而我无法按照他的方式修复它。这是我到目前为止所做的:

  1. 下载 Dropbox Sync SDK,将其移动到 vendor/Dropbox.framework
  2. 添加了 app.vendor_project 'vendor/Dropbox.framework', :static, :products => ['Dropbox'], :headers_dir => 'Headers'app.frameworks + = ['Security','QuartzCore'] 到我的 Rakefile。
  3. 运行 rake clean,然后运行 ​​rake 并获得以下输出。

Undefined symbols for architecture i386:
"std::__1::basic_string, std::__1::allocator >::compare(char const*) const", referenced from: fetch_metadata(dbx_client*, HttpRequester&, dbx_path_val const&, bool, bool, bool) in Dropbox(sync.o)

...

如果需要,我可以提供完整的堆栈跟踪。知道我错过了什么吗?感谢船载的任何帮助。

编辑:使用 markrickert 方法的堆栈跟踪:

:~/Development/simple|master⚡ ⇒  rake
rake aborted!
[!] Unable to find a specification for `Dropbox-Sync-API-SDK`.
~/.rvm/gems/ruby-1.9.3-p448/gems/cocoapods-0.23.0/lib/cocoapods/resolver.rb:195:in `find_cached_set'
~/.rvm/gems/ruby-1.9.3-p448/gems/cocoapods-0.23.0/lib/cocoapods/resolver.rb:153:in `block (2 levels) in find_dependency_specs'
~/.rvm/gems/ruby-1.9.3-p448/gems/cocoapods-0.23.0/lib/cocoapods/user_interface.rb:113:in `message'
~/.rvm/gems/ruby-1.9.3-p448/gems/cocoapods-0.23.0/lib/cocoapods/resolver.rb:152:in `block in find_dependency_specs'
~/.rvm/gems/ruby-1.9.3-p448/gems/cocoapods-0.23.0/lib/cocoapods/resolver.rb:148:in `each'
~/.rvm/gems/ruby-1.9.3-p448/gems/cocoapods-0.23.0/lib/cocoapods/resolver.rb:148:in `find_dependency_specs'
~/.rvm/gems/ruby-1.9.3-p448/gems/cocoapods-0.23.0/lib/cocoapods/resolver.rb:65:in `block (2 levels) in resolve'
...

^^ 需要运行 pod setup 来解决这个问题。

最佳答案

您可能想看一下 Dropbox Sync Podspec file了解您需要做什么才能将其正确包含在您的文件中……或者您可以只使用 Cocoapod:

在你的 Gemfile 中:

gem "motion-cocoapods", '~> 1.3.0'
gem "cocoapods"

在你的 rakefile 中:

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.name = 'Whatever'

  app.pods do
    pod 'Dropbox-Sync-API-SDK'
  end
end

然后,当您运行 rake pod:install 时,它应该会自动包含所有依赖项并编译并允许您使用 SDK。

关于ios - RubyMotion 和 Dropbox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18174140/

相关文章:

ios - UITableViewCell 中的 UIPickerView 不加载数据

iphone - 在 Dropbox 上上传图片时出错

Python 和 Dropbox : How to change SmartSync setting for locally created files?

android - 将文件上传到 Android 上的特定 Dropbox 帐户

ios - 如何在 map 上绘制路径线?

ios - 如何获得行驶路线的距离?

ios - 阻止 SKSpriteNode 离开 View (Swift)

ios - (const) 变量的范围未定义为 extern 或 static

ios - 在 RubyMotion 应用程序中使用 Facebook SDK

ios - tableview cell 我们如何快速调整单元格的大小以及图像和标签