Cc.Rect is not a function running on IOS

MY application runs good on the web, but when I am trying to run it in ios, I got this error.

/.../runtime/mac/PrebuiltRuntimeJs.app/../../../src/StartScene.js:34:TypeError: cc.Rect is not a function

I am using cocos-js v3.0

using cc.rect

OK. I changed it to cc.rect and it didn’t complain, but it not working either. I am using it to create a Scale9Sprite and now it is not showing it. BTW the API documentation says Rect. Is there any other function like this?

cc.Rect’s API reference:
http://www.cocos2d-x.org/reference/html5-js/V3.0/symbols/cc.Rect.html

And the information have been noted here:

cc.Rect(x, y, width, height)
cc.Rect is the class for rect object, please do not use its constructor to create rects, use cc.rect() alias function instead.

By the way, can you post your sample code for others to see what’s going wrong in your code ?

Thanks. My code was very basic - just calling Rect - I would post code samples for ay upcoming question.

BTW, May I suggest using a stronger expression than “please do not use.” It simply doesn’t work. Maybe mark it as private if at all possible. Or just remove the documentation for that method.