我无法解析与rubymotion一起工作。我尝试使用cocoapod并将项目出售。我一定缺少一些琐碎的东西。对我而言,理想的方案是使用pod而不是出售项目,但是我将尽我所能地开始工作。

我一直都在使用Pod,所以我认为我的cocoapods设置不会弄乱任何东西。当我尝试通过以下方式设置应用ID和客户端密钥时,会发生此设置所导致的运行时错误:

Parse.setApplicationId('xxx', clientKey:'yyy')


我得到这个人:

app_delegate.rb:6:in `application:didFinishLaunchingWithOptions:': uninitialized constant AppDelegate::Parse (NameError)


我尝试删除我的供应商目录并多次清理。 Here is a new blank project that I created that tries to use Parse as a cocoapod and gives me that error。如果有人可以看一下它是否对您有用,我将不胜感激。

在另一种情况下,我将Parse添加为供应商项目。我还添加了几个.dylib和框架。 Here is another blank project I created to illustrate this scenario.尝试运行此版本时,出现以下编译时错误:

Build ./build/iPhoneSimulator-6.0-Development
     Build vendor/Parse.framework
   Compile ./app/app_delegate.rb
    Create ./build/iPhoneSimulator-6.0-Development/test.app
      Link ./build/iPhoneSimulator-6.0-Development/test.app/test
Undefined symbols for architecture i386:
  "_ACAccountTypeIdentifierFacebook", referenced from:
      +[PF_FBSession renewSystemAuthorization] in Parse(PF_FBSession.o)
  "_ACFacebookAppIdKey", referenced from:
      -[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
  "_ACFacebookAudienceEveryone", referenced from:
      -[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
  "_ACFacebookAudienceFriends", referenced from:
      -[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
  "_ACFacebookAudienceKey", referenced from:
      -[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
  "_ACFacebookAudienceOnlyMe", referenced from:
      -[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
  "_ACFacebookPermissionsKey", referenced from:
      -[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
  "_OBJC_CLASS_$_ACAccountStore", referenced from:
      objc-class-ref in Parse(PF_FBSession.o)
  "_OBJC_CLASS_$_ASIdentifierManager", referenced from:
      objc-class-ref in Parse(PF_FBSettings.o)
  "_OBJC_CLASS_$_CLLocationManager", referenced from:
      objc-class-ref in Parse(PFLocationManager.o)
  "_OBJC_CLASS_$_SKPayment", referenced from:
      objc-class-ref in Parse(PFPurchase.o)
  "_OBJC_CLASS_$_SKPaymentQueue", referenced from:
      objc-class-ref in Parse(PFPurchase.o)
      objc-class-ref in Parse(PFPaymentTransactionObserver.o)
  "_OBJC_CLASS_$_SKProductsRequest", referenced from:
      objc-class-ref in Parse(PFPurchase.o)
  "_OBJC_CLASS_$_SLComposeViewController", referenced from:
      objc-class-ref in Parse(PF_FBNativeDialogs.o)
  "_SLServiceTypeFacebook", referenced from:
      +[PF_FBNativeDialogs composeViewControllerWithSession:handler:] in Parse(PF_FBNativeDialogs.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:386:in `build'
/Library/RubyMotion/lib/motion/project/app.rb:72:in `build'
/Library/RubyMotion/lib/motion/project.rb:51:in `block (2 levels) in <top (required)>'
/Users/pachun/.rvm/gems/ruby-1.9.3-p327@motion/bin/ruby_noexec_wrapper:14:in `eval'
/Users/pachun/.rvm/gems/ruby-1.9.3-p327@motion/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => default => simulator => build:simulator
(See full trace by running task with --trace)


如果使用过解析的人可以看一下并让我知道他们是否得到了相同的东西/他们认为问题出在哪里,我将非常感激。这阻止了我。谢谢,

帕春

最佳答案

首先,没有Parse CocoaPod。

其次,Rakefile的问题在于您没有包括所有必需的库。这对我有用:https://gist.github.com/4367907

08-17 03:52