Skip to content

Commit c400298

Browse files
committed
fix: android app name
1 parent 434e04c commit c400298

File tree

5 files changed

+23
-19
lines changed

5 files changed

+23
-19
lines changed

examples/hybridexampleapp/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
package="com.instabug.hybridsampleapp">
5-
<uses-permission android:name="android.permission.INTERNET" />
5+
<uses-permission android:name="android.permission.INTERNET" />
66
<application
77
android:name=".HybridApplication"
88
android:allowBackup="true"

examples/hybridexampleapp/android/app/src/main/java/com/instabug/hybridsampleapp/ReactNativeAppActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected void onCreate(Bundle savedInstanceState) {
3535
.setInitialLifecycleState(LifecycleState.RESUMED)
3636
.build();
3737
// the string in AppRegistry.registerComponent() in index.js
38-
mReactRootView.startReactApplication(mReactInstanceManager, "hybridexampleapp", null);
38+
mReactRootView.startReactApplication(mReactInstanceManager, "HybridSampleApp", null);
3939

4040
setContentView(mReactRootView);
4141
}

examples/hybridexampleapp/android/gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ kotlin.code.style=official
2020
# Enables namespacing of each library's R class so that its R class includes only the
2121
# resources declared in the library itself and none from the library's dependencies,
2222
# thereby reducing the size of the R class for that library
23-
android.nonTransitiveRClass=true
23+
android.nonTransitiveRClass=true
24+
hermesEnabled=true

examples/hybridexampleapp/ios/HybridSampleApp/Info.plist

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
<dict>
55
<key>UIApplicationSceneManifest</key>
66
<dict>
7+
<key>NSAppTransportSecurity</key>
8+
<dict>
9+
<key>NSExceptionDomains</key>
10+
<dict>
11+
<key>localhost</key>
12+
<dict>
13+
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
14+
<true/>
15+
</dict>
16+
</dict>
17+
</dict>
718
<key>UIApplicationSupportsMultipleScenes</key>
819
<false/>
920
<key>UISceneConfigurations</key>

examples/hybridexampleapp/ios/HybridSampleApp/MainViewController.m

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,16 @@ - (void)viewDidLoad {
1313
// Do any additional setup after loading the view.
1414
}
1515
- (IBAction)startReactNative:(UIButton *)sender {
16-
17-
dispatch_async(dispatch_get_main_queue(), ^{
18-
NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"];
19-
20-
RCTRootView *rootView =
21-
[[RCTRootView alloc] initWithBundleURL:jsCodeLocation
22-
moduleName:@"HybridSampleApp"
23-
initialProperties:nil
24-
launchOptions:nil];
25-
16+
NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8080/index.bundle?platform=ios"];
17+
18+
RCTRootView *rootView =
19+
[[RCTRootView alloc] initWithBundleURL: jsCodeLocation
20+
moduleName: @"HybridSampleApp"
21+
initialProperties:nil
22+
launchOptions: nil];
2623
UIViewController *vc = [[UIViewController alloc] init];
2724
vc.view = rootView;
28-
vc.modalPresentationStyle = UIModalPresentationFullScreen;
29-
30-
UIViewController *topVC = [self topMostViewController];
31-
[topVC presentViewController:vc animated:YES completion:nil];
32-
});
25+
[self presentViewController:vc animated:YES completion:nil];
3326
}
3427

3528
- (IBAction)throwHandled:(UIButton *)sender {
@@ -47,7 +40,6 @@ - (IBAction)throwHandled:(UIButton *)sender {
4740

4841
- (IBAction)throwUnhandled:(UIButton *)sender {
4942
NSLog(@"Unhandled Crash button pressed");
50-
[NSException raise:@"Unhandled Exception" format:@"This is an unhandled exception"];
5143
}
5244

5345
// Add this helper method to get the top most view controller

0 commit comments

Comments
 (0)