RubyMotion Parse.com错误

时间:2014-07-26 18:52:29

标签: ios parse-platform rubymotion

我希望有人可以帮助我。我已将Parse.framework添加到我的供应商vendor,并在rakefile内添加以下内容:

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require "rubygems"
require 'bundler'
require 'bubble-wrap/location'
Bundler.require

Motion::Project::App.setup do |app|
  app.name = 'myapp'

  app.libs << '/usr/lib/libz.1.1.3.dylib'
  app.libs << '/usr/lib/libsqlite3.dylib'
  app.frameworks += [
    'AudioToolbox',
    'Accounts',
    'AdSupport',
    'CFNetwork',
    'CoreGraphics',
    'CoreLocation',
    'MobileCoreServices',
    'QuartzCore',
    'Security',
    'Social',
    'StoreKit',
    'SystemConfiguration']

    app.vendor_project('vendor/Parse.framework', :static,
    :products => ['Parse'],
    :headers_dir => 'Headers')
end

当我耙,我收到以下错误:

  WARNING! BubbleWrap::HTTP is deprecated and will be removed, see https://github.com/rubymotion/BubbleWrap/issues/308
  WARNING! Switch to a different networking library soon - consider AFNetworking: http://afnetworking.com/
  WARNING! You can use the 'bubble-wrap-http' gem if you need compatibility: https://github.com/rubymotion/BubbleWrap-HTTP
     Build ./build/iPhoneSimulator-7.1-Development
     Build /Users/user/.rvm/gems/ruby-2.1.0/gems/cdq-0.1.9/lib/../vendor/cdq/ext
     Build vendor/Parse.framework
      Link ./build/iPhoneSimulator-7.1-Development/myapp.app/myapp
Undefined symbols for architecture i386:
  "_FBTokenInformationExpirationDateKey", referenced from:
      -[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_FBTokenInformationTokenKey", referenced from:
      -[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_FBTokenInformationUserFBIDKey", referenced from:
      -[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
      -[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
  "_OBJC_CLASS_$_FBAppCall", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBRequest", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSession", referenced from:
      objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
  "_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_CLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
  "_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
      _OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
rake aborted!
Command failed with status (1): [/Applications/Xcode.app/Contents/Developer...]
/Library/RubyMotion/lib/motion/project/builder.rb:306:in `build'
/Library/RubyMotion/lib/motion/project/app.rb:78:in `build'
/Users/user/.rvm/gems/ruby-2.1.0/gems/motion-cocoapods-1.5.0/lib/motion/project/cocoapods.rb:53:in `build_with_cocoapods'
/Library/RubyMotion/lib/motion/project/template/ios.rb:68:in `block (2 levels) in <top (required)>'
/Library/RubyMotion/lib/motion/project/template/ios.rb:122:in `block in <top (required)>'
/Users/user/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/Users/user/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => build:simulator
(See full trace by running task with --trace)

这似乎与Facebook有关?我已经安装了Facebook SDK,但没有任何区别。我用Google搜索了部分错误,但没有任何成功。我已经尝试了很多不同的rake配置,但我没有找到。我忘记添加特定于rakefile的内容了吗?或者别的地方?谢谢!

2 个答案:

答案 0 :(得分:1)

您应该将Facebook SDK添加到您的项目中。 或者,您应该通过引用Parse for iOS: Errors when trying to run the app添加方法符号 (https://github.com/Watson1978/HelloParse

答案 1 :(得分:0)

尝试跑步:

rake clean

打开XCode goto首选项&gt;下载&gt;组件和安装5.1 Stimulator如果未安装。然后在你的Rakefile集中

app.sdk_version = "5.1"