I upgraded to 220.127.116.117 in order to have Sugar for iOS since they weren’t included in 18.104.22.1685.
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 22.214.171.1245 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 126.96.36.1995.
Thanks in advance for a reply!