All Questions
Tagged with objective-c kotlin
17
questions
0
votes
1
answer
27
views
Kotlin Multiplatform objective-c export file name convention
What logic is used to create class and protocol names when Kotlin code is exported to Objective-C? Additionally, where can I find detailed information about this process?
Where code like:
package ...
1
vote
1
answer
155
views
Kotlin multi platform project can't find iOS Framework
I'm following the documentation for adding a iOS framework without cocoapods to a KMM project,
And I'm getting this error when syncing the gradle, and of course is not integrating the framework, the ...
0
votes
0
answers
60
views
Kotlin multiplatform type that translates to NSInteger
Using Kotlin multiplatform 1.9.10, both of these Kotlin functions:
fun foo(bar: NSInteger) = ...
fun fizz(buzz: integer_t) = ...
show up in the Objective-C header with an int64_t argument, not ...
0
votes
0
answers
37
views
Exception when calling abstract function with NSData
I am using Kotlin Multiplatform to provide utility functions for an iOS app. On the rare occasion when calling an abstract function (intended to be implemented in Objective-C) an "Objective-C ...
0
votes
0
answers
151
views
Kotlin MPP: iOS Memory overload when using Kotlin defined function
I’m creating a kotlin multiplatform application that runs on web, iOS and Android that will process images captured from the device’s video stream. The processing works fine on Android and web, but ...
1
vote
0
answers
556
views
KMM Library - How to implement Kotlin sealed class/interface into Swift switch
So I'm trying out KMM Library (not App) that will be imported into .xcframework/.framework for Xcode project and .aar for Android project.
I wanted to implement UIState (Loading, Success, and Error) ...
2
votes
1
answer
908
views
KMM: Cast string to NSString get warning "This case can never succeed"
In my KMM project, I have a method to invoke Objective-C predicateWithFormat method inside it. And when I try to cast the passing string text to NSString, I got this warning "This cast can never ...
1
vote
0
answers
291
views
KMM Project obfuscate Kotlin before build framework
With KMM project, I can build compile code into a file aar for obfuscating code.
But I can't find the way to obfuscate code for objective-c after compiled code.
How can I solve it?
0
votes
1
answer
337
views
None of the following functions can be called with the arguments supplied when use Alloc
I am new with kotlin multiplatform
I want to convert this function from objective C to kotlin
NSString *RCTMD5Hash(NSString *string)
{
const char *str = string.UTF8String;
unsigned char result[...
0
votes
2
answers
505
views
Pass value as reference in Kotlin
I want to convert code Objective C to Kotlin multiplatform
This is Objective C code
{
NSFileManager *fileManager = [[NSFileManager alloc] init];
BOOL isDir;
BOOL exists = [fileManager ...
0
votes
1
answer
2k
views
SQL - SQLiteDatabaseCorruptException - file is not a database while compiling: PRAGMA journal_mode
I have been working on migrating our DB on a Kotlin Multiplatform project to be encrypted from unencrypted. It's all done on Android, however the iOS part is proving tricky.
Finally I got it somewhat ...
5
votes
2
answers
1k
views
Subclassing UIView from Kotlin Native
UIKit is designed to be used through subclasses and overridden methods.
Typically, the drawRect objective-C method of UIView is implemented like this in SWIFT:
import UIKit
import Foundation
class ...
1
vote
1
answer
684
views
Optionals/Nullables with Kotlin native and ObjectiveC/Swift
I have a kotlin function returning a Nullable like the following:
fun getBoolOrNil(): Boolean? {
if (something){
return true
}
return null
}
I then crosscompile this with kotlin ...
3
votes
2
answers
3k
views
Kotlin Native iOS string formatting with vararg
Based on this issue about using NSString formatting I try to implement multiplatform implementation for formatting when using vararg, with no luck so far.
What I did
added FoundationInterop.def
...
1
vote
1
answer
171
views
Activating Users' mobile phone camera Documents mode in App
Background
I am building an Optical Character Recognition (OCR) tool that makes sense of photographed Forms.
Arguably the most complicated part of the pipeline is to get the target Document into ...