首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RubyMotion: Objective存根用于消息“`logInWithPermissions:block:‘V”:@@?未预编译

RubyMotion: Objective存根用于消息“`logInWithPermissions:block:‘V”:@@?未预编译
EN

Stack Overflow用户
提问于 2014-08-25 10:41:17
回答 1查看 547关注 0票数 0

我试图通过Parse.com iOS SDK实现Facebook登录。当我尝试使用PFFacebookUtils.loginWithPermissions:block:方法时,我得到了错误。

代码语言:javascript
复制
Objective-C stub for message `logInWithPermissions:block:' type `v@:@@?' not precompiled. Make sure you properly link with the framework or library that defines this message.

有人经历过吗?

我使用

  • 红宝石运动2.31
  • 解析-IOS-SDK1.2.19(使用cocoapods)

这是我的Rakefile:

代码语言:javascript
复制
$:.unshift('/Library/RubyMotion/lib')
require 'motion/project/template/ios'
require 'bundler'
Bundler.require

Motion::Project::App.setup do |app|

  app.name = 'myapp'
  app.identifier = 'com.your_domain_here.myapp'
  app.short_version = '0.1.0'
  app.version = app.short_version
  app.sdk_version = '7.1'
  app.deployment_target = '7.0'
  app.icons = ["icon@2x.png", "icon-29@2x.png", "icon-40@2x.png", "icon-60@2x.png", "icon-76@2x.png", "icon-512@2x.png"]
  app.device_family = [:iphone]
  app.interface_orientations = [:portrait]

  app.files += Dir.glob(File.join(app.project_dir, 'lib/**/*.rb'))

  app.frameworks += [
    'Accounts',
    'AudioToolbox',
    'CFNetwork',
    'CoreGraphics',
    'CoreLocation',
    'MobileCoreServices',
    'QuartzCore',
    'Security',
    'Social',
    'StoreKit',
    'SystemConfiguration']

  app.libs += [
    '/usr/lib/libz.dylib',
    '/usr/lib/libsqlite3.dylib']

  app.pods do
    pod 'SVProgressHUD'
    pod 'Parse-iOS-SDK'
  end

  FB_APP_ID = '<my facebookAppId>'
  app.info_plist['FacebookAppID'] = FB_APP_ID
  app.info_plist['CFBundleURLTypes'] = [{ CFBundleURLSchemes: ["fb#{FB_APP_ID}"] }]
end

相关代码:

代码语言:javascript
复制
def login_with_facebook
  PFFacebookUtils.logInWithPermissions(['email'],
    block: lambda do |user, error|
      if !user
        puts 'failed!'
      elsif user.isNew
        puts 'User signed up and logged in through Facebook!'
      else
        puts 'User logged in through Facebook!'
      end
    end
  )
end
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-25 13:43:28

这是生成Parse桥文件的方式中的一个已知错误:

http://hipbyte.myjetbrains.com/youtrack/issue/RM-119

在这里解决问题(对我来说,我不得不在vendor/Pods/build-iPhoneSimulator/Pods.bridgesupport文件中进行替换)

https://groups.google.com/forum/#!msg/rubymotion/36WCWPPkPdc/kBCDS-DOSjsJ

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25484082

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档