Skip to content

Commit a0c96fd

Browse files
authored
Refactor/native code (#353)
* 🔨 refactor js code * 🔨 Refactor native android code * 🔨 Refactor native android tests * 🔨 Split native android code into modules based on feature * 🔨 Split native android tests according to module * 🔨 Split native iOS into modules based on feature * 🔨 Split native iOS tests based on module * 🔨 Refactor JS modules to use new native modules * 🔨 Refactor logging APIs internally * ✨ add typescript def for added FeatureRequests API * 📝 ignore deprecated APIs from coverage reports and change js function declarations to es6 * 📝ignore deprecated APIs in Instabug module from coverage reports
1 parent 821dfa8 commit a0c96fd

File tree

62 files changed

+3713
-1806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3713
-1806
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,3 @@
6969
* Fixed linking script
7070
* Api Name Changes
7171

72-

InstabugSample/ios/InstabugSample.xcodeproj/project.pbxproj

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1515
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1616
39B75062AA5F42B6E4C8E3C7 /* libPods-InstabugSampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A03A15E2685C1231729CA8B /* libPods-InstabugSampleTests.a */; };
17+
BAD36E1C22F08B27007F5E74 /* InstabugBugReportingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD36E1B22F08B27007F5E74 /* InstabugBugReportingTests.m */; };
18+
BAD36E1E22F0906A007F5E74 /* IBGConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD36E1D22F0906A007F5E74 /* IBGConstants.m */; };
19+
BAD36E2D22F1955C007F5E74 /* InstabugChatsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD36E2C22F1955C007F5E74 /* InstabugChatsTests.m */; };
20+
BAD36E2F22F19788007F5E74 /* InstabugFeatureRequestsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD36E2E22F19788007F5E74 /* InstabugFeatureRequestsTests.m */; };
21+
BAD36E3122F19973007F5E74 /* InstabugRepliesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD36E3022F19973007F5E74 /* InstabugRepliesTests.m */; };
22+
BAD36E3322F19B1B007F5E74 /* InstabugSurveysTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BAD36E3222F19B1B007F5E74 /* InstabugSurveysTests.m */; };
1723
/* End PBXBuildFile section */
1824

1925
/* Begin PBXContainerItemProxy section */
@@ -40,11 +46,22 @@
4046
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = InstabugSample/main.m; sourceTree = "<group>"; };
4147
499132AD8910CB4D10684C0B /* Pods-InstabugSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSample.release.xcconfig"; path = "Target Support Files/Pods-InstabugSample/Pods-InstabugSample.release.xcconfig"; sourceTree = "<group>"; };
4248
52BA9869FB340D2E128C8413 /* Pods-InstabugSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSample.debug.xcconfig"; path = "Target Support Files/Pods-InstabugSample/Pods-InstabugSample.debug.xcconfig"; sourceTree = "<group>"; };
49+
62941153FBCA702BE7DDD700 /* Pods-InstabugSampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-InstabugSampleTests/Pods-InstabugSampleTests.release.xcconfig"; sourceTree = "<group>"; };
50+
6520812BE77D6515D82803F8 /* Pods-InstabugSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample.release.xcconfig"; sourceTree = "<group>"; };
4351
6AADF551224449E100BEC5F2 /* Pods-InstabugSampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSampleTests.release.xcconfig"; path = "Target Support Files/Pods-InstabugSampleTests/Pods-InstabugSampleTests.release.xcconfig"; sourceTree = "<group>"; };
4452
736C2E3EDEA69CCD5B8A53AE /* Instabug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Instabug.framework; path = "../node_modules/instabug-reactnative/ios/Instabug.framework"; sourceTree = "<group>"; };
4553
7A03A15E2685C1231729CA8B /* libPods-InstabugSampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InstabugSampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
54+
87F5729F702507D704C7BDC1 /* Pods-InstabugSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample.debug.xcconfig"; sourceTree = "<group>"; };
4655
A0EF1FBF0176E13B30EA2D29 /* libPods-InstabugSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InstabugSample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4756
B5BDF7C4EF0BC367832D3796 /* Pods-InstabugSampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSampleTests.debug.xcconfig"; path = "Target Support Files/Pods-InstabugSampleTests/Pods-InstabugSampleTests.debug.xcconfig"; sourceTree = "<group>"; };
57+
BAD36E1B22F08B27007F5E74 /* InstabugBugReportingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugBugReportingTests.m; sourceTree = "<group>"; };
58+
BAD36E1D22F0906A007F5E74 /* IBGConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IBGConstants.m; sourceTree = "<group>"; };
59+
BAD36E1F22F09390007F5E74 /* IBGConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IBGConstants.h; sourceTree = "<group>"; };
60+
BAD36E2C22F1955C007F5E74 /* InstabugChatsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugChatsTests.m; sourceTree = "<group>"; };
61+
BAD36E2E22F19788007F5E74 /* InstabugFeatureRequestsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugFeatureRequestsTests.m; sourceTree = "<group>"; };
62+
BAD36E3022F19973007F5E74 /* InstabugRepliesTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugRepliesTests.m; sourceTree = "<group>"; };
63+
BAD36E3222F19B1B007F5E74 /* InstabugSurveysTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InstabugSurveysTests.m; sourceTree = "<group>"; };
64+
C74E4010ABE7AFC7DB5E79DC /* Pods-InstabugSampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InstabugSampleTests/Pods-InstabugSampleTests.debug.xcconfig"; sourceTree = "<group>"; };
4865
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4966
/* End PBXFileReference section */
5067

@@ -73,6 +90,13 @@
7390
children = (
7491
00E356F21AD99517003FC87E /* InstabugSampleTests.m */,
7592
00E356F01AD99517003FC87E /* Supporting Files */,
93+
BAD36E1B22F08B27007F5E74 /* InstabugBugReportingTests.m */,
94+
BAD36E1D22F0906A007F5E74 /* IBGConstants.m */,
95+
BAD36E1F22F09390007F5E74 /* IBGConstants.h */,
96+
BAD36E2C22F1955C007F5E74 /* InstabugChatsTests.m */,
97+
BAD36E2E22F19788007F5E74 /* InstabugFeatureRequestsTests.m */,
98+
BAD36E3022F19973007F5E74 /* InstabugRepliesTests.m */,
99+
BAD36E3222F19B1B007F5E74 /* InstabugSurveysTests.m */,
76100
);
77101
path = InstabugSampleTests;
78102
sourceTree = "<group>";
@@ -148,6 +172,10 @@
148172
499132AD8910CB4D10684C0B /* Pods-InstabugSample.release.xcconfig */,
149173
B5BDF7C4EF0BC367832D3796 /* Pods-InstabugSampleTests.debug.xcconfig */,
150174
6AADF551224449E100BEC5F2 /* Pods-InstabugSampleTests.release.xcconfig */,
175+
87F5729F702507D704C7BDC1 /* Pods-InstabugSample.debug.xcconfig */,
176+
6520812BE77D6515D82803F8 /* Pods-InstabugSample.release.xcconfig */,
177+
C74E4010ABE7AFC7DB5E79DC /* Pods-InstabugSampleTests.debug.xcconfig */,
178+
62941153FBCA702BE7DDD700 /* Pods-InstabugSampleTests.release.xcconfig */,
151179
);
152180
path = Pods;
153181
sourceTree = "<group>";
@@ -209,6 +237,9 @@
209237
CreatedOnToolsVersion = 6.2;
210238
TestTargetID = 13B07F861A680F5B00A75B9A;
211239
};
240+
13B07F861A680F5B00A75B9A = {
241+
DevelopmentTeam = Q93WTAKPYJ;
242+
};
212243
};
213244
};
214245
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "InstabugSample" */;
@@ -311,18 +342,16 @@
311342
files = (
312343
);
313344
inputPaths = (
314-
"${PODS_ROOT}/Target Support Files/Pods-InstabugSample/Pods-InstabugSample-frameworks.sh",
315-
"${PODS_ROOT}/Instabug/Instabug.framework",
316-
"${PODS_ROOT}/Instabug/Instabug.framework.dSYM",
345+
"${SRCROOT}/Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample-frameworks.sh",
346+
"${PODS_ROOT}/../../node_modules/instabug-reactnative/ios/Instabug.framework",
317347
);
318348
name = "[CP] Embed Pods Frameworks";
319349
outputPaths = (
320350
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework",
321-
"${DWARF_DSYM_FOLDER_PATH}/Instabug.framework.dSYM",
322351
);
323352
runOnlyForDeploymentPostprocessing = 0;
324353
shellPath = /bin/sh;
325-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InstabugSample/Pods-InstabugSample-frameworks.sh\"\n";
354+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample-frameworks.sh\"\n";
326355
showEnvVarsInLog = 0;
327356
};
328357
D495E6145A3927C0CCE13073 /* [CP] Check Pods Manifest.lock */ = {
@@ -373,7 +402,13 @@
373402
isa = PBXSourcesBuildPhase;
374403
buildActionMask = 2147483647;
375404
files = (
405+
BAD36E1E22F0906A007F5E74 /* IBGConstants.m in Sources */,
406+
BAD36E3322F19B1B007F5E74 /* InstabugSurveysTests.m in Sources */,
407+
BAD36E2F22F19788007F5E74 /* InstabugFeatureRequestsTests.m in Sources */,
408+
BAD36E1C22F08B27007F5E74 /* InstabugBugReportingTests.m in Sources */,
409+
BAD36E2D22F1955C007F5E74 /* InstabugChatsTests.m in Sources */,
376410
00E356F31AD99517003FC87E /* InstabugSampleTests.m in Sources */,
411+
BAD36E3122F19973007F5E74 /* InstabugRepliesTests.m in Sources */,
377412
);
378413
runOnlyForDeploymentPostprocessing = 0;
379414
};
@@ -434,7 +469,7 @@
434469
};
435470
00E356F71AD99517003FC87E /* Release */ = {
436471
isa = XCBuildConfiguration;
437-
baseConfigurationReference = 6AADF551224449E100BEC5F2 /* Pods-InstabugSampleTests.release.xcconfig */;
472+
baseConfigurationReference = 62941153FBCA702BE7DDD700 /* Pods-InstabugSampleTests.release.xcconfig */;
438473
buildSettings = {
439474
BUNDLE_LOADER = "$(TEST_HOST)";
440475
COPY_PHASE_STRIP = NO;
@@ -459,33 +494,35 @@
459494
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
460495
CURRENT_PROJECT_VERSION = 1;
461496
DEAD_CODE_STRIPPING = NO;
497+
DEVELOPMENT_TEAM = Q93WTAKPYJ;
462498
INFOPLIST_FILE = InstabugSample/Info.plist;
463499
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
464500
OTHER_LDFLAGS = (
465501
"$(inherited)",
466502
"-ObjC",
467503
"-lc++",
468504
);
469-
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
505+
PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.example.InstabugSamplelu2;
470506
PRODUCT_NAME = InstabugSample;
471507
VERSIONING_SYSTEM = "apple-generic";
472508
};
473509
name = Debug;
474510
};
475511
13B07F951A680F5B00A75B9A /* Release */ = {
476512
isa = XCBuildConfiguration;
477-
baseConfigurationReference = 499132AD8910CB4D10684C0B /* Pods-InstabugSample.release.xcconfig */;
513+
baseConfigurationReference = 6520812BE77D6515D82803F8 /* Pods-InstabugSample.release.xcconfig */;
478514
buildSettings = {
479515
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
480516
CURRENT_PROJECT_VERSION = 1;
517+
DEVELOPMENT_TEAM = Q93WTAKPYJ;
481518
INFOPLIST_FILE = InstabugSample/Info.plist;
482519
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
483520
OTHER_LDFLAGS = (
484521
"$(inherited)",
485522
"-ObjC",
486523
"-lc++",
487524
);
488-
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
525+
PRODUCT_BUNDLE_IDENTIFIER = org.reactjs.native.example.InstabugSamplelu2;
489526
PRODUCT_NAME = InstabugSample;
490527
VERSIONING_SYSTEM = "apple-generic";
491528
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// IBGConstants.h
3+
// InstabugSample
4+
//
5+
// Created by Salma Ali on 7/30/19.
6+
// Copyright © 2019 Facebook. All rights reserved.
7+
//
8+
9+
#ifndef IBGConstants_h
10+
#define IBGConstants_h
11+
12+
extern NSTimeInterval const EXPECTATION_TIMEOUT;
13+
14+
#endif /* IBGConstants_h */
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// IBGConstants.m
3+
// InstabugSampleTests
4+
//
5+
// Created by Salma Ali on 7/30/19.
6+
// Copyright © 2019 Facebook. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
NSTimeInterval const EXPECTATION_TIMEOUT = 10;

0 commit comments

Comments
 (0)