Error upgrading from Silver to and Sugar shared project code fails?

I upgraded to in order to have Sugar for iOS since they weren’t included in

Once installed my Android project failed to build with the following error:
(E0) Internal error: Object reference not set to an instance of an object.

Once I restored the Sugar.Data.jar and Sugar.jar from the backup I’ve made before upgrading my project still failed with the same error. So I downgraded to again and my Android project builds sucesfully.

I use the sugar jars supplied by mh from post:

However when I try to build the iOS application it fails horrible with 124 errors when using the Shared code project I use for Android. Mainly issues about Sugar:

(E44) No member “getIntegerValue” on type “Sugar.Json.JsonNode!”
(E44) No member “getFullPath” on type “Sugar.IO.Folder!”
(E44) No member “getItem” on type “Sugar.Collections.Dictionary<Foundation.NSObject!,Foundation.NSObject!>!”
(E44) No member “getLength” on type "Sugar.String!
(E44) No member “getMonth” on type “Sugar.DateTime!”
(E46) Unknown identifier “NoSuchMethodException”

But also nasty errors like:
(E486) Parameter 1 is “T?”, should be “T?”, in call to block (_ param0: T?, _ param1: Sugar.String?) -> Void<>!.Invoke(_ param0: T?, _ param1: Sugar.String?) -> Void

The only difference in the error is the ->Void and -> Void<> which doesn’t allows me to instantiate a completion handler to a variable in iOS.

(E486) Parameter 2 is “RequestHandler < T >”, should be "IRequestHandler < Foundation.NSObject! > ", in call to IAsyncRequestPerformer!.performAsyncTask(# requestTask: IRequestTask, # requestHandler: IRequestHandler < Foundation.NSObject! > )

While it isn’t explicitly stated that IRequestHandler should be of type Foundation.NSObject the errow shows it

And alot more methods that are missing from Sugar when building for iOS instead of Android.
I know iOS has the method GetItem on a Dictionary and that i could write an extension for Sugar.Collections.Dictionary to call GetItem when getItem is called so I don’t have to replace all but thats not what I want.

It feels like the libSugar.fx and libSugarData.fx I currently have are different from the Sugar.jar and Sugar.Data.jar

Did Sugar recently changed this much that all these methods won’t work in a shared project? If so could someone be so kind to upload the libSugar.fx and libSugarData.fx from version

Thanks in advance for a reply!


(E0) Internal error: Object reference not set to an instance of an object.

definitely isn a compiler bug. can you send us the project? the E486 sound like a bug, as well.

Sugar has been changing a lot recently, yes. I’m not sur gif i cansend you a recent sugar that will work with an older compiler, as the two are pretty tightly linked with Sugar often depending on compiler changes…


Yes I could send you the project in private which I will after replying here. I’ll also send you the Program Files(x86)/RemObjects folder so you can see it works when using the old files for Android


Thanks, logged as bugs://75317

This one is fixed for the next beta.

these won’t work. IntegerValue is a property, call it as such, to be cross-platform. getIntegerValue is the way Java calls the property getter, but on Cocoa it will be called differently. That’s a platform implementation detail. You should also use the property name, to the internal getter name to access this, i.e.

id = jsonDoc.Item[COL_ID]!.IntegerValue()

This = Int.valueOf(keyValuePairs.Item(COL_ID).toString()) // E44 No member "ToString" on type "Foundation.NSObject!"

will work if you import the sugar namespace, rather than manually prefixing it everywhere. That’s the only way the compiler will see the extension methods. Also, turn on cross-platform compatibility mode, if you want the case (toString vs ToString to be ignored; on Cocoa and .NET, and in Sugar, this is uppercased.

If you fix all these and the Parameter 1 is "T?", should be "T?" we can have another look — right now the project has too many errors for us to narrow that one down.


bugs://75317 got closed with status nochangereq.