0
我已经将现有的XCode项目转换为Rubymotion,但我一直遇到与Facebook-iOS-SDK集成的问题。Rubymotion使用Facebook-iOS-SDK时出错
在我的Rakefile:
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'motion-cocoapods'
require File.join(File.dirname(__FILE__), 'version')
Motion::Project::App.setup do |app|
app.name = "My App"
app.pods do
dependency 'Facebook-iOS-SDK', '~> 1.2'
end
end
在我的应用程序代表,我有一个Facebook对象定义的属性:
def facebook
@facebook ||= Facebook.alloc.initWithAppId(FACEBOOK_APP_ID, andDelegate:self)
end
虽然我可以调用facebook.authorize()
没有任何问题,当我问如果Facebook的会话是有效的:
appDelegate = UIApplication.sharedApplication.delegate
if appDelegate.facebook.sessionValid?
# do something here...
end
我得到这个异常:
(main)> Objective-C stub for message `isSessionValid' type `[email protected]:' not precompiled. Make sure you properly link with the framework or library that defines this message.
有没有人碰到这个之前来的呢?有关如何解决此问题的任何建议?