Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AmityCo/Amity-Chat-UIKit-React-Native-OpenSource
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: AmityCo/Amity-Chat-UIKit-React-Native-CLI-OpenSource
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Mar 19, 2024

  1. upload new chat uikit

    topAmity committed Mar 19, 2024
    Copy the full SHA
    8307836 View commit details
  2. upload

    topAmity committed Mar 19, 2024
    Copy the full SHA
    244636b View commit details
  3. fix sample app

    topAmity committed Mar 19, 2024
    Copy the full SHA
    39c9327 View commit details
  4. Update README.md

    topAmity authored Mar 19, 2024
    Copy the full SHA
    9872daa View commit details

Commits on Mar 20, 2024

  1. Update README.md

    topAmity authored Mar 20, 2024
    Copy the full SHA
    31f7c7c View commit details

Commits on Apr 22, 2024

  1. fix dependecies for svg

    topAmity committed Apr 22, 2024
    Copy the full SHA
    049342d View commit details

Commits on May 10, 2024

  1. Copy the full SHA
    b3b8af9 View commit details

Commits on May 11, 2024

  1. Copy the full SHA
    2803a27 View commit details

Commits on May 15, 2024

  1. Copy the full SHA
    951aa74 View commit details

Commits on May 16, 2024

  1. prevent null image error

    topAmity committed May 16, 2024
    Copy the full SHA
    67d573a View commit details

Commits on May 27, 2024

  1. Copy the full SHA
    1360929 View commit details

Commits on May 28, 2024

  1. Copy the full SHA
    981c1b8 View commit details

Commits on Jul 8, 2024

  1. Copy the full SHA
    50c7dac View commit details

Commits on Jul 11, 2024

  1. Update comment

    NaingAmity committed Jul 11, 2024
    Copy the full SHA
    7ecb07f View commit details

Commits on Jul 15, 2024

  1. Merge pull request #2 from AmityCo/feat/asc-00000-enable-push-notific…

    …ation
    
    feat: enable push notification
    ptchayap authored Jul 15, 2024
    Copy the full SHA
    a9270a4 View commit details

Commits on Jul 19, 2024

  1. Copy the full SHA
    37a1bc6 View commit details
  2. chore: v0.3.2

    ptchayap committed Jul 19, 2024
    Copy the full SHA
    ebdd4ec View commit details
  3. Merge pull request #3 from AmityCo/fix/asc-24420-edit-message

    fix: ASC-24420 - edit message
    ptchayap authored Jul 19, 2024
    Copy the full SHA
    5c43e21 View commit details

Commits on Jul 24, 2024

  1. Copy the full SHA
    6ba7e45 View commit details

Commits on Jul 25, 2024

  1. Copy the full SHA
    894eb77 View commit details
  2. fix: delete .env.local

    ptchayap committed Jul 25, 2024
    Copy the full SHA
    fdcadaa View commit details
  3. Copy the full SHA
    3f1df73 View commit details
  4. fix: remove console.log

    ptchayap authored Jul 25, 2024
    Copy the full SHA
    bf04edb View commit details
  5. Copy the full SHA
    b95b88a View commit details
  6. Copy the full SHA
    a2d1c76 View commit details

Commits on Jul 26, 2024

  1. Copy the full SHA
    270795a View commit details
  2. feat: update dependencies

    ptchayap committed Jul 26, 2024
    Copy the full SHA
    acb0eb7 View commit details

Commits on Jul 30, 2024

  1. Copy the full SHA
    377e35f View commit details
  2. Merge pull request #4 from AmityCo/fix/asc-22759-text-option-missing

    fix: ASC-22759 text option missing
    ptchayap authored Jul 30, 2024
    Copy the full SHA
    b85bca9 View commit details
  3. Merge pull request #5 from AmityCo/feat/asc-22764-show-alert-block-li…

    …st-and-link
    
    feat: ASC-22764 - show alert block list and link
    ptchayap authored Jul 30, 2024
    Copy the full SHA
    809b221 View commit details
  4. Merge pull request #6 from AmityCo/feat/asc-22716-channel-displayName…

    …-not-change
    
    fix: ASC-22716 - channel display name not change after edit
    ptchayap authored Jul 30, 2024
    Copy the full SHA
    0222ff2 View commit details

Commits on Jul 31, 2024

  1. fix: remove unused

    ptchayap committed Jul 31, 2024
    Copy the full SHA
    2307ade View commit details
  2. fix: remove unused function

    ptchayap committed Jul 31, 2024
    Copy the full SHA
    b005124 View commit details
  3. Merge pull request #8 from AmityCo/fix/asc-22758-global-banned-user

    fix: ASC-22758 - global banned user still see chat list
    ptchayap authored Jul 31, 2024
    Copy the full SHA
    8552fa2 View commit details
  4. Merge pull request #7 from AmityCo/fix/asc-24627-duplicate-message-in…

    …-rte
    
    fix: ASC-24627 - duplicate message in rte
    ptchayap authored Jul 31, 2024
    Copy the full SHA
    e050916 View commit details

Commits on Aug 5, 2024

  1. chore: v0.4.0

    ptchayap committed Aug 5, 2024
    Copy the full SHA
    2cc2d01 View commit details
  2. Copy the full SHA
    d353c59 View commit details
  3. fix: remove unused

    ptchayap committed Aug 5, 2024
    Copy the full SHA
    7b44a70 View commit details
  4. Merge pull request #10 from AmityCo/feat/asc-22764-show-alert-block-l…

    …ist-and-link
    
    feat: ASC-22764 - filter out unsynced message from message list
    ptchayap authored Aug 5, 2024
    Copy the full SHA
    f35bf21 View commit details
  5. Copy the full SHA
    a5ac44d View commit details
  6. chore: update pods

    ptchayap committed Aug 5, 2024
    Copy the full SHA
    47619b9 View commit details
  7. Merge pull request #9 from AmityCo/release/v0.4.0

    Release/v0.4.0
    ptchayap authored Aug 5, 2024
    Copy the full SHA
    17b0b40 View commit details

Commits on Aug 19, 2024

  1. Update README.md

    topAmity authored Aug 19, 2024
    Copy the full SHA
    24628aa View commit details

Commits on Sep 23, 2024

  1. Copy the full SHA
    8856e6b View commit details
  2. Copy the full SHA
    bc91287 View commit details
  3. Copy the full SHA
    233cef5 View commit details
  4. Copy the full SHA
    cc202bf View commit details
  5. Copy the full SHA
    a1ead54 View commit details
  6. Merge pull request #15 from AmityCo/fix/asc-25825-able-to-click-empty…

    …-space-to-show-image
    
    fix: ASC-25825 - able to click empty space to show image
    ptchayap authored Sep 23, 2024
    Copy the full SHA
    228456a View commit details

Commits on Sep 27, 2024

  1. Update package.json

    topAmity authored Sep 27, 2024
    Copy the full SHA
    7d2c6e6 View commit details
Showing with 7,536 additions and 7,425 deletions.
  1. +18 −0 .github/pull_request_template.md
  2. +96 −3 .github/workflows/ci.yml
  3. +6 −0 .gitignore
  4. +8 −0 .prettierrc
  5. +4 −6 CONTRIBUTING.md
  6. +26 −14 README.md
  7. BIN amityco-react-native-cli-chat-ui-kit-0.3.1.tgz
  8. +41 −0 amityco-react-native-cli-chat-ui-kit.podspec
  9. +94 −0 android/build.gradle
  10. +5 −0 android/gradle.properties
  11. +3 −0 android/src/main/AndroidManifest.xml
  12. +2 −0 android/src/main/AndroidManifestNew.xml
  13. +25 −0 android/src/main/java/com/amityco/reactnativeclichatuikit/ReactNativeCliChatUiKitModule.kt
  14. +17 −0 android/src/main/java/com/amityco/reactnativeclichatuikit/ReactNativeCliChatUiKitPackage.kt
  15. BIN assets/fonts/SFProText-Regular.ttf
  16. BIN assets/fonts/SFProText-Semibold.ttf
  17. BIN assets/icon/BackIcon.png
  18. BIN assets/icon/GroupChat.png
  19. +0 −4 assets/icon/GroupChat.svg
  20. +0 −3 assets/icon/Option.svg
  21. BIN assets/icon/Placeholder.png
  22. +0 −3 assets/icon/Private.svg
  23. +0 −5 assets/icon/Public.svg
  24. BIN assets/icon/addChat.png
  25. BIN assets/icon/arrowRight-2.png
  26. BIN assets/icon/arrowRight.png
  27. +0 −3 assets/icon/back.svg
  28. BIN assets/icon/camera.png
  29. BIN assets/icon/cameraIcon.png
  30. +0 −3 assets/icon/comment.svg
  31. BIN assets/icon/editPencil-not-filled.png
  32. BIN assets/icon/editPencil.png
  33. BIN assets/icon/followPlus.png
  34. BIN assets/icon/gallery.png
  35. BIN assets/icon/groupMember.png
  36. BIN assets/icon/keyboard.png
  37. BIN assets/icon/mic.png
  38. +0 −4 assets/icon/person.svg
  39. BIN assets/icon/plus.png
  40. BIN assets/icon/report.png
  41. BIN assets/icon/send.png
  42. BIN assets/icon/setting.png
  43. BIN assets/icon/threeDot.png
  44. BIN assets/icon/unfollow.png
  45. BIN assets/icon/voice.png
  46. +2 −0 example/.bundle/config
  47. +1 −0 example/.watchmanconfig
  48. +0 −1 example/App.js
  49. +9 −0 example/Gemfile
  50. +79 −0 example/README.md
  51. +120 −0 example/android/app/build.gradle
  52. BIN example/android/app/debug.keystore
  53. +10 −0 example/android/app/proguard-rules.pro
  54. +9 −0 example/android/app/src/debug/AndroidManifest.xml
  55. +25 −0 example/android/app/src/main/AndroidManifest.xml
  56. +22 −0 example/android/app/src/main/java/com/reactnativeclichatuikitexample/MainActivity.kt
  57. +45 −0 example/android/app/src/main/java/com/reactnativeclichatuikitexample/MainApplication.kt
  58. +36 −0 example/android/app/src/main/res/drawable/rn_edit_text_material.xml
  59. BIN example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  60. BIN example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  61. BIN example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  62. BIN example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  63. BIN example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  64. BIN example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  65. BIN example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  66. BIN example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  67. BIN example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  68. BIN example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  69. +3 −0 example/android/app/src/main/res/values/strings.xml
  70. +9 −0 example/android/app/src/main/res/values/styles.xml
  71. +22 −0 example/android/build.gradle
  72. +41 −0 example/android/gradle.properties
  73. BIN example/android/gradle/wrapper/gradle-wrapper.jar
  74. +7 −0 example/android/gradle/wrapper/gradle-wrapper.properties
  75. +249 −0 example/android/gradlew
  76. +92 −0 example/android/gradlew.bat
  77. +4 −0 example/android/settings.gradle
  78. +2 −28 example/app.json
  79. BIN example/assets/adaptive-icon.png
  80. BIN example/assets/favicon.png
  81. BIN example/assets/icon.png
  82. BIN example/assets/splash.png
  83. +11 −16 example/babel.config.js
  84. +5 −0 example/index.js
  85. +11 −0 example/ios/.xcode.env
  86. +6 −0 example/ios/File.swift
  87. +56 −0 example/ios/Podfile
  88. +1,418 −0 example/ios/Podfile.lock
  89. +3 −0 example/ios/ReactNativeCliChatUiKitExample-Bridging-Header.h
  90. +746 −0 example/ios/ReactNativeCliChatUiKitExample.xcodeproj/project.pbxproj
  91. +88 −0 ...ativeCliChatUiKitExample.xcodeproj/xcshareddata/xcschemes/ReactNativeCliChatUiKitExample.xcscheme
  92. +10 −0 example/ios/ReactNativeCliChatUiKitExample.xcworkspace/contents.xcworkspacedata
  93. +6 −0 example/ios/ReactNativeCliChatUiKitExample/AppDelegate.h
  94. +32 −0 example/ios/ReactNativeCliChatUiKitExample/AppDelegate.mm
  95. +53 −0 example/ios/ReactNativeCliChatUiKitExample/Images.xcassets/AppIcon.appiconset/Contents.json
  96. +6 −0 example/ios/ReactNativeCliChatUiKitExample/Images.xcassets/Contents.json
  97. +56 −0 example/ios/ReactNativeCliChatUiKitExample/Info.plist
  98. +47 −0 example/ios/ReactNativeCliChatUiKitExample/LaunchScreen.storyboard
  99. +8 −0 example/ios/ReactNativeCliChatUiKitExample/ReactNativeCliChatUiKitExample.entitlements
  100. +10 −0 example/ios/ReactNativeCliChatUiKitExample/main.m
  101. +24 −0 example/ios/ReactNativeCliChatUiKitExampleTests/Info.plist
  102. +66 −0 example/ios/ReactNativeCliChatUiKitExampleTests/ReactNativeCliChatUiKitExampleTests.m
  103. +3 −0 example/jest.config.js
  104. +11 −9 example/metro.config.js
  105. +27 −18 example/package.json
  106. +10 −0 example/react-native.config.js
  107. +96 −3 example/src/App.tsx
  108. +0 −6 example/tsconfig.json
  109. +0 −25 example/webpack.config.js
  110. +2 −0 ios/ReactNativeCliChatUiKit-Bridging-Header.h
  111. +14 −0 ios/ReactNativeCliChatUiKit.mm
  112. +8 −0 ios/ReactNativeCliChatUiKit.swift
  113. +36 −33 package.json
  114. +101 −72 src/components/AddMembersModal/index.tsx
  115. +4 −0 src/components/AddMembersModal/styles.ts
  116. +50 −30 src/components/ChatList/index.tsx
  117. +28 −30 src/components/LoadingImage/index.tsx
  118. +188 −0 src/components/MemberActionModal/MemberActionModal.tsx
  119. +56 −0 src/components/MemberActionModal/styles.ts
  120. +6 −2 src/components/SelectedUserHorizontal/styles.ts
  121. +5 −1 src/components/UserItem/index.tsx
  122. +6 −3 src/components/UserItem/styles.ts
  123. +54 −0 src/constants.ts
  124. +16 −0 src/hooks/useChannelPermission.ts
  125. +35 −32 src/providers/amity-ui-kit-provider.tsx
  126. +75 −15 src/providers/auth-provider.tsx
  127. +13 −9 src/providers/channel-provider.tsx
  128. +20 −0 src/redux/slices/ConnectionStateSlice.ts
  129. +52 −0 src/redux/slices/RecentChatSlice.ts
  130. +16 −0 src/redux/store/index.ts
  131. +12 −20 src/routes/ChatNavigator.tsx
  132. +42 −35 src/screens/ChatDetail/ChatRoomSetting.tsx
  133. +411 −309 src/screens/ChatRoom/ChatRoom.tsx
  134. +25 −22 src/screens/ChatRoom/styles.ts
  135. +97 −107 src/screens/EditChatDetail/EditChatRoomDetail.tsx
  136. +2 −0 src/screens/EditChatDetail/styles.ts
  137. +34 −7 src/screens/MemberDetail/MemberDetail.tsx
  138. +8 −7 src/screens/MemberDetail/styles.ts
  139. +108 −97 src/screens/RecentChat/RecentChat.tsx
  140. +13 −6 src/screens/RecentChat/styles.ts
  141. +55 −45 src/screens/SelectMembers/SelectMembers.tsx
  142. +11 −0 src/svg/ChatEmptyIcon.tsx
  143. +1 −0 src/types/auth.interface.ts
  144. +7 −6 tsconfig.json
  145. +34 −0 turbo.json
  146. +1,950 −6,383 yarn.lock
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
**Jira ticket :**

-

**Description :**

-

**Check lists :**

- [ ] Test code
- [ ] Build local pass (optional)
- [ ] Code is the same level as origin/develop branch

**Screen shot :**


**Note (optional) :**
99 changes: 96 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -47,15 +47,108 @@ jobs:
- name: Build package
run: yarn prepare

build-web:
build-android:
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Build example for Web
- name: Cache turborepo for Android
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-
- name: Check turborepo cache for Android
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi
- name: Install JDK
if: env.turbo_cache_hit != 1
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'

- name: Finalize Android SDK
if: env.turbo_cache_hit != 1
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
if: env.turbo_cache_hit != 1
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build example for Android
env:
JAVA_OPTS: "-XX:MaxHeapSize=6g"
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
build-ios:
runs-on: macos-14
env:
TURBO_CACHE_DIR: .turbo/ios
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for iOS
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-ios-
- name: Check turborepo cache for iOS
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi
- name: Cache cocoapods
if: env.turbo_cache_hit != 1
id: cocoapods-cache
uses: actions/cache@v3
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-
- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
cd example/ios
pod install
env:
NO_FLIPPER: 1

- name: Build example for iOS
run: |
yarn example expo export:web
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@
# VSCode
.vscode/
jsconfig.json
google-services.json
GoogleService-Info.plist

# Xcode
#
@@ -29,6 +31,7 @@ DerivedData
*.xcuserstate
project.xcworkspace


# Android/IJ
#
.classpath
@@ -76,3 +79,6 @@ android/keystores/debug.keystore

# generated by bob
lib/

# XCode
example/ios/.xcode.env.local
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tabWidth": 2,
"printWidth": 100,
"useTabs": false,
"singleQuote": true,
"trailingComma": "all",
"quoteProps": "as-needed"
}
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -23,6 +23,10 @@ The [example app](/example/) demonstrates usage of the library. You need to run

It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.

If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/ReactNativeCliChatUiKitExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > @amityco/react-native-cli-chat-ui-kit`.

To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `amityco-react-native-cli-chat-ui-kit` under `Android`.

You can use various commands from the root directory to work with the project.

To start the packager:
@@ -43,12 +47,6 @@ To run the example app on iOS:
yarn example ios
```

To run the example app on Web:

```sh
yarn example web
```

Make sure your code passes TypeScript and ESLint. Run the following to verify:

```sh
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<img src="https://github.com/AmityCo/Amity-Social-UIKit-React-Native-OpenSource/assets/112688936/ddeeef20-2dfa-449e-bd3d-62238d7c9be0" width="160" >
<img src="https://github.com/AmityCo/Amity-Social-UIKit-React-Native-OpenSource/assets/112688936/e6b2d2a2-5158-429e-b1af-ea679b14fc11" width="150">
<h1>Amity Chat Ui-Kit for React native (open-source)</h1>
** This is the beta version. The repo will be updated frequently. Please keep in touch **
**If you’d like to use React Native Expo, please visit this repository (https://github.com/AmityCo/Amity-Chat-UIKit-React-Native-OpenSource) **
</div>
<div align="center">
<img width="320" alt="Screenshot_2566-07-24_at_19 16 20-removebg-preview" src="https://github.com/AmityCo/Amity-Chat-UIKit-React-Native-OpenSource/assets/112688936/f215ec74-507f-4c44-bada-df50343aee25">
@@ -11,50 +11,62 @@


## Getting started
Our AmityChatUIKit include user interfaces to enable fast integration of standard Amity Chat features into new or existing applications. Our React Native UIKit supports integration with **Expo** providing you with a experience to seamlessly integrate chat features into your existing React Native Expo application.
Our AmityChatUIKit include user interfaces to enable fast integration of standard Amity Chat features into new or existing applications. Our React Native UIKit supports integration with **CLI** providing you with a experience to seamlessly integrate chat features into your existing React Native CLI application.
### Try Sample app
This repository also includes a built-in sample app which you can use to test your code while customizing it, or even explore our UIKit features with just a few installations!
#### Run sample app with expo
#### Run sample app with native iOS/Android
Use yarn

1. Install packages
```
yarn
```

2. Configure your apiKey,apiRegion,userId,displayName in /example/src/App.tsx file(https://github.com/AmityCo/Amity-Chat-UIKit-React-Native-OpenSource/blob/main/example/src/App.tsx) first before run the sample app
2. Configure your apiKey,apiRegion,userId,displayName in /example/src/App.tsx file(https://github.com/AmityCo/Amity-Chat-UIKit-React-Native-CLI-OpenSource/blob/main/example/src/App.tsx) first before run the sample app
<img width="1499" alt="Screenshot 2566-07-24 at 20 22 44" src="https://github.com/AmityCo/Amity-Chat-UIKit-React-Native-OpenSource/assets/112688936/c25b4d47-97e7-4471-815c-3e5b538a223b">

3. Choose to run between iOS or Android

In iOS sample app, please do the pod install inside example folder first before running the sample app
```sh
cd example
npx pod-install
cd ..
npm run example ios or yarn example ios
```

or
```

In Android sample app, please sync the gradle file first before running
```
npm run example android or yarn example android
```

### Installation
Here are the steps to install ui-kit together with another React Native project.
```sh
1. git clone https://github.com/AmityCo/Amity-Chat-UIKit-React-Native-OpenSource.git
2. cd Amity-Chat-UIKit-React-Native-OpenSource
1. git clone https://github.com/AmityCo/Amity-Chat-UIKit-React-Native-CLI-OpenSource.git
2. cd Amity-Chat-UIKit-React-Native-CLI-OpenSource
3. yarn or npm install
4. npm pack
```

This step will build the app and return amityco-react-native-chat-ui-kit-x.x.x.tgz file in inside the folder
This step will build the app and return amityco-react-native-cli-chat-ui-kit-x.x.x.tgz file in inside the folder

Then, inside another project, Copy tgz file to your application folder where you need to use ui-kit:

```sh
1. yarn add ./amityco-react-native-chat-ui-kit-x.x.x.tgz
2. yarn add react-native-safe-area-context \react-native-screens \@react-navigation/native \@react-navigation/native-stack \@react-navigation/stack
1. yarn add ./amityco-react-native-cli-chat-ui-kit-x.x.x.tgz
2. yarn add react-native-safe-area-context \react-native-screens \@react-navigation/native \@react-navigation/native-stack \@react-navigation/stack \@react-native-async-storage/async-storage \react-native-svg@14.1.0 \@react-native-community/netinfo \react-native-image-picker
```
### iOS Configuration
```sh
npx pod-install

```

### Android Configuration

Build project gradle with your Android Studio

### Usage

@@ -64,7 +76,7 @@ import * as React from 'react';
import {
AmityUiKitChat,
AmityUiKitProvider,
} from '@amityco/react-native-chat-ui-kit';
} from '@amityco/react-native-cli-chat-ui-kit';

export default function App() {
return (
@@ -95,7 +107,7 @@ import * as React from 'react';
import {
AmityUiKitProvider,
AmityUiKitChat,
} from '@amityco/react-native-chat-ui-kit';
} from '@amityco/react-native-cli-chat-ui-kit';

export default function App() {
const myTheme = {
@@ -143,7 +155,7 @@ import * as React from 'react';
import {
AmityUiKitProvider,
AmityUiKitChat,
} from '@amityco/react-native-chat-ui-kit';
} from '@amityco/react-native-cli-chat-ui-kit';

export default function App() {
return (
Binary file added amityco-react-native-cli-chat-ui-kit-0.3.1.tgz
Binary file not shown.
41 changes: 41 additions & 0 deletions amityco-react-native-cli-chat-ui-kit.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'

Pod::Spec.new do |s|
s.name = "amityco-react-native-cli-chat-ui-kit"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/AmityCo/Amity-Chat-UIKit-React-Native-CLI-OpenSource.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm,swift}"

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
s.dependency "React-Core"

# Don't install the dependencies when we run `pod install` in the old architecture.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
end
end
end
Loading