Skip to content

Commit

Permalink
Merge pull request #122 from funnyzak/feat/bugsnag
Browse files Browse the repository at this point in the history
  • Loading branch information
funnyzak authored Oct 19, 2022
2 parents b8ca620 + 8998d36 commit 9e37970
Show file tree
Hide file tree
Showing 15 changed files with 1,246 additions and 1,060 deletions.
4 changes: 3 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ updates:
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 5
open-pull-requests-limit: 3
ignore:
- dependency-name: "i18n"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ buck-out/
/vendor/bundle/

.eslintcache

podfile.lock
56 changes: 39 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,23 +232,45 @@ cd android

## FAQ

### **Invariant Violation: Module AppRegistry is not a registered callable module**

remove app from the emulator
npm cache clean --force
watchman watch-del-all

# for ios
cd ios
pod update / pod install
cd ..
npx react-native run-ios
# for android
cd android && ./gradlew clean
cd ..
npx react-native run-android

[https://stackoverflow.com/questions/64768328/invariant-violation-module-appregistry-is-not-a-registered-callable-module-cal](https://stackoverflow.com/questions/64768328/invariant-violation-module-appregistry-is-not-a-registered-callable-module-cal)
### 配置BugSnag

1. [Create a bugsnag account](https://app.bugsnag.com/user/new).

2. Add your project api key to [android/app/src/main/AndroidManifest.xml](android/app/src/main/AndroidManifest.xml#L25-L26):

```xml
<meta-data android:name="com.bugsnag.android.API_KEY"
android:value="YOUR-API-KEY-HERE" />
```

and [ios/app/Info.plist](ios/app/Info.plist):

```xml
<key>BugsnagAPIKey</key>
<string>YOUR-API-KEY-HERE</string>
```

The API key can be found in the Bugsnag settings for your project.

### Invariant Violation: Module AppRegistry is not a registered callable module

```bash
npm cache clean --force
watchman watch-del-all
rm -rf node_modules

# for ios
cd ios
pod update / pod install
cd ..
npx react-native run-ios
# for android
cd android && ./gradlew clean
cd ..
npx react-native run-android
```

Reference: [https://stackoverflow.com/questions/64768328/invariant-violation-module-appregistry-is-not-a-registered-callable-module-cal](https://stackoverflow.com/questions/64768328/invariant-violation-module-appregistry-is-not-a-registered-callable-module-cal)

### RCTBridge required dispatch_sync to load RNGestureHandlerModule

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ android {
applicationId "github.funnyzak.v2ex"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 34
versionName "0.8.1"
versionCode 35
versionName "0.8.3"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:
# Add any project specific keep options here:
35 changes: 12 additions & 23 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="github.funnyzak.v2ex">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="github.funnyzak.v2ex">

<uses-permission android:name="android.permission.INTERNET" />
<meta-data android:name="com.bugsnag.android.API_KEY" android:value="YOUR-API-KEY-HERE" />

<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>
</application>
<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>
</application>
</manifest>
Loading

0 comments on commit 9e37970

Please sign in to comment.