jasonkneen / ti-html2as

HTML 2 AttributedString converter for Titanium
Other
64 stars 24 forks source link

invalid method (createAttributedString) passed to UIModule #25

Closed oakleaf closed 9 years ago

oakleaf commented 9 years ago

Hello, I use Ti SDK 5.0 with iOS9 & html2as v.1.3.2

In the simulator everything works perfect, but on the device, im getting the red Application error that says:

"invalid method (createAttributedString) passed to UIModule at nl.fokkezb.html2as.js (line 1)"

FokkeZB commented 9 years ago

Could you do me a favour and log Ti.version from in that same app to see what the value is?

https://github.com/FokkeZB/ti-html2as/blob/master/index.js#L4

oakleaf commented 9 years ago

Hey ofcourse!

Ti.version == 5.0.0

FokkeZB commented 9 years ago

What is puzzling me is that you shouldn't be able to use packaged CommonJS modules with 5.0.0.GA anyway because of https://jira.appcelerator.org/browse/TIMOB-19545. Or did build and drop in just the JS file?

Anyway, that's what I did to trace your bug and the problem was that because I used a reference to either Ti.UI or Ti.UI.iOS Titanium didn't include the class in device builds. I'll push a fix soon.

oakleaf commented 9 years ago

Aha well that sounds reasonable. Yes I just dropped the JS file. Thanks!