Jaroslav
11/23/2018, 8:33 AMNSTimeZone().initWithName(tzName = "UTC")
but get nullpointerexception:
Uncaught Kotlin exception: kotlin.NullPointerException
at 0 greeting 0x0000000103deb2e2 kfun:kotlin.Exception.<init>()kotlin.Exception + 50
at 1 greeting 0x0000000103deb212 kfun:kotlin.RuntimeException.<init>()kotlin.RuntimeException + 50
at 2 greeting 0x0000000103deb192 kfun:kotlin.NullPointerException.<init>()kotlin.NullPointerException + 50
at 3 greeting 0x0000000103dea4db ThrowNullPointerException + 59
at 4 greeting 0x0000000103dd757a kfun:org.greeting.Product.iosSpecificOperation()kotlin.String + 298
svyatoslav.scherbina
11/23/2018, 8:49 AMinitWithName
methods is incorrect. NSTimeZone()
is already initialized.
A proper constructor a factory should be called instead:
NSTimeZone.create(tzName = "UTC")
Jaroslav
11/23/2018, 9:26 AM