Anamika Trivedi
08/01/2022, 6:51 PMpablisco
08/01/2022, 11:58 PMelect
08/02/2022, 6:46 AMtoLowerCase()
should be marked deprecated (and I should have lowerCase()
available both are not. I'm using
plugins {
kotlin("multiplatform") version embeddedKotlinVersion // 1.6.21 as Gradle 7.5
}
Dzmitry Petrushenka
08/01/2022, 4:24 PMtimkranen
08/02/2022, 7:53 AMelect
08/02/2022, 8:17 AMbuild
task somehow
I tried
build { dependsOn(generateCode) }
but it fails
> Task :transformCommonMainDependenciesMetadata
> Task :generateProjectStructureMetadata
> Task :compileCommonMainKotlinMetadata FAILEDI tried then
getByName("compileCommonMainKotlinMetadata") { dependsOn(generateCode) }
but
Task with name 'compileCommonMainKotlinMetadata' not found in root project 'glm'.
Ali Albaali
08/02/2022, 1:54 PMmartmists
08/02/2022, 1:53 PMjvm()
js(IR) {
browser()
nodejs()
}
androidNativeX64()
androidNativeX86()
androidNativeArm32()
androidNativeArm64()
ios()
watchos()
tvos()
linuxX64()
linuxArm64()
linuxArm32Hfp()
linuxMips32()
linuxMipsel32()
mingwX64()
mingwX86()
macosX64()
macosArm64()
wasm32()
Robert Munro
08/02/2022, 4:01 PMiosMain
https://medium.com/mobil-dev/background-task-with-bgtaskscheduler-1d49e22b1519
I seem to be able to get the BGTaskScheduler
fine but i cant import the Operation
class needed to schedule the actual work. would it be named differently? or access the operationQueue
.
override fun createBatchAndAppendBoxesToIt(
localBatchId: String,
batchTimestamp: Long,
batchName: String,
boxes: List<LocalBox>
) {
val identifier = createUniqueWorkName(localBatchId)
BGTaskScheduler.sharedScheduler.registerForTaskWithIdentifier(identifier, null) { task ->
val request = BGAppRefreshTaskRequest(identifier)
request.earliestBeginDate = null
try {
// what's this do? pointer for submitError? CPointer<ObjCObjectVar<NSError?>>?
BGTaskScheduler.sharedScheduler.submitTaskRequest(request, null)
} catch (e: Exception) {
Logger.error(TAG, "Could not schedule app refresh", e)
}
val operation = CreateBatchWorker() // should inherit from Operation
//task!!.expirationHandler = { operation.cancel() }
//operation.completionBlock = { task.setTaskCompleted(!operation.isCancelled) }
//operationQueue.addOperation(operation)
}
}
Would it be better to make an interface and implement it in swift? not sureelect
08/02/2022, 5:21 PMThe TestReport.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the destinationDirectory property instead. See https://docs.gradle.org/7.5/dsl/org.gradle.api.tasks.testing.TestReport.html#org.gradle.api.tasks.testing.TestReport:destinationDir for more details.
The TestReport.reportOn(Object...) method has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the testResults method instead. See https://docs.gradle.org/7.5/dsl/org.gradle.api.tasks.testing.TestReport.html#org.gradle.api.tasks.testing.TestReport:testResults for more details.
The Report.enabled property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the required property instead. See https://docs.gradle.org/7.5/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:enabled for more details.
xxfast
08/02/2022, 11:25 PMkotlin-dsl
and the IDE seems to contradict itself when it (and the build) says that it cant this reference even when the source has it.
Unresolved reference: iosSimulatorArm64
I'm using AS Chipmunk with Kotlin 1.7.10, Gradle 7.4.2, AGP 7.2.1 on a M1 maccoolcat
08/03/2022, 3:31 PMLandry Norris
08/03/2022, 4:31 PMEugene Park
08/04/2022, 5:13 AMMap<String, String>
representation of a class's property names/values on Android/iOS.
In my commonMain, I define something like `expect fun getPropertyMap(object: BaseObject): Map<String, String>`Where I may pass in some subclass like class Child : BaseObject()
I was able to get this to work on Android, by using reflection, but am struggling with the iOS implementation. I have tried using the Kotlin platform.objc
package, but it does not seem to be able to get the property names
I also tried writing objective-c code in Xcode against the generated xcframework, but it also returns empty property list. I was wondering if anyone had some suggestions?brabo-hi
08/04/2022, 11:17 PM> Task :shared:linkPodDebugFrameworkIosX64 FAILED
e: Compilation failed: Could not initialize class kotlinx.cinterop.JvmCallbacksKt
* Source files:
* Compiler version info: Konan: 1.7.0 / Kotlin: 1.7.20
* Output kind: FRAMEWORK
e: java.lang.NoClassDefFoundError: Could not initialize class kotlinx.cinterop.JvmCallbacksKt
eygraber
08/04/2022, 11:52 PMmkrussel
03/14/2022, 8:18 PMMichael Paus
08/05/2022, 3:23 PMRindress MacDonald
08/05/2022, 3:24 PMSunil Kumar
08/05/2022, 5:14 PMeygraber
08/05/2022, 10:46 PMtargets
need to be accessed lazily (i.e. configureEach
) or is it ok to call targets.withType<T>()
Sam
08/06/2022, 8:50 AMIlya Kalibrov [JB]
08/08/2022, 7:48 AMdvdandroid
08/08/2022, 9:42 AMandroid()
in kotlin
block?
this is like: https://youtrack.jetbrains.com/issue/KT-52666diego-gomez-olvera
08/08/2022, 12:11 PMpodPublishReleaseXCFramework
from native.cocoapods plugin expected to generate a .dSYM? So far I see it when I run assemble<lib>XCFramework
but not in that caseMichal Klimczak
08/08/2022, 2:31 PMtschuchortdev:kotlin-compile-testing
library to test the processor.
It all works fine until I start to use expect
keyword in my jvmTest tested source. It complains that The feature "multi platform projects" is experimental and should be enabled explicitly
.
Fail even if I add kotlin.mpp.stability.nowarn=true
to gradle.properties
and gradle-wrapper.properties
. Any ideas what might be wrong or how can I structure my tests differently?An Tran
08/09/2022, 4:29 AMactual
implementation in iOS
package utils
import platform.Foundation.StringStyle
internal actual fun Double.formatWithDecimalPlaces(places: Int): String {
return String(format: "%.2f", this)
}
But it has several errors:
e: …/shared/src/iosMain/kotlin/utils/DoubleExtensions.kt: (6, 25): Expecting ‘)’
e: …/shared/src/iosMain/kotlin/utils/DoubleExtensions.kt: (6, 27): Unexpected tokens (use ‘;’ to separate expressions on the same line)
e: …/shared/src/iosMain/kotlin/utils/DoubleExtensions.kt: (3, 28): Unresolved reference: StringStyle
e: …/shared/src/iosMain/kotlin/utils/DoubleExtensions.kt: (6, 12): Using ‘String(CharArray): String’ is an error. Use CharArray.concatToString() instead
e: …/shared/src/iosMain/kotlin/utils/DoubleExtensions.kt: (6, 19): Unresolved reference: formatRohan Maity
08/09/2022, 8:48 AMMiroslav Kacera
08/09/2022, 1:47 PM"Selected scheme "iosApp" does not support "iphonesimulator".
There is a ticket for the exact same issue but it's resolved as answered with link to SO solution which is not working in general. Some people say it worked for them some it didn't.
I'm using apple silicon which I suspect is responsible for most of the issues while following the tutorial. kdoctor
doesn't highlight anything specific to Android Studio there is only one failure related to cocoapods-generate
which shouldn't be a problem and is most probably because brew install location on apple silicone.
Anybody encountered this or have an ideas how to solve this? Btw running the app from xcode works so it's just the tooling (AS plugin?)Hylke Bron
08/10/2022, 9:59 AMinterface KeyValueStorage {
@Throws(Throwable::class) fun get(key: String): String?
}
This generates the following in objective-c:
- (NSString * _Nullable)getKey:(NSString *)key error:(NSError * _Nullable * _Nullable)error __attribute__((swift_name("get(key:)")));
When you try to implement this in swift (as generated by xcode)
final class SampleStorage: KeyValueStorage {
func get(key: String) throws -> String? {
return ""
}
}
This function gives this compile error:
Throwing method cannot be an implementation of an @objc requirement because it returns a value of type 'String?'; return 'Void' or a type that bridges to an Objective-C class
Does anybody has any idea what the issue is, how to solve this, or have alternative suggestions?