Skip to content

Commit 9e37970

Browse files
authored
Merge pull request #122 from funnyzak/feat/bugsnag
2 parents b8ca620 + 8998d36 commit 9e37970

File tree

15 files changed

+1246
-1060
lines changed

15 files changed

+1246
-1060
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ updates:
44
directory: "/"
55
schedule:
66
interval: daily
7-
open-pull-requests-limit: 5
7+
open-pull-requests-limit: 3
8+
ignore:
9+
- dependency-name: "i18n"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ buck-out/
6565
/vendor/bundle/
6666

6767
.eslintcache
68+
69+
podfile.lock

README.md

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -232,23 +232,45 @@ cd android
232232

233233
## FAQ
234234

235-
### **Invariant Violation: Module AppRegistry is not a registered callable module**
236-
237-
remove app from the emulator
238-
npm cache clean --force
239-
watchman watch-del-all
240-
241-
# for ios
242-
cd ios
243-
pod update / pod install
244-
cd ..
245-
npx react-native run-ios
246-
# for android
247-
cd android && ./gradlew clean
248-
cd ..
249-
npx react-native run-android
250-
251-
[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)
235+
### 配置BugSnag
236+
237+
1. [Create a bugsnag account](https://app.bugsnag.com/user/new).
238+
239+
2. Add your project api key to [android/app/src/main/AndroidManifest.xml](android/app/src/main/AndroidManifest.xml#L25-L26):
240+
241+
```xml
242+
<meta-data android:name="com.bugsnag.android.API_KEY"
243+
android:value="YOUR-API-KEY-HERE" />
244+
```
245+
246+
and [ios/app/Info.plist](ios/app/Info.plist):
247+
248+
```xml
249+
<key>BugsnagAPIKey</key>
250+
<string>YOUR-API-KEY-HERE</string>
251+
```
252+
253+
The API key can be found in the Bugsnag settings for your project.
254+
255+
### Invariant Violation: Module AppRegistry is not a registered callable module
256+
257+
```bash
258+
npm cache clean --force
259+
watchman watch-del-all
260+
rm -rf node_modules
261+
262+
# for ios
263+
cd ios
264+
pod update / pod install
265+
cd ..
266+
npx react-native run-ios
267+
# for android
268+
cd android && ./gradlew clean
269+
cd ..
270+
npx react-native run-android
271+
```
272+
273+
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)
252274

253275
### RCTBridge required dispatch_sync to load RNGestureHandlerModule
254276

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ android {
138138
applicationId "github.funnyzak.v2ex"
139139
minSdkVersion rootProject.ext.minSdkVersion
140140
targetSdkVersion rootProject.ext.targetSdkVersion
141-
versionCode 34
142-
versionName "0.8.1"
141+
versionCode 35
142+
versionName "0.8.3"
143143
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
144144

145145
if (isNewArchitectureEnabled()) {

android/app/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
# For more details, see
88
# http://developer.android.com/guide/developing/tools/proguard.html
99

10-
# Add any project specific keep options here:
10+
# Add any project specific keep options here:
Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="github.funnyzak.v2ex">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="github.funnyzak.v2ex">
32

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

6-
<application
7-
android:name=".MainApplication"
8-
android:label="@string/app_name"
9-
android:icon="@mipmap/ic_launcher"
10-
android:roundIcon="@mipmap/ic_launcher_round"
11-
android:allowBackup="false"
12-
android:theme="@style/AppTheme">
13-
<activity
14-
android:name=".MainActivity"
15-
android:label="@string/app_name"
16-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
17-
android:launchMode="singleTask"
18-
android:windowSoftInputMode="adjustResize"
19-
android:exported="true">
20-
<intent-filter>
21-
<action android:name="android.intent.action.MAIN" />
22-
<category android:name="android.intent.category.LAUNCHER" />
23-
</intent-filter>
24-
</activity>
25-
</application>
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
7+
<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">
8+
<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">
9+
<intent-filter>
10+
<action android:name="android.intent.action.MAIN" />
11+
<category android:name="android.intent.category.LAUNCHER" />
12+
</intent-filter>
13+
</activity>
14+
</application>
2615
</manifest>

0 commit comments

Comments
 (0)