amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 10 forks source link

Update website with latest iOS/Mac OS supported versions. #68

Closed amirrajan closed 6 years ago

amirrajan commented 6 years ago

Hopefully final High Sierra issues affect apps that have set app.detect_dependencies = true to false (don't do this unless you know what you're doing). The following patch to /Library/RubyMotion/lib/motion/project/dependency.rb will be added to help you find circular dependencies, but you can apply it yourself right now if you want.

module Motion; module Project
  class Dependency
    def cyclic?(dependencies, def_path, ref_path)
      deps = dependencies[def_path]
      if deps
        if deps.include?(ref_path)
          App.warn("Possible cyclical dependency between #{def_path} and #{ref_path}'s class hierarchy. Consider revision if runtime exceptions occur around undefined symbols.")
          return true
        end
        deps.each do |file|
          return true if cyclic?(dependencies, file, ref_path)
        end
      end

      false
    end
  end
end; end