diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e37add3d4..0b6ea71686 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased](https://github.com/Instabug/Instabug-React-Native/compare/v14.3.0...dev) + +### Added + +- Add support for xCode 16. ([#1370](https://github.com/Instabug/Instabug-React-Native/pull/1370)) + ## [14.3.0](https://github.com/Instabug/Instabug-React-Native/compare/v14.1.0...14.3.0) ### Added diff --git a/RNInstabug.podspec b/RNInstabug.podspec index 843865b5b7..af69112cc1 100644 --- a/RNInstabug.podspec +++ b/RNInstabug.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.homepage = package["homepage"] s.source = { :git => "https://github.com/Instabug/Instabug-React-Native.git", :tag => 'v' + package["version"] } - s.platform = :ios, "9.0" + s.platform = :ios, "13.0" s.source_files = "ios/**/*.{h,m,mm}" s.dependency 'React-Core' diff --git a/android/src/test/java/com/instabug/reactlibrary/RNInstabugReactnativeModuleTest.java b/android/src/test/java/com/instabug/reactlibrary/RNInstabugReactnativeModuleTest.java index ef507bb780..b94eb792cb 100644 --- a/android/src/test/java/com/instabug/reactlibrary/RNInstabugReactnativeModuleTest.java +++ b/android/src/test/java/com/instabug/reactlibrary/RNInstabugReactnativeModuleTest.java @@ -663,18 +663,18 @@ public void testW3CCaughtHeaderFlag(){ verify(promise).resolve(expected); } - + @Test public void testSetNetworkLogBodyEnabled() { rnModule.setNetworkLogBodyEnabled(true); - + mockInstabug.verify(() -> Instabug.setNetworkLogBodyEnabled(true)); } @Test public void testSetNetworkLogBodyDisabled() { rnModule.setNetworkLogBodyEnabled(false); - + mockInstabug.verify(() -> Instabug.setNetworkLogBodyEnabled(false)); } } diff --git a/examples/default/ios/InstabugTests/InstabugAPMTests.m b/examples/default/ios/InstabugTests/InstabugAPMTests.m index 5945b2b791..949393adb2 100644 --- a/examples/default/ios/InstabugTests/InstabugAPMTests.m +++ b/examples/default/ios/InstabugTests/InstabugAPMTests.m @@ -9,9 +9,9 @@ #import #import "OCMock/OCMock.h" #import "InstabugAPMBridge.h" -#import -#import -#import "Instabug/Instabug.h" +#import +#import +#import "InstabugSDK/InstabugSDK.h" #import "IBGConstants.h" #import "RNInstabug/IBGAPM+PrivateAPIs.h" diff --git a/examples/default/ios/InstabugTests/InstabugBugReportingTests.m b/examples/default/ios/InstabugTests/InstabugBugReportingTests.m index 99c3282200..a4b096b6db 100644 --- a/examples/default/ios/InstabugTests/InstabugBugReportingTests.m +++ b/examples/default/ios/InstabugTests/InstabugBugReportingTests.m @@ -9,8 +9,8 @@ #import #import "OCMock/OCMock.h" #import "InstabugBugReportingBridge.h" -#import -#import "Instabug/Instabug.h" +#import +#import "InstabugSDK/InstabugSDK.h" #import "IBGConstants.h" @interface InstabugBugReportingTests : XCTestCase @@ -39,7 +39,7 @@ - (void) testgivenBoolean$setBugReportingEnabled_whenQuery_thenShouldCallNativeA - (void) testgivenInvocationEvent$setInvocationEvents_whenQuery_thenShouldCallNativeApiWithArgs { NSArray *invocationEventsArr; invocationEventsArr = [NSArray arrayWithObjects: @(IBGInvocationEventScreenshot), nil]; - + [self.instabugBridge setInvocationEvents:invocationEventsArr]; IBGInvocationEvent invocationEvents = 0; for (NSNumber *boxedValue in invocationEventsArr) { @@ -76,7 +76,7 @@ - (void) testgivenHandlerSUBMIT$setOnSDKDismissedHandler_whenQuery_thenShouldCal RCTResponseSenderBlock callback = ^(NSArray *response) {}; [partialMock setOnSDKDismissedHandler:callback]; XCTAssertNotNil(IBGBugReporting.didDismissHandler); - + NSDictionary *result = @{ @"dismissType": @"SUBMIT", @"reportType": @"feedback"}; OCMStub([partialMock sendEventWithName:@"IBGpostInvocationHandler" body:result]); @@ -137,14 +137,14 @@ - (void) testgivenArgs$showBugReportingWithReportTypeAndOptions_whenQuery_thenSh } OCMStub([mock showWithReportType:reportType options:parsedOptions]); [self.instabugBridge show:reportType options:options]; - + XCTestExpectation *expectation = [self expectationWithDescription:@"Test ME PLX"]; - + [[NSRunLoop mainRunLoop] performBlock:^{ OCMVerify([mock showWithReportType:reportType options:parsedOptions]); [expectation fulfill]; }]; - + [self waitForExpectationsWithTimeout:EXPECTATION_TIMEOUT handler:nil]; } diff --git a/examples/default/ios/InstabugTests/InstabugCrashReportingTests.m b/examples/default/ios/InstabugTests/InstabugCrashReportingTests.m index d8ae7a0e54..5af452c03c 100644 --- a/examples/default/ios/InstabugTests/InstabugCrashReportingTests.m +++ b/examples/default/ios/InstabugTests/InstabugCrashReportingTests.m @@ -1,5 +1,5 @@ #import -#import "Instabug/Instabug.h" +#import "InstabugSDK/InstabugSDK.h" #import "InstabugCrashReportingBridge.h" #import "OCMock/OCMock.h" #import "Util/IBGCrashReporting+CP.h" @@ -19,10 +19,10 @@ - (void)setUp { } - (void)testSetEnabled { - + [self.bridge setEnabled:NO]; XCTAssertFalse(IBGCrashReporting.enabled); - + [self.bridge setEnabled:YES]; XCTAssertTrue(IBGCrashReporting.enabled); @@ -37,7 +37,7 @@ - (void)testSendJSCrash { [expectation fulfill]; }; RCTPromiseRejectBlock reject = ^(NSString *code, NSString *message, NSError *error) {}; - + [self.bridge sendJSCrash:stackTrace resolver:resolve rejecter:reject]; [self waitForExpectations:@[expectation] timeout:1]; @@ -52,9 +52,9 @@ - (void)testSendNonFatalErrorJsonCrash { NSDictionary *userAttributes = @{ @"key" : @"value", }; IBGNonFatalLevel ibgNonFatalLevel = IBGNonFatalLevelInfo; - + [self.bridge sendHandledJSCrash:jsonCrash userAttributes:userAttributes fingerprint:fingerPrint nonFatalExceptionLevel:ibgNonFatalLevel resolver:resolve rejecter:reject]; - + OCMVerify([self.mCrashReporting cp_reportNonFatalCrashWithStackTrace:jsonCrash level:IBGNonFatalLevelInfo groupingString:fingerPrint diff --git a/examples/default/ios/InstabugTests/InstabugFeatureRequestsTests.m b/examples/default/ios/InstabugTests/InstabugFeatureRequestsTests.m index 4c300ab4c1..dae3bfaae9 100644 --- a/examples/default/ios/InstabugTests/InstabugFeatureRequestsTests.m +++ b/examples/default/ios/InstabugTests/InstabugFeatureRequestsTests.m @@ -9,8 +9,8 @@ #import #import "OCMock/OCMock.h" #import "InstabugFeatureRequestsBridge.h" -#import -#import "Instabug/Instabug.h" +#import +#import "InstabugSDK/InstabugSDK.h" #import "IBGConstants.h" @interface InstabugFeatureRequestsTests : XCTestCase @@ -48,12 +48,12 @@ - (void) testgive$show_whenQuery_thenShouldCallNativeApi { OCMStub([mock show]); [self.instabugBridge show]; XCTestExpectation *expectation = [self expectationWithDescription:@"Test ME PLX"]; - + [[NSRunLoop mainRunLoop] performBlock:^{ OCMVerify([mock show]); [expectation fulfill]; }]; - + [self waitForExpectationsWithTimeout:EXPECTATION_TIMEOUT handler:nil]; } diff --git a/examples/default/ios/InstabugTests/InstabugRepliesTests.m b/examples/default/ios/InstabugTests/InstabugRepliesTests.m index a5c31e934b..d968cc8ebb 100644 --- a/examples/default/ios/InstabugTests/InstabugRepliesTests.m +++ b/examples/default/ios/InstabugTests/InstabugRepliesTests.m @@ -9,8 +9,8 @@ #import #import "OCMock/OCMock.h" #import "InstabugRepliesBridge.h" -#import -#import "Instabug/Instabug.h" +#import +#import "InstabugSDK/InstabugSDK.h" #import "IBGConstants.h" @interface InstabugRepliesTests : XCTestCase @@ -53,12 +53,12 @@ - (void) testgiven$show_whenQuery_thenShouldCallNativeApi { OCMStub([mock show]); [self.instabugBridge show]; XCTestExpectation *expectation = [self expectationWithDescription:@"Test ME PLX"]; - + [[NSRunLoop mainRunLoop] performBlock:^{ OCMVerify([mock show]); [expectation fulfill]; }]; - + [self waitForExpectationsWithTimeout:EXPECTATION_TIMEOUT handler:nil]; } @@ -67,7 +67,7 @@ - (void) testgivenOnNewReplyReceivedHandler$setOnNewReplyReceivedCallback_whenQu RCTResponseSenderBlock callback = ^(NSArray *response) {}; [partialMock setOnNewReplyReceivedHandler:callback]; XCTAssertNotNil(IBGReplies.didReceiveReplyHandler); - + OCMStub([partialMock sendEventWithName:@"IBGOnNewReplyReceivedCallback" body:nil]); IBGReplies.didReceiveReplyHandler(); OCMVerify([partialMock sendEventWithName:@"IBGOnNewReplyReceivedCallback" body:nil]); @@ -90,7 +90,7 @@ - (void) testgivenBoolean$setInAppNotificationEnabled_whenQuery_thenShouldCallNa - (void)testSetPushNotificationsEnabled { id mock = OCMClassMock([IBGReplies class]); BOOL isPushNotificationEnabled = true; - + OCMStub([mock setPushNotificationsEnabled:isPushNotificationEnabled]); [self.instabugBridge setPushNotificationsEnabled:isPushNotificationEnabled]; OCMVerify([mock setPushNotificationsEnabled:isPushNotificationEnabled]); diff --git a/examples/default/ios/InstabugTests/InstabugSampleTests.m b/examples/default/ios/InstabugTests/InstabugSampleTests.m index 281fc35d69..fdbcdfb217 100644 --- a/examples/default/ios/InstabugTests/InstabugSampleTests.m +++ b/examples/default/ios/InstabugTests/InstabugSampleTests.m @@ -7,9 +7,9 @@ #import #import "OCMock/OCMock.h" -#import "Instabug/Instabug.h" +#import "InstabugSDK/InstabugSDK.h" #import "InstabugReactBridge.h" -#import +#import #import "IBGConstants.h" #import "RNInstabug.h" #import diff --git a/examples/default/ios/InstabugTests/InstabugSessionReplayTests.m b/examples/default/ios/InstabugTests/InstabugSessionReplayTests.m index c3f037e60a..74bc62c3ff 100644 --- a/examples/default/ios/InstabugTests/InstabugSessionReplayTests.m +++ b/examples/default/ios/InstabugTests/InstabugSessionReplayTests.m @@ -1,8 +1,8 @@ #import #import "OCMock/OCMock.h" #import "InstabugSessionReplayBridge.h" -#import -#import "Instabug/Instabug.h" +#import +#import "InstabugSDK/InstabugSDK.h" #import "IBGConstants.h" @interface InstabugSessionReplayTests : XCTestCase diff --git a/examples/default/ios/InstabugTests/InstabugSurveysTests.m b/examples/default/ios/InstabugTests/InstabugSurveysTests.m index b0790b8b25..fb4ec70055 100644 --- a/examples/default/ios/InstabugTests/InstabugSurveysTests.m +++ b/examples/default/ios/InstabugTests/InstabugSurveysTests.m @@ -9,8 +9,8 @@ #import #import "OCMock/OCMock.h" #import "InstabugSurveysBridge.h" -#import -#import "Instabug/Instabug.h" +#import +#import "InstabugSDK/InstabugSDK.h" #import "IBGConstants.h" @interface InstabugSurveysTests : XCTestCase @@ -45,7 +45,7 @@ - (void)setUp { - (void)testShowingSurvey { id mock = OCMClassMock([IBGSurveys class]); NSString *token = @"token"; - + OCMStub([mock showSurveyWithToken:token]); [self.instabugBridge showSurvey:token]; OCMVerify([mock showSurveyWithToken:token]); @@ -54,7 +54,7 @@ - (void)testShowingSurvey { - (void) testShowSurveyIfAvailable { id mock = OCMClassMock([IBGSurveys class]); - + OCMStub([mock showSurveyIfAvailable]); [self.instabugBridge showSurveysIfAvailable]; OCMVerify([mock showSurveyIfAvailable]); @@ -63,7 +63,7 @@ - (void) testShowSurveyIfAvailable { - (void) testAutoShowingSurveysEnabled { id mock = OCMClassMock([IBGSurveys class]); BOOL isEnabled = YES; - + OCMStub([mock setAutoShowingEnabled:isEnabled]); [self.instabugBridge setAutoShowingEnabled:isEnabled]; OCMVerify([mock setAutoShowingEnabled:isEnabled]); @@ -72,7 +72,7 @@ - (void) testAutoShowingSurveysEnabled { - (void) testSetShouldShowSurveysWelcomeScreen { id mock = OCMClassMock([IBGSurveys class]); BOOL isEnabled = YES; - + OCMStub([mock setShouldShowWelcomeScreen:isEnabled]); [self.instabugBridge setShouldShowWelcomeScreen:isEnabled]; OCMVerify([mock setShouldShowWelcomeScreen:isEnabled]); @@ -80,7 +80,7 @@ - (void) testSetShouldShowSurveysWelcomeScreen { - (void) testSetSurveysEnabled { BOOL isEnabled = YES; - + [self.instabugBridge setEnabled:isEnabled]; XCTAssertTrue(IBGSurveys.enabled); } @@ -95,7 +95,7 @@ - (void) testHasRespondedToSurveyWithToken { [expectation fulfill]; }; RCTPromiseRejectBlock reject = ^(NSString *code, NSString *message, NSError *error) {}; - + OCMStub([mock hasRespondedToSurveyWithToken:surveyToken completionHandler:[OCMArg invokeBlock]]); [self.instabugBridge hasRespondedToSurvey:surveyToken :resolve :reject]; OCMVerify([mock hasRespondedToSurveyWithToken:surveyToken completionHandler:[OCMArg isNotNil]]); @@ -136,7 +136,7 @@ - (void) testSetDidDismissSurveyHandler { - (void) testSetAppStoreURL { NSString *appStoreURL = @"http://test"; - + [self.instabugBridge setAppStoreURL:appStoreURL]; XCTAssertEqual(IBGSurveys.appStoreURL, appStoreURL); } diff --git a/examples/default/ios/InstabugTests/RNInstabugTests.m b/examples/default/ios/InstabugTests/RNInstabugTests.m index 930da52ca5..abf355614f 100644 --- a/examples/default/ios/InstabugTests/RNInstabugTests.m +++ b/examples/default/ios/InstabugTests/RNInstabugTests.m @@ -1,7 +1,7 @@ #import #import "OCMock/OCMock.h" -#import "Instabug/Instabug.h" -#import +#import "InstabugSDK/InstabugSDK.h" +#import #import "RNInstabug.h" #import "RNInstabug/Instabug+CP.h" #import "RNInstabug/IBGNetworkLogger+CP.h" diff --git a/examples/default/ios/InstabugTests/Util/IBGCrashReporting+CP.h b/examples/default/ios/InstabugTests/Util/IBGCrashReporting+CP.h index 4229dbceab..cf3a1c2009 100644 --- a/examples/default/ios/InstabugTests/Util/IBGCrashReporting+CP.h +++ b/examples/default/ios/InstabugTests/Util/IBGCrashReporting+CP.h @@ -1,4 +1,4 @@ -#import +#import @interface IBGCrashReporting (CP) diff --git a/examples/default/ios/Podfile b/examples/default/ios/Podfile index 3526171cd4..10b2cc5b7f 100644 --- a/examples/default/ios/Podfile +++ b/examples/default/ios/Podfile @@ -15,6 +15,9 @@ target 'InstabugExample' do config = use_native_modules! rn_maps_path = '../node_modules/react-native-maps' pod 'react-native-google-maps', :path => rn_maps_path + # add this line + pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/fix-main-thread-warning/15.0.0/Instabug.podspec' + # Flags change depending on the env values. flags = get_default_flags() diff --git a/examples/default/ios/Podfile.lock b/examples/default/ios/Podfile.lock index 2062dad75a..23d7a399ee 100644 --- a/examples/default/ios/Podfile.lock +++ b/examples/default/ios/Podfile.lock @@ -31,7 +31,7 @@ PODS: - hermes-engine (0.75.4): - hermes-engine/Pre-built (= 0.75.4) - hermes-engine/Pre-built (0.75.4) - - Instabug (14.3.0) + - Instabug (15.0.0) - instabug-reactnative-ndk (0.1.0): - DoubleConversion - glog @@ -1624,7 +1624,7 @@ PODS: - ReactCommon/turbomodule/core - Yoga - RNInstabug (14.3.0): - - Instabug (= 14.3.0) + - Instabug (= 15.0.0) - React-Core - RNReanimated (3.16.1): - DoubleConversion @@ -1768,6 +1768,7 @@ DEPENDENCIES: - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) + - Instabug (from `https://ios-releases.instabug.com/custom/fix-main-thread-warning/15.0.0/Instabug.podspec`) - instabug-reactnative-ndk (from `../node_modules/instabug-reactnative-ndk`) - OCMock - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) @@ -1847,7 +1848,6 @@ SPEC REPOS: trunk: - Google-Maps-iOS-Utils - GoogleMaps - - Instabug - OCMock - SocketRocket @@ -1865,6 +1865,8 @@ EXTERNAL SOURCES: hermes-engine: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" :tag: hermes-2024-08-15-RNv0.75.1-4b3bf912cc0f705b51b71ce1a5b8bd79b93a451b + Instabug: + :podspec: https://ios-releases.instabug.com/custom/fix-main-thread-warning/15.0.0/Instabug.podspec instabug-reactnative-ndk: :path: "../node_modules/instabug-reactnative-ndk" RCT-Folly: @@ -2017,7 +2019,7 @@ SPEC CHECKSUMS: Google-Maps-iOS-Utils: f77eab4c4326d7e6a277f8e23a0232402731913a GoogleMaps: 032f676450ba0779bd8ce16840690915f84e57ac hermes-engine: ea92f60f37dba025e293cbe4b4a548fd26b610a0 - Instabug: 97a4e694731f46bbc02dbe49ab29cc552c5e2f41 + Instabug: 3b1db5a683e85ec5a02946aa2b3314036f9022be instabug-reactnative-ndk: d765ac289d56e8896398d02760d9abf2562fc641 OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74 RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 @@ -2084,7 +2086,7 @@ SPEC CHECKSUMS: ReactCommon: 6a952e50c2a4b694731d7682aaa6c79bc156e4ad RNCClipboard: 2821ac938ef46f736a8de0c8814845dde2dcbdfb RNGestureHandler: 511250b190a284388f9dd0d2e56c1df76f14cfb8 - RNInstabug: c55b6c697b39d3cbe51b1ab9b729f0b55ed619f1 + RNInstabug: fd8d5ad4eab9a25aa85534e3b32f400cb0a4b61c RNReanimated: f42a5044d121d68e91680caacb0293f4274228eb RNScreens: c7ceced6a8384cb9be5e7a5e88e9e714401fd958 RNSVG: 8b1a777d54096b8c2a0fd38fc9d5a454332bbb4d @@ -2092,6 +2094,6 @@ SPEC CHECKSUMS: SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d Yoga: 055f92ad73f8c8600a93f0e25ac0b2344c3b07e6 -PODFILE CHECKSUM: 63bf073bef3872df95ea45e7c9c023a331ebb3c3 +PODFILE CHECKSUM: 62df19179352b0c81c037eac790f1c5fb84b8ed0 COCOAPODS: 1.14.0 diff --git a/examples/default/ios/native/CrashReportingExampleModule.m b/examples/default/ios/native/CrashReportingExampleModule.m index b337da215e..7cf031b2da 100644 --- a/examples/default/ios/native/CrashReportingExampleModule.m +++ b/examples/default/ios/native/CrashReportingExampleModule.m @@ -1,6 +1,6 @@ #import "CrashReportingExampleModule.h" -#import -#import +#import +#import @interface CrashReportingExampleModule() @property (nonatomic, strong) NSMutableArray *oomBelly; diff --git a/ios/RNInstabug/ArgsRegistry.h b/ios/RNInstabug/ArgsRegistry.h index c7720e38fb..f83b8a53f2 100644 --- a/ios/RNInstabug/ArgsRegistry.h +++ b/ios/RNInstabug/ArgsRegistry.h @@ -1,6 +1,6 @@ #import -#import -#import +#import +#import typedef NSDictionary ArgsDictionary; diff --git a/ios/RNInstabug/InstabugAPMBridge.h b/ios/RNInstabug/InstabugAPMBridge.h index b15788d50c..0a0ea397c0 100644 --- a/ios/RNInstabug/InstabugAPMBridge.h +++ b/ios/RNInstabug/InstabugAPMBridge.h @@ -2,7 +2,7 @@ #import #import #import -#import +#import @interface InstabugAPMBridge : RCTEventEmitter /* diff --git a/ios/RNInstabug/InstabugAPMBridge.m b/ios/RNInstabug/InstabugAPMBridge.m index dd77bf130a..c28c7f425f 100644 --- a/ios/RNInstabug/InstabugAPMBridge.m +++ b/ios/RNInstabug/InstabugAPMBridge.m @@ -1,12 +1,12 @@ #import "InstabugAPMBridge.h" -#import -#import +#import +#import #import #import #import -#import +#import #import #import "Util/IBGAPM+PrivateAPIs.h" diff --git a/ios/RNInstabug/InstabugBugReportingBridge.h b/ios/RNInstabug/InstabugBugReportingBridge.h index ffb393a0a1..2089fb48f4 100644 --- a/ios/RNInstabug/InstabugBugReportingBridge.h +++ b/ios/RNInstabug/InstabugBugReportingBridge.h @@ -9,8 +9,8 @@ #import #import #import -#import -#import +#import +#import @interface InstabugBugReportingBridge : RCTEventEmitter /* diff --git a/ios/RNInstabug/InstabugBugReportingBridge.m b/ios/RNInstabug/InstabugBugReportingBridge.m index 488a0c9899..7385e8a9fb 100644 --- a/ios/RNInstabug/InstabugBugReportingBridge.m +++ b/ios/RNInstabug/InstabugBugReportingBridge.m @@ -7,7 +7,7 @@ // #import "InstabugBugReportingBridge.h" -#import +#import #import #import #import @@ -59,7 +59,7 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(setOnSDKDismissedHandler:(RCTResponseSenderBlock)callBack) { if (callBack != nil) { IBGBugReporting.didDismissHandler = ^(IBGDismissType dismissType, IBGReportType reportType) { - + //parse dismiss type enum NSString* dismissTypeString; if (dismissType == IBGDismissTypeCancel) { @@ -69,7 +69,7 @@ + (BOOL)requiresMainQueueSetup } else if (dismissType == IBGDismissTypeAddAttachment) { dismissTypeString = @"ADD_ATTACHMENT"; } - + //parse report type enum NSString* reportTypeString; if (reportType == IBGReportTypeBug) { @@ -90,9 +90,9 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(setDidSelectPromptOptionHandler:(RCTResponseSenderBlock)callBack) { if (callBack != nil) { - + IBGBugReporting.didSelectPromptOptionHandler = ^(IBGPromptOption promptOption) { - + NSString *promptOptionString; if (promptOption == IBGPromptOptionBug) { promptOptionString = @"bug"; @@ -103,7 +103,7 @@ + (BOOL)requiresMainQueueSetup } else { promptOptionString = @"none"; } - + [self sendEventWithName:@"IBGDidSelectPromptOptionHandler" body:@{ @"promptOption": promptOptionString }]; @@ -123,11 +123,11 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(setOptions:(NSArray*)invocationOptionsArray) { IBGBugReportingOption invocationOptions = 0; - + for (NSNumber *boxedValue in invocationOptionsArray) { invocationOptions |= [boxedValue intValue]; } - + IBGBugReporting.bugReportingOptions = invocationOptions; } @@ -157,7 +157,7 @@ + (BOOL)requiresMainQueueSetup if(screenRecording) { attachmentTypes |= IBGAttachmentTypeScreenRecording; } - + IBGBugReporting.enabledAttachmentTypes = attachmentTypes; } diff --git a/ios/RNInstabug/InstabugCrashReportingBridge.h b/ios/RNInstabug/InstabugCrashReportingBridge.h index 0dbb7f59ff..7da8c187af 100644 --- a/ios/RNInstabug/InstabugCrashReportingBridge.h +++ b/ios/RNInstabug/InstabugCrashReportingBridge.h @@ -1,10 +1,10 @@ #import #import #import -#import -#import -#import -#import +#import +#import +#import +#import #import "ArgsRegistry.h" @interface InstabugCrashReportingBridge : RCTEventEmitter diff --git a/ios/RNInstabug/InstabugFeatureRequestsBridge.h b/ios/RNInstabug/InstabugFeatureRequestsBridge.h index fa4e9dced9..0a36234312 100644 --- a/ios/RNInstabug/InstabugFeatureRequestsBridge.h +++ b/ios/RNInstabug/InstabugFeatureRequestsBridge.h @@ -9,7 +9,7 @@ #import #import #import -#import +#import @interface InstabugFeatureRequestsBridge : RCTEventEmitter /* diff --git a/ios/RNInstabug/InstabugFeatureRequestsBridge.m b/ios/RNInstabug/InstabugFeatureRequestsBridge.m index 58816ec58f..5658a4fe71 100644 --- a/ios/RNInstabug/InstabugFeatureRequestsBridge.m +++ b/ios/RNInstabug/InstabugFeatureRequestsBridge.m @@ -7,11 +7,11 @@ // #import "InstabugFeatureRequestsBridge.h" -#import +#import #import #import #import -#import +#import #import @implementation InstabugFeatureRequestsBridge @@ -38,11 +38,11 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(setEmailFieldRequiredForFeatureRequests:(BOOL)isEmailFieldRequired forAction:(NSArray *)actionTypesArray) { IBGAction actionTypes = 0; - + for (NSNumber *boxedValue in actionTypesArray) { actionTypes |= [boxedValue intValue]; } - + [IBGFeatureRequests setEmailFieldRequired:isEmailFieldRequired forAction:actionTypes]; } diff --git a/ios/RNInstabug/InstabugReactBridge.h b/ios/RNInstabug/InstabugReactBridge.h index 1498da336d..40e66c0b82 100644 --- a/ios/RNInstabug/InstabugReactBridge.h +++ b/ios/RNInstabug/InstabugReactBridge.h @@ -9,11 +9,11 @@ #import #import #import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import #import "ArgsRegistry.h" @interface InstabugReactBridge : RCTEventEmitter diff --git a/ios/RNInstabug/InstabugReactBridge.m b/ios/RNInstabug/InstabugReactBridge.m index f5237e1b7e..9e1928e1ec 100644 --- a/ios/RNInstabug/InstabugReactBridge.m +++ b/ios/RNInstabug/InstabugReactBridge.m @@ -5,11 +5,11 @@ // Created by Yousef Hamza on 9/29/16. #import "InstabugReactBridge.h" -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import #import #import #import diff --git a/ios/RNInstabug/InstabugRepliesBridge.h b/ios/RNInstabug/InstabugRepliesBridge.h index 2f33e28f87..a6ffa6811d 100644 --- a/ios/RNInstabug/InstabugRepliesBridge.h +++ b/ios/RNInstabug/InstabugRepliesBridge.h @@ -10,7 +10,7 @@ #import #import #import -#import +#import @interface InstabugRepliesBridge : RCTEventEmitter /* diff --git a/ios/RNInstabug/InstabugRepliesBridge.m b/ios/RNInstabug/InstabugRepliesBridge.m index 1006f1ece9..16a1e0cbea 100644 --- a/ios/RNInstabug/InstabugRepliesBridge.m +++ b/ios/RNInstabug/InstabugRepliesBridge.m @@ -8,11 +8,11 @@ // #import "InstabugRepliesBridge.h" -#import +#import #import #import #import -#import +#import #import @implementation InstabugRepliesBridge @@ -39,7 +39,7 @@ + (BOOL)requiresMainQueueSetup RCT_EXPORT_METHOD(hasChats:(RCTPromiseResolveBlock)resolve :(RCTPromiseRejectBlock)reject) { BOOL hasChats = IBGReplies.hasChats; resolve(@(hasChats)); - + } RCT_EXPORT_METHOD(show) { @@ -54,7 +54,7 @@ + (BOOL)requiresMainQueueSetup } else { IBGReplies.didReceiveReplyHandler = nil; } - + } RCT_EXPORT_METHOD(getUnreadRepliesCount:(RCTPromiseResolveBlock)resolve :(RCTPromiseRejectBlock)reject) { diff --git a/ios/RNInstabug/InstabugSessionReplayBridge.h b/ios/RNInstabug/InstabugSessionReplayBridge.h index 259ea1c146..113342bb20 100644 --- a/ios/RNInstabug/InstabugSessionReplayBridge.h +++ b/ios/RNInstabug/InstabugSessionReplayBridge.h @@ -1,8 +1,8 @@ #import #import #import -#import -#import +#import +#import @interface InstabugSessionReplayBridge : RCTEventEmitter /* diff --git a/ios/RNInstabug/InstabugSessionReplayBridge.m b/ios/RNInstabug/InstabugSessionReplayBridge.m index 2c865ecb5f..fd64edf37e 100644 --- a/ios/RNInstabug/InstabugSessionReplayBridge.m +++ b/ios/RNInstabug/InstabugSessionReplayBridge.m @@ -1,9 +1,9 @@ #import #import #import -#import +#import #import -#import +#import #import "InstabugSessionReplayBridge.h" @implementation InstabugSessionReplayBridge @@ -50,11 +50,11 @@ + (BOOL)requiresMainQueueSetup - (NSArray *)getNetworkLogsArray: (NSArray*) networkLogs { NSMutableArray *networkLogsArray = [NSMutableArray array]; - + for (IBGSessionMetadataNetworkLogs* log in networkLogs) { NSDictionary *nLog = @{@"url": log.url, @"statusCode": @(log.statusCode), @"duration": @(log.duration)}; [networkLogsArray addObject:nLog]; - } + } return networkLogsArray; } @@ -76,22 +76,22 @@ - (NSDictionary *)getMetadataObjectMap:(IBGSessionMetadata *)metadataObject { RCT_EXPORT_METHOD(setSyncCallback) { [IBGSessionReplay setSyncCallbackWithHandler:^(IBGSessionMetadata * _Nonnull metadataObject, SessionEvaluationCompletion _Nonnull completion) { - + [self sendEventWithName:@"IBGSessionReplayOnSyncCallback" body:[self getMetadataObjectMap:metadataObject]]; - + self.sessionEvaluationCompletion = completion; }]; } RCT_EXPORT_METHOD(evaluateSync:(BOOL)result) { - + if (self.sessionEvaluationCompletion) { - + self.sessionEvaluationCompletion(result); - + self.sessionEvaluationCompletion = nil; - + } } diff --git a/ios/RNInstabug/InstabugSurveysBridge.h b/ios/RNInstabug/InstabugSurveysBridge.h index fe483130eb..e1ca5058d8 100644 --- a/ios/RNInstabug/InstabugSurveysBridge.h +++ b/ios/RNInstabug/InstabugSurveysBridge.h @@ -9,7 +9,7 @@ #import #import #import -#import +#import @interface InstabugSurveysBridge : RCTEventEmitter /* diff --git a/ios/RNInstabug/InstabugSurveysBridge.m b/ios/RNInstabug/InstabugSurveysBridge.m index 4659707643..6beeae3934 100644 --- a/ios/RNInstabug/InstabugSurveysBridge.m +++ b/ios/RNInstabug/InstabugSurveysBridge.m @@ -7,11 +7,11 @@ // #import "InstabugSurveysBridge.h" -#import +#import #import #import #import -#import +#import #import @implementation InstabugSurveysBridge diff --git a/ios/RNInstabug/RCTConvert+InstabugEnums.m b/ios/RNInstabug/RCTConvert+InstabugEnums.m index 3e675ca2fa..59d8e660ef 100644 --- a/ios/RNInstabug/RCTConvert+InstabugEnums.m +++ b/ios/RNInstabug/RCTConvert+InstabugEnums.m @@ -7,7 +7,7 @@ // #import "RCTConvert+InstabugEnums.h" -#import +#import @implementation RCTConvert (InstabugEnums) diff --git a/ios/RNInstabug/RNInstabug.h b/ios/RNInstabug/RNInstabug.h index 91eaea84d5..70612fef70 100644 --- a/ios/RNInstabug/RNInstabug.h +++ b/ios/RNInstabug/RNInstabug.h @@ -1,7 +1,7 @@ #ifndef RNInstabug_h #define RNInstabug_h -#import +#import @interface RNInstabug : NSObject @@ -18,11 +18,11 @@ useNativeNetworkInterception:(BOOL)useNativeNetworkInterception; /** @brief Set codePush version before starting the SDK. - + @discussion Sets Code Push version to be used for all reports. should be called from `-[UIApplicationDelegate application:didFinishLaunchingWithOptions:]` and before `startWithToken`. - + @param codePushVersion the Code Push version to be used for all reports. */ + (void)setCodePushVersion:(NSString *)codePushVersion; diff --git a/ios/RNInstabug/RNInstabug.m b/ios/RNInstabug/RNInstabug.m index 275d0095b6..3ea51ae594 100644 --- a/ios/RNInstabug/RNInstabug.m +++ b/ios/RNInstabug/RNInstabug.m @@ -1,4 +1,4 @@ -#import +#import #import #import "RNInstabug.h" #import "Util/IBGNetworkLogger+CP.h" diff --git a/ios/RNInstabug/Util/IBGCrashReporting+CP.h b/ios/RNInstabug/Util/IBGCrashReporting+CP.h index 4229dbceab..cf3a1c2009 100644 --- a/ios/RNInstabug/Util/IBGCrashReporting+CP.h +++ b/ios/RNInstabug/Util/IBGCrashReporting+CP.h @@ -1,4 +1,4 @@ -#import +#import @interface IBGCrashReporting (CP) diff --git a/ios/RNInstabug/Util/IBGNetworkLogger+CP.h b/ios/RNInstabug/Util/IBGNetworkLogger+CP.h index 805591d0ce..a1e208e88c 100644 --- a/ios/RNInstabug/Util/IBGNetworkLogger+CP.h +++ b/ios/RNInstabug/Util/IBGNetworkLogger+CP.h @@ -1,4 +1,4 @@ -#import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/ios/RNInstabug/Util/Instabug+CP.h b/ios/RNInstabug/Util/Instabug+CP.h index 8666413f0c..2cc35a4b75 100644 --- a/ios/RNInstabug/Util/Instabug+CP.h +++ b/ios/RNInstabug/Util/Instabug+CP.h @@ -1,5 +1,5 @@ -#import -#import +#import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/ios/native.rb b/ios/native.rb index 5391315284..7be4eb4230 100644 --- a/ios/native.rb +++ b/ios/native.rb @@ -1,4 +1,4 @@ -$instabug = { :version => '14.3.0' } +$instabug = { :version => '15.0.0' } def use_instabug! (spec = nil) version = $instabug[:version] diff --git a/scripts/customize-ios-endpoints.sh b/scripts/customize-ios-endpoints.sh index 2fecd9d729..2b790cd5f4 100755 --- a/scripts/customize-ios-endpoints.sh +++ b/scripts/customize-ios-endpoints.sh @@ -13,11 +13,11 @@ if [ ! -f $instabug_plist ]; then exit 1 fi -for dir in examples/default/ios/Pods/Instabug/Instabug.xcframework/ios-*/ +for dir in examples/default/ios/Pods/Instabug/InstabugSDK.xcframework/ios-*/ do echo "Replacing Config.plist in $dir" - config_path=$dir/Instabug.framework/InstabugResources.bundle/Config.plist + config_path=$dir/InstabugSDK.framework/InstabugResources.bundle/Config.plist if [ ! -f $config_path ]; then echo "Config.plist not found in $dir"