-
Notifications
You must be signed in to change notification settings - Fork 102
feat: add new hybrid app #1301
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
Merged
AyaMahmoud148
merged 20 commits into
feat/enterprise-release-post-checks
from
feat/add-new-hybrid-app
Oct 29, 2024
Merged
feat: add new hybrid app #1301
Changes from 10 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2ac8429
feat: add hybrid android example app
AyaMahmoud148 bb4b769
feat: configure react native app
AyaMahmoud148 5c6b088
feat: add ios app
AyaMahmoud148 19db839
fix android app
AyaMahmoud148 ce0de4e
fix: linting errors
AyaMahmoud148 52e42db
Revert "feat(example): add features and buttons implementation (#1280)"
AyaMahmoud148 68efa4d
revert: pod changes
AyaMahmoud148 36bb946
fix: prettier errors
AyaMahmoud148 fafe2a7
fix: delete unnecessary files
AyaMahmoud148 f161d07
Revert "Revert "feat(example): add features and buttons implementatio…
AyaMahmoud148 3f6bcf8
fix: use RNInstabug instead of native SDK
AyaMahmoud148 c22288a
fix: use only ActivityMainBinding instead of the whole library
AyaMahmoud148 df2e8e5
fix: use the local keystore
AyaMahmoud148 c92d340
fix: use RNInstabug instead of native sdk
AyaMahmoud148 57c9f43
fix: remove .gitignore files
AyaMahmoud148 cc3fd30
fix: ios app
AyaMahmoud148 434e04c
fix: revert ios cocoapods version
AyaMahmoud148 c400298
fix: android app name
AyaMahmoud148 d8034c0
fix: Rename hybrid app directory
AyaMahmoud148 1e0e923
fix: adnroid crash
AyaMahmoud148 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BUNDLE_PATH: "vendor/bundle" | ||
BUNDLE_FORCE_RUBY_PLATFORM: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: '@react-native-community', | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
934 changes: 934 additions & 0 deletions
934
examples/hybridexampleapp/.yarn/releases/yarn-stable-temp.cjs
a7medev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* eslint-disable react-native/no-inline-styles */ | ||
import { ReactNode, useEffect } from 'react'; | ||
import React from 'react'; | ||
import { Button, Image, SafeAreaView, Text } from 'react-native'; | ||
import Instabug, { | ||
CrashReporting, | ||
InvocationEvent, | ||
LogLevel, | ||
ReproStepsMode, | ||
} from 'instabug-reactnative'; | ||
|
||
const throwHandled = () => { | ||
try { | ||
throw Error('This is a handled JS Crash'); | ||
} catch (err) { | ||
if (err instanceof Error) { | ||
CrashReporting.reportError(err); | ||
} | ||
} | ||
}; | ||
|
||
const throwUnhandled = () => { | ||
throw Error('This is an unhandled JS Crash'); | ||
}; | ||
|
||
const App: () => ReactNode = () => { | ||
useEffect(() => { | ||
Instabug.init({ | ||
token: 'deb1910a7342814af4e4c9210c786f35', | ||
invocationEvents: [InvocationEvent.floatingButton], | ||
debugLogsLevel: LogLevel.verbose, | ||
}); | ||
CrashReporting.setNDKCrashesEnabled(true); | ||
Instabug.setReproStepsConfig({ | ||
all: ReproStepsMode.enabled, | ||
}); | ||
}, []); | ||
|
||
return ( | ||
<SafeAreaView | ||
style={{ | ||
minHeight: '100%', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}}> | ||
<Image | ||
source={{ | ||
uri: 'https://reactnative.dev/img/tiny_logo.png', | ||
height: 100, | ||
width: 100, | ||
}} | ||
/> | ||
<Text style={{ fontSize: 21, fontWeight: '700' }}>React Native App</Text> | ||
<Button title="Handled Crash" onPress={throwHandled} /> | ||
<Button title="Unhandled Crash" onPress={throwUnhandled} /> | ||
</SafeAreaView> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @format | ||
*/ | ||
|
||
import 'react-native'; | ||
import React from 'react'; | ||
import App from '../App'; | ||
|
||
// Note: import explicitly to use the types shipped with jest. | ||
import { it } from '@jest/globals'; | ||
|
||
// Note: test renderer must be required after react-native. | ||
import renderer from 'react-test-renderer'; | ||
|
||
it('renders correctly', () => { | ||
renderer.create(<App />); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'org.jetbrains.kotlin.android' | ||
id 'com.facebook.react' | ||
|
||
} | ||
|
||
android { | ||
signingConfigs { | ||
release { | ||
storeFile file('/Users/yrn/Desktop/release') | ||
storePassword 'qwertttt' | ||
keyAlias 'key0' | ||
keyPassword 'qwertttt' | ||
} | ||
a7medev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
namespace 'com.instabug.hybridsampleapp' | ||
compileSdk 34 | ||
|
||
defaultConfig { | ||
applicationId "com.instabug.hybridsampleapp" | ||
minSdk 29 | ||
targetSdk 34 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.4.8" | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
buildFeatures { | ||
viewBinding true | ||
compose = true | ||
buildConfig = true | ||
} | ||
} | ||
|
||
dependencies { | ||
// Use consistent versions | ||
def composeBom = platform('androidx.compose:compose-bom:2023.10.00') | ||
implementation composeBom | ||
androidTestImplementation composeBom | ||
|
||
// Compose dependencies | ||
implementation "androidx.compose.ui:ui" | ||
implementation "androidx.compose.material3:material3" | ||
implementation "androidx.compose.ui:ui-tooling-preview" | ||
debugImplementation "androidx.compose.ui:ui-tooling" | ||
implementation libs.androidx.appcompat | ||
implementation libs.androidx.appcompat.resources | ||
implementation libs.androidx.core.ktx.v1130 | ||
implementation libs.androidx.core | ||
implementation libs.androidx.activity | ||
implementation libs.androidx.transition | ||
implementation libs.androidx.annotation.experimental | ||
implementation "com.facebook.react:react-android" | ||
implementation "com.facebook.react:hermes-android" | ||
// Other dependencies... | ||
} | ||
configurations.all { | ||
resolutionStrategy { | ||
force "androidx.appcompat:appcompat:${rootProject.ext.androidXAppCompatVersion}" | ||
force "androidx.appcompat:appcompat-resources:${rootProject.ext.androidXAppCompatVersion}" | ||
force "androidx.core:core:${rootProject.ext.androidXCoreVersion}" | ||
force "androidx.core:core-ktx:${rootProject.ext.androidXCoreVersion}" | ||
} | ||
} | ||
|
||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) |
Binary file added
BIN
+59.3 KB
examples/hybridexampleapp/android/app/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
examples/hybridexampleapp/android/app/gradle/wrapper/gradle-wrapper.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.