colinta / teacup

This project has been sunset in favor of MotionKit
github.com/motion-kit/motion-kit
Other
602 stars 85 forks source link

iOS7 Beta3 crash #101

Closed stevebooks closed 11 years ago

stevebooks commented 11 years ago

Just upgraded to iOS7 (beta 3) and my application was crashing on startup. After many hours, I have tracked the issue to be a problem with teacup.

Here is my code:

######Gemfile######
source 'https://rubygems.org'

gem 'rake', '10.0.0'
gem 'teacup', '2.1.0'

######Rakefile######
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require 'bundler'

Bundler.require

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.name = 'teacupboy'
end

######App Delegate######
class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
    mine = TapController.alloc.init
    @window.rootViewController =    UINavigationController.alloc.initWithRootViewController(mine)
    true
  end
end

######TapController.rb######
class TapController < UIViewController
  def viewDidLoad
    super

    self.view.backgroundColor = UIColor.redColor
  end
end

######Stack######
Jul  8 23:56:26 Steves-iPhone teacupboy[1064] <Warning>: undefined method `each' for nil:NilClass (NoMethodError)
Jul  8 23:56:26 Steves-iPhone teacupboy[1064] <Error>: *** Terminating app due to uncaught exception 'NoMethodError', reason: 'undefined method `each' for nil:NilClass (NoMethodError)
    '
    *** First throw call stack:
colinta commented 11 years ago

Thanks for the heads up!

This is a duplicate of #103, which includes the stack trace (does your stack trace reference line 125?).

stevebooks commented 11 years ago

I was getting my output using XCode console and so it didn't have a nice stack trace. However, it is most likely the same issue as #103

Thanks