未定义的方法`[]'为nil:NilClass`read_provisioned_profile_array' on rake device mode =在RubyMotion中发布

时间:2014-06-29 05:45:11

标签: rubymotion

在这里难倒......

我正在测试红宝石动作应用的发布模式,但在尝试使用设备模式=发布时不断出现此错误

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

1 个答案:

答案 0 :(得分:0)

这发生在我身上,因为我使用的配置文件是企业配置文件。在开发构建中,如果指定了配置文件,它将查找ProvisionedDevices的密钥(不在企业资源调配配置文件中)。这导致它破裂。

正在开展工作:https://github.com/HipByte/RubyMotion/pull/64

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

修改:确保您的预发布配置文件中包含设备!