Skip to content

Commit a6e58fc

Browse files
add hybrid app
1 parent 38971ab commit a6e58fc

File tree

40 files changed

+1824
-21
lines changed

40 files changed

+1824
-21
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ android/gradlew.bat
6363
**/ios/**/DerivedData/
6464
**/ios/**/Icon?
6565
**/ios/**/Pods/
66+
**/ios/**/Pods/
67+
6668
**/ios/**/.symlinks/
6769
**/ios/**/profile
6870
**/ios/**/xcuserdata

analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ analyzer:
44
exclude:
55
- "packages/**/*.g.dart"
66
- "packages/**/example/**"
7+
- "packages/instabug_private_views/example-hybrid-ios-app/**/**"
78

89

910
linter:

init.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
3+
if [ -d "android" ]; then
4+
rm -rf "android"
5+
echo "Folder android and its contents removed"
6+
fi
7+
8+
if [ -d "ios" ]; then
9+
rm -rf "ios"
10+
echo "Folder ios and its contents removed"
11+
fi
12+
13+
14+
if [ -d "build" ]; then
15+
rm -rf "build"
16+
echo "Folder build and its contents removed"
17+
fi
18+
19+
if [ -d "lib" ]; then
20+
rm -rf "lib"
21+
echo "Folder lib and its contents removed"
22+
fi
23+
24+
if [ -d "test" ]; then
25+
rm -rf "test"
26+
echo "Folder test and its contents removed"
27+
fi
28+
29+
30+
if command -v melos &> /dev/null
31+
then
32+
echo "Melos found"
33+
else
34+
echo "Melos not found"
35+
dart pub global activate melos && echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> $BASH_ENV
36+
fi
37+
38+
39+
melos bootstrap
40+
melos dart_bootstrap
41+
melos pigeon --no-select
42+
melos generate --no-select
43+
melos pods --no-select

melos.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ scripts:
5959
flutter: true
6060
dependsOn: pana
6161
private: false
62+
pods:
63+
run: cd ios && pod install --repo-update
64+
description: running pod install
65+
exec:
66+
concurrency: 1
67+
orderDependents: true
68+
packageFilters:
69+
fileExists: 'ios/PodFile'
6270
score:
6371
run: dart run pana --no-warning --exit-code-threshold 0
6472
exec:

packages/instabug_flutter/example/android/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,30 @@ allprojects {
1515
repositories {
1616
google()
1717
mavenCentral()
18+
maven {
19+
name "Private Snapshots"
20+
url "https://mvn.instabug.com/nexus/repository/instabug-internal/"
21+
credentials {
22+
username "instabug"
23+
password "yUawaYwPXB7._.mfyTfjhEvyGAC4"
24+
}
25+
}
1826
}
1927
}
2028

2129
rootProject.buildDir = '../build'
2230
subprojects {
2331
project.buildDir = "${rootProject.buildDir}/${project.name}"
32+
2433
}
2534
subprojects {
2635
project.evaluationDependsOn(':app')
36+
tasks.withType(Test) {
37+
// Prevent tests in moduleA from running
38+
if (project.name == 'video_player_android') {
39+
exclude '**/*'
40+
}
41+
}
2742
}
2843

2944
tasks.register("clean", Delete) {
Loading

packages/instabug_flutter/example/ios/Podfile.lock

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ PODS:
44
- instabug_flutter (13.4.0):
55
- Flutter
66
- Instabug (= 13.4.2)
7+
- instabug_private_views (0.0.1):
8+
- Flutter
9+
- instabug_flutter
710
- OCMock (3.6)
11+
- video_player_avfoundation (0.0.1):
12+
- Flutter
13+
- FlutterMacOS
814

915
DEPENDENCIES:
1016
- Flutter (from `Flutter`)
1117
- Instabug (from `https://ios-releases.instabug.com/custom/feature-flutter-private-views-base/13.4.2/Instabug.podspec`)
1218
- instabug_flutter (from `.symlinks/plugins/instabug_flutter/ios`)
19+
- instabug_private_views (from `.symlinks/plugins/instabug_private_views/ios`)
1320
- OCMock (= 3.6)
21+
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
1422

1523
SPEC REPOS:
1624
trunk:
@@ -23,13 +31,19 @@ EXTERNAL SOURCES:
2331
:podspec: https://ios-releases.instabug.com/custom/feature-flutter-private-views-base/13.4.2/Instabug.podspec
2432
instabug_flutter:
2533
:path: ".symlinks/plugins/instabug_flutter/ios"
34+
instabug_private_views:
35+
:path: ".symlinks/plugins/instabug_private_views/ios"
36+
video_player_avfoundation:
37+
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
2638

2739
SPEC CHECKSUMS:
2840
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
2941
Instabug: 7aacd5099c11ce96bc49dda40eba0963c06acccc
3042
instabug_flutter: a2df87e3d4d9e410785e0b1ffef4bc64d1f4b787
43+
instabug_private_views: df53ff3f1cc842cb686d43e077099d3b36426a7f
3144
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992
45+
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
3246

3347
PODFILE CHECKSUM: 02e3295e1482e04d2cbd38390c8ea91a5c0c2ff1
3448

35-
COCOAPODS: 1.14.3
49+
COCOAPODS: 1.16.0

packages/instabug_flutter/example/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

packages/instabug_flutter/example/lib/main.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import 'dart:convert';
55

66
import 'package:flutter/material.dart';
77
import 'package:instabug_flutter/instabug_flutter.dart';
8+
import 'package:instabug_flutter_example/src/screens/private_view_page.dart';
89
import 'package:instabug_http_client/instabug_http_client.dart';
910
import 'package:instabug_flutter_example/src/app_routes.dart';
1011
import 'package:instabug_flutter_example/src/widget/nested_view.dart';
12+
import 'package:instabug_private_views/instabug_private_view.dart';
1113

1214
import 'src/native/instabug_flutter_example_method_channel.dart';
1315
import 'src/widget/instabug_button.dart';
@@ -55,6 +57,9 @@ void main() {
5557
FlutterError.onError = (FlutterErrorDetails details) {
5658
Zone.current.handleUncaughtError(details.exception, details.stack!);
5759
};
60+
61+
enableInstabugMaskingPrivateViews();
62+
5863
runApp(const MyApp());
5964
},
6065
CrashReporting.reportCrash,

packages/instabug_flutter/example/lib/src/screens/my_home_page.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,16 @@ class _MyHomePageState extends State<MyHomePage> {
161161
);
162162
}
163163

164+
void _navigateToPrivateViewPage() {
165+
Navigator.push(
166+
context,
167+
MaterialPageRoute(
168+
builder: (context) => const PrivateViewPage(),
169+
settings: const RouteSettings(name: ComplexPage.screenName),
170+
),
171+
);
172+
}
173+
164174
@override
165175
Widget build(BuildContext context) {
166176
return Page(
@@ -306,6 +316,10 @@ class _MyHomePageState extends State<MyHomePage> {
306316
onPressed: _navigateToComplex,
307317
text: 'Complex',
308318
),
319+
InstabugButton(
320+
onPressed: _navigateToPrivateViewPage,
321+
text: 'Private views',
322+
),
309323
const SectionTitle('Sessions Replay'),
310324
InstabugButton(
311325
onPressed: getCurrentSessionReplaylink,

0 commit comments

Comments
 (0)