3

So stumped here...

I'm working to test out the release mode of a ruby motion app but keep getting this error when trying to 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)>'

I've tried a few different things, as I'm assuming this has something to do with my provisioning profile.

  • Generated new certificate
  • Generated new provisioning profile
  • Commented out entire development block

I'm completely stumped and can't go any further in testing until I figure out why I'm getting this error. Any ideas out there?

Here's my Rakefile for reference:

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
SethS
  • 449
  • 4
  • 12
  • Shot in the dark. What happens if you provide the full path to the release provisioning profile? – willrax Jun 30 '14 at 01:58
  • Appreciate any shots at all @willrax I've tried that and am at the same result. Interestingly, rake archive:distribution succeeds without error. – SethS Jun 30 '14 at 03:30
  • Here is the offending line. Maybe it can shed some light. https://github.com/HipByte/RubyMotion/blob/master/lib/motion/project/template/ios/config.rb#L128 – willrax Jul 01 '14 at 02:35
  • So if I'm reading that correctly, it's having an issue with the contents of the Provisioning Profile file? I must be doing something wrong in creating it – SethS Jul 01 '14 at 06:09
  • Any fix? I am having the same problem... – Jared Aug 27 '14 at 19:38
  • @Jared - I actually still haven't found out why it does this. I've changed Provisioning Profiles, upgraded RM and just about every single other thing, I think. It's only an issue in this one app for me. Let me know if you find anything out... – SethS Aug 28 '14 at 03:30

1 Answers1

0

This happened to me because the provisioning profile I was using was an Enterprise profile. In development builds, if a profile is specified, it looks for a key of ProvisionedDevices (which is not in an enterprise provisioning profile). This causes it to break.

It is being worked on: https://github.com/HipByte/RubyMotion/pull/64

A workaround for this is to not provision the development builds with an enterprise profile.

edit: Make sure your pre-release profile has devices tied to it!

Jared
  • 954
  • 7
  • 16