简体   繁体   English

RubyMotion Parse.com错误

[英]RubyMotion Parse.com error

I hope someone here can help me. 我希望这里有人可以帮助我。 I've added the Parse.framework to my vendor vendor and have the following inside my rakefile : 我已经将Parse.framework添加到我的供应vendor供应vendor并且在我的rakefile包含以下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

When I rake, I get the following error: 耙耙时,出现以下错误:

  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)

It seems to be something related to Facebook? 似乎与Facebook有关? I've installed the Facebook SDK but it didn't make any difference. 我已经安装了Facebook SDK,但没有任何区别。 I've googled parts of the error but without any success. 我已经搜索了部分错误,但没有成功。 I've tried a ton of different rake configs I've found but none worked. 我已经尝试了很多不同的rake配置,但是都没有用。 Did I forget to add something specific to my rakefile ? 我是否忘了为我的rakefile添加一些特定rakefile Or somewhere else? 或者别的地方? Thanks! 谢谢!

You should add Facebook SDK into your project. 您应该将Facebook SDK添加到您的项目中。 Or, you should add method symbols by refer Parse for iOS: Errors when trying to run the app ( https://github.com/Watson1978/HelloParse ) 或者,您应该参考iOS的Parse来添加方法符号:尝试运行应用程序时出错https://github.com/Watson1978/HelloParse

Try running: 尝试运行:

rake clean Or rake clean

Open XCode goto Preferences > Downloads > Components and Install 5.1 Stimulator if its not installed. 打开XCode goto首选项>下载>组件,然后安装5.1 Stimulator(如果未安装)。 Then in your Rakefile set 然后在您的Rakefile中设置

app.sdk_version = "5.1"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM