maitrungduc1410 / react-native-zalo-kit

Zalo SDK implementation for React Native
MIT License
44 stars 11 forks source link

login(Constants.AUTH_VIA_APP) not working #78

Closed thanhvu260696 closed 4 months ago

thanhvu260696 commented 5 months ago

mình cài sdk của bạn trên ios thì phát hiện ra rằng login(Constants.AUTH_VIA_APP) nó không lấy đc thông tin hoặc version ios của mình thấp hiện đang bị lỗi này trên ios 14 iphone 7 plus nếu bạn có thời gian mong chỉ mình cách khắc phục lỗi này mình cảm ơn

maitrungduc1410 commented 5 months ago

ý bạn ko lấy đc thông tin là ntn nhỉ? có lỗi gì ko bạn?

thanhvu260696 commented 5 months ago

[image: Screenshot 2024-01-20 at 23.16.23.png] trên là đoạn code của mình mình phải đổi sang dùng auth web vì khi dùng app và wed thì authCode không có respone và nó cũng không log error mình cũng không rõ là vì sao

Vào Th 7, 20 thg 1, 2024 vào lúc 22:56 Duc Trung Mai < @.***> đã viết:

ý bạn ko lấy đc thông tin là ntn nhỉ? có lỗi gì ko bạn?

— Reply to this email directly, view it on GitHub https://github.com/maitrungduc1410/react-native-zalo-kit/issues/78#issuecomment-1902145910, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJMKK2A6GH3CZMPYJDSRR3YPPSKDAVCNFSM6AAAAABCDILZDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGE2DKOJRGA . You are receiving this because you authored the thread.Message ID: @.***>

thanhvu260696 commented 5 months ago

mình không rõ về native cho lắm nhưng khi cài bên android trong file xml thêm

</queries> thì nó sẽ báo lỗi Execution failed for task ':app:processDebugResources'.

A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction > Android resource linking failed /Users/admin/Desktop/project/VGS/mobile-app-ngan-tuan-phat/android/app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:153: error: unexpected element found in . có cách nào để khắc phục lỗi này không vs cả nếu mình bỏ thằng đó đi liệu có vấn đề gì không nhỉ

maitrungduc1410 commented 5 months ago

Oke bạn để mình check lại nhé

maitrungduc1410 commented 5 months ago

về lỗi login iOS, bạn check câu trả lời của mình ở đây nhé

maitrungduc1410 commented 5 months ago

@thanhvu260696 về lỗi unexpected element found in trên Android, sorry bạn docs mình viết sai, <queries> phải nằm ngoài <application>.

Xem ví dụ sau của mình nhé:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
        android:launchMode="singleTask"
        android:windowSoftInputMode="adjustResize"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>

      <meta-data
        android:name="com.zing.zalo.zalosdk.appID"
        android:value="@string/appID" />

      <activity
        android:name="com.zing.zalo.zalosdk.oauth.BrowserLoginActivity"
        android:exported="true"
        >
        <intent-filter>
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="android.intent.category.BROWSABLE" />
          <data android:scheme="zalo-2011269580654725277" />
          <!-- eg: <data android:scheme="zalo-1234567890" />-->
        </intent-filter>
      </activity>
    </application>

    <queries>
      <package android:name="com.zing.zalo" />
    </queries>
</manifest>