Hacker News new | ask | show | jobs
by UnfalseDesign 3721 days ago
I got similar results. I took some sample code from the Apple SpriteKit documentation:

  CGFloat distance = sqrtf((clickPoint.x-charPos.x)*(clickPoint.x-charPos.x)+
                             (clickPoint.y-charPos.y)*(clickPoint.y-charPos.y));
And got this in Swift:

  var distance:CGFloat  = sqrtf((*((clickPoint.y-charPos.y)*()
Most of the code I put in converted to Swift correctly (though it wasn't efficient Swift code) but the above line was just plain wrong. So, it still seems a little buggy but it is a good idea. Like you pointed out, it is only useful for Objective-C to Swift since the Foundation framework is not available in Android.
1 comments

Thank you for testing the service, we will fix the issue you have mentionned. This service gives just code snippet conversion. You can try an iOS project conversion to swift or Android. We have created a mapping technolgy to support iOS frameworks,Foundation and others are mapped to android API that will be included in the converion output project

Our mapping technology : https://docs.myappconverter.com/mapping_tech/ios2android/

iOS project converion : https://apps.myappconverter.com/users/sign_up