-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter and function naming issue #2
Comments
Similarly,
|
Also: - (void) loginWith:(NSString *) userId
token:(NSString *) token
completion:(void (^)(EMError *)) completion; should be - (void) loginWithUserId:(NSString *) userId
token:(NSString *) token
completion:(void (^)(EMError *)) completion; |
There's many more, please check objc-swift interoperability in general across the package |
If I want to adapt to the standard official recommended format of Objective-C language declaration function, I need to do a lot of function name refactoring work. Then it needs to be modified to perform regression testing demo and example projects, which all require a lot of time. Our compatibility with OC language is only to allow them to use it. As for the naming problem, it does exist, but the time and cost of transformation are too high, so we will maintain the status quo for the time being. |
@zjc19891106 could at least the ones above be addressed? these are some pretty low hanging fixes, and are going to be used by a majority of developers. |
The function
ChatroomUIKitClient/launchRoomViewWithOptionsWithRoomId
should just have one with, and that should be the first parameter, so should instead be called:launchRoomViewWithRoomId
. With the current set-up it appears in Swift aslaunchRoomViewWithOptions(roomId:frame:is:options:)
The parameter isOwner is set up as:
is:(BOOL) owner
, so when imported to swift the parameter is justis
. Instead it should beisOwner:(BOOL) owner
.With those changes, the swift function will become
launchRoomView(roomId:frame:isOwner:options:)
.The text was updated successfully, but these errors were encountered: