-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat(CLNP-3879): support mmkv storage and deprecate an async storage #185
Conversation
아래와 같은 에러가 발생하면서 ios시뮬레이터에서 실행이 되지 않는데, 디버거 모드시 안된다는 내용같아서 릴리즈로 실행 했는데도? 안되고 있습니다. Error: Failed to create a new MMKV instance: React Native is not running on-device. MMKV can only be used when synchronous method invocations (JSI) are possible. If you are using a remote debugger (e.g. Chrome), switch to an on-device debugger (e.g. Flipper) instead. 동일한 이슈인것 같은데 mmkv3 베타 버전에서 잘된다고하네요 확인이 필요할것 같습니다 |
엇.. Android, iOS 실행되는걸 모두 체크를 했는데, 혹시 pod install 하셨을까요? |
네 pod install 했는데 일단 저도 다시 확인해보겠습니다 |
mmkv 사용시 remote debugging 기능이 불가능한게 맞네요 Flipper 를 사용하여 디버깅 하는것도 가능하다고는 하는데 |
packages/uikit-react-native/src/containers/SendbirdUIKitContainer.tsx
Outdated
Show resolved
Hide resolved
아 remote debugging 을 키고 계셨군요, 릴리즈때 변경사항에 포함하는건 어떨까요? |
@@ -0,0 +1,3 @@ | |||
import { MMKV } from 'react-native-mmkv'; | |||
|
|||
export const mmkv = new MMKV(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리모트 디버깅 사용시 chatOptions 에서 AsyncStorage 로 변경해도 MMKV 인스턴스가 생성되며 Excpetion이 발생하고 있습니다. 아래와 같이 변경하는건 어떨까요?
import { MMKV } from 'react-native-mmkv';
import { LocalCacheStorage } from '@sendbird/uikit-react-native';
class DevLocalCacheStorage {
getString(_key: string): string | undefined {
return undefined;
}
set(_key: string, _value: boolean | string | number | Uint8Array): void {}
delete(_key: string): void {}
getAllKeys(): string[] {
return [];
}
}
const createLocalCacheStorageInstance = (): LocalCacheStorage => {
if (__DEV__) {
return new DevLocalCacheStorage();
}
return new MMKV();
};
export const localCacheStorage = createLocalCacheStorageInstance();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bang9 요거 확인해보시고 필요없다고 판단되면 그냥 머지 해도 될것 같습니다!
다음주에 샘플 버전업한거랑 같이 배포할까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
실제 링크가 되는지 안되는지 까지 개발 시점에 알 수 있어야 해서, 요거는 포함시키지 않는게 좋을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 좋습니다~~! 그전에 요걸 위한 문서 작업을 해야해서.. ㅋㅋㅋ
그거까지 준비되면 제가 배포하겠습니다!
네 포함 시키면 좋을것 같습니다. 다만 걱정되는건 remote debugging 사용하는 고객들이 mmkv 적용된 버전 사용하고나서 저희쪽으로 이슈 문의를 계속 하지않을까? 라는 걱정이 듭니다. |
요게 AsyncStorage 의 블록 사이즈(6mb) 이슈 때문에 Android 에서 읽기에 실패하는 경우가 있어서 Chat SDK 에서 AsyncStorage 가 deprecated 하고 MMKV 로 변경을 한것이라서, 안따라가기에는 조금 애매할 것 같습니다. 고객한테도 계속 warning 이 뜰것이구요. new debugger: react-native-community/discussions-and-proposals#733 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #185 +/- ##
==========================================
- Coverage 11.78% 11.73% -0.06%
==========================================
Files 355 355
Lines 8271 8307 +36
Branches 2306 2329 +23
==========================================
Hits 975 975
- Misses 7220 7256 +36
Partials 76 76 ☔ View full report in Codecov by Sentry. |
8f81fb3
to
7f88939
Compare
7f88939
to
c4dcc0c
Compare
External Contributions
This project is not yet set up to accept pull requests from external contributors.
If you have a pull request that you believe should be accepted, please contact
the Developer Relations team [email protected] with details
and we'll evaluate if we can setup a CLA to allow for the contribution.
For Internal Contributors
CLNP-3879
Description Of Changes
Types Of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that apply_