coachroebuck
12/11/2023, 10:00 PMinterface SomeInterface <T>{
fun emit(intent: T)
}
The iOS files that are generated add one or more underscores to the parameter name. For example:
viewModel.emit(intent_________: myIntent)
I didn't really think much of this, until now. As I continue to add features to my app, this will be a problem.
Is someone able to provide insight on this?Jan Holešovský
12/12/2023, 7:04 AM- (SharedCrossoidIntent *)putExtraName:(NSString * _Nullable)name value:(id<SharedCrossoidParcelable> _Nullable)value __attribute__((swift_name("putExtra(name:value:)")));
- (SharedCrossoidIntent *)putExtraName:(NSString * _Nullable)name value_:(id<SharedCrossoidSerializable> _Nullable)value __attribute__((swift_name("putExtra(name:value_:)")));
- (SharedCrossoidIntent *)putExtraName:(NSString * _Nullable)name value__:(SharedKotlinArray<NSString *> * _Nullable)value __attribute__((swift_name("putExtra(name:value__:)")));
- (SharedCrossoidIntent *)putExtraName:(NSString * _Nullable)name value___:(BOOL)value __attribute__((swift_name("putExtra(name:value___:)")));
is generated from:
fun putExtra(name: String?, value: Parcelable?): Intent
fun putExtra(name: String?, value: Serializable?): Intent
fun putExtra(name: String?, value: Array<String?>?): Intent
fun putExtra(name: String?, value: Boolean): Intent
Jan Holešovský
12/12/2023, 7:07 AMDaniel Seither
12/12/2023, 9:36 AMcoachroebuck
12/13/2023, 12:18 AMThe signature for Swift has to have different names for different types...
Nice one! That means I get to rename the parameter name. The good news is that my mobile app is small enough to where there won't be too much impact. Thanks for that insight.