【问题标题】:undefined method `[]' for nil:NilClass `read_provisioned_profile_array' on rake device mode=release in RubyMotionnil:NilClass `read_provisioned_profile_array' 的未定义方法`[]' on rake device mode=release in RubyMotion
【发布时间】:2014-06-29 05:45:11
【问题描述】:

这里好难过……

我正在测试 ruby​​ 运动应用程序的发布模式,但在尝试 rake device mode=release 时不断收到此错误

rake aborted!
undefined method `[]' for nil:NilClass
/Library/RubyMotion/lib/motion/project/template/ios/config.rb:128:in `read_provisioned_profile_array'
/Library/RubyMotion/lib/motion/project/template/ios/config.rb:133:in `provisioned_devices'
/Library/RubyMotion/lib/motion/project/template/ios.rb:208:in `block in <top (required)>'

我尝试了一些不同的方法,因为我假设这与我的配置文件有关。

  • 生成的新证书
  • 生成的新配置文件
  • 注释掉整个开发块

在我弄清楚为什么会出现此错误之前,我完全被难住了,无法进行任何进一步的测试。有什么想法吗?

这是我的 Rakefile 供参考:

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.name = 'Ultra App'
  app.deployment_target = "7.0"
  app.device_family = [:iphone]
  app.fonts = ['TitilliumWeb.ttf']
  app.icons = Dir.glob("resources/Icon*.png").map{|icon| icon.split("/").last} #['Icon.png', 'Icon@2x.png']
  app.seed_id = "QKKZN47C74"
  app.identifier = 'net.ultraapp'


  app.version = "1"
  app.short_version = "1.0.0"

  app.info_plist['APP_STORE_ID'] = 884636264
  app.info_plist['UIRequiredDeviceCapabilities'] = {
    'location-services' => true
  }



  app.development do
    app.codesign_certificate = "iPhone Developer: Seth Siegler (ZTGHVU7A3C)"
    app.provisioning_profile = "./environment/pre_release.mobileprovision"
    app.entitlements['aps-environment'] = 'development'
    app.entitlements['get-task-allow'] = true

    app.entitlements['application-identifier'] = app.seed_id + '.' + app.identifier
    app.entitlements['keychain-access-groups'] = [
    app.seed_id + '.' + app.identifier
  ]
  end

  app.interface_orientations = [:portrait]
  app.weak_frameworks += %w(AdSupport Accounts Social)
  app.frameworks += %w(CoreLocation MapKit StoreKit AudioToolbox CFNetwork SystemConfiguration 
    MobileCoreServices Security QuartzCore MessageUI CoreTelephony)
  app.vendor_project('vendor/Flurry', :static)
  #app.vendor_project('vendor/Parse.framework', :static, :products => ['Parse'], :headers_dir => 'Headers')
  app.pods do
     pod 'Facebook-iOS-SDK'
     pod 'SVProgressHUD'
     pod 'AWSiOSSDK'
  end
  #app.info_plist['FacebookAppID'] = '222889081226072'
  #app.info_plist['URL types'] = [{ 'URL Schemes' => ['fb222889081226072']}]
  app.release do
    app.codesign_certificate = "iPhone Distribution: Seth Siegler (QKKZN47C74)"
    app.provisioning_profile = "ultra_release.mobileprovision"
    app.info_plist['AppStoreRelease'] = true
    app.entitlements['get-task-allow'] = false 
  end
end

【问题讨论】:

  • 在黑暗中拍摄。如果您提供发布配置文件的完整路径会怎样?
  • 欣赏任何镜头@willrax 我试过了,结果是一样的。有趣的是,rake archive:distribution 成功且没有错误。
  • 这是有问题的行。也许它可以提供一些启示。 github.com/HipByte/RubyMotion/blob/master/lib/motion/project/…
  • 如果我没看错,是不是配置文件的内容有问题?我一定是在创建它时做错了什么
  • 有什么解决办法吗?我也有同样的问题...

标签: rubymotion


【解决方案1】:

这发生在我身上,因为我使用的配置文件是企业配置文件。在开发版本中,如果指定了配置文件,它会查找 ProvisionedDevices 的键(不在企业配置文件中)。这会导致它破裂。

正在处理中:https://github.com/HipByte/RubyMotion/pull/64

解决此问题的方法是不使用企业配置文件配置开发版本。

编辑:确保您的预发布配置文件绑定了设备!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-03-03
    • 2016-01-29
    • 1970-01-01
    • 2013-03-04
    • 1970-01-01
    • 1970-01-01
    • 2022-11-21
    • 1970-01-01
    相关资源
    最近更新 更多