Skip to content

Commit

Permalink
Merge pull request #104 from rollbar/update_apple_sdk
Browse files Browse the repository at this point in the history
Use Rollbar Apple SDK 3 for native crash collection
  • Loading branch information
matux authored Jun 5, 2023
2 parents 7648534 + e894385 commit 751baee
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 64 deletions.
76 changes: 29 additions & 47 deletions rollbar_flutter/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
CA983656C878EC019B64828E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DFAF899D05FE95D1DEE08E52 /* Pods_Runner.framework */; };
DB7CB68E0C9ADBB3923D7B72 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1AD03F4FAC57D506C54CE7E /* Pods_Runner.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -33,8 +33,10 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
35410FCB89901EB813A73E3E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
742017FEA321A244B14431F7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
5A6223782FAAF825C3DA565E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
60FC3BC7BE54318F2318329F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
Expand All @@ -46,17 +48,15 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BA51E93435F180AE31586B93 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
D2D4739B5BCFB234777F8D4A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
DFAF899D05FE95D1DEE08E52 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C1AD03F4FAC57D506C54CE7E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CA983656C878EC019B64828E /* Pods_Runner.framework in Frameworks */,
DB7CB68E0C9ADBB3923D7B72 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -66,9 +66,9 @@
96A5165E35C2AB5B66047336 /* Pods */ = {
isa = PBXGroup;
children = (
742017FEA321A244B14431F7 /* Pods-Runner.debug.xcconfig */,
D2D4739B5BCFB234777F8D4A /* Pods-Runner.release.xcconfig */,
BA51E93435F180AE31586B93 /* Pods-Runner.profile.xcconfig */,
5A6223782FAAF825C3DA565E /* Pods-Runner.debug.xcconfig */,
35410FCB89901EB813A73E3E /* Pods-Runner.release.xcconfig */,
60FC3BC7BE54318F2318329F /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand All @@ -91,7 +91,7 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
96A5165E35C2AB5B66047336 /* Pods */,
E00D0E774CBD7FE183FEDA79 /* Frameworks */,
C573E8CE153D7C4DDF7F809F /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -127,10 +127,10 @@
name = "Supporting Files";
sourceTree = "<group>";
};
E00D0E774CBD7FE183FEDA79 /* Frameworks */ = {
C573E8CE153D7C4DDF7F809F /* Frameworks */ = {
isa = PBXGroup;
children = (
DFAF899D05FE95D1DEE08E52 /* Pods_Runner.framework */,
C1AD03F4FAC57D506C54CE7E /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -142,15 +142,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
728A4D31ACF8E2448135E056 /* [CP] Check Pods Manifest.lock */,
EB417D8CE14BCC87D1C34648 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
C61E5DBB581C92D3DB00ADC9 /* [CP] Copy Pods Resources */,
925AF82D935326C27F96F91B /* [CP] Embed Pods Frameworks */,
D0899767864D468492CB4E7C /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -224,29 +223,22 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
728A4D31ACF8E2448135E056 /* [CP] Check Pods Manifest.lock */ = {
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
name = "Run Script";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
925AF82D935326C27F96F91B /* [CP] Embed Pods Frameworks */ = {
D0899767864D468492CB4E7C /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -263,36 +255,26 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
C61E5DBB581C92D3DB00ADC9 /* [CP] Copy Pods Resources */ = {
EB417D8CE14BCC87D1C34648 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -38,8 +36,8 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -61,8 +59,6 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
Expand Down
2 changes: 1 addition & 1 deletion rollbar_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rollbar_flutter_example
description: Demonstrates how to use the rollbar_flutter plugin.
version: 1.3.1
version: 1.4.0

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

Expand Down
6 changes: 2 additions & 4 deletions rollbar_flutter/ios/Classes/RollbarFlutterPlugin.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import SystemConfiguration;
@import RollbarNotifier;
@import RollbarPLCrashReporter;

#import "RollbarFlutterPlugin.h"

Expand All @@ -19,13 +18,12 @@ - (void)handleMethodCall:(FlutterMethodCall *)call
{
if ([@"initialize" isEqualToString:call.method]) {
NSDictionary *arguments = call.arguments;
RollbarConfig *config = [[RollbarConfig alloc] init];
RollbarMutableConfig *config = [[RollbarMutableConfig alloc] init];
config.destination.accessToken = (NSString *)arguments[@"accessToken"];
config.destination.environment = (NSString *)arguments[@"environment"];
config.loggingOptions.codeVersion = (NSString *)arguments[@"codeVersion"];

id<RollbarCrashCollector> collector = [[RollbarPLCrashCollector alloc] init];
[Rollbar initWithConfiguration:config crashCollector:collector];
[Rollbar initWithConfiguration:config];

result(nil);
} else if ([@"persistencePath" isEqualToString:call.method]) {
Expand Down
7 changes: 3 additions & 4 deletions rollbar_flutter/ios/rollbar_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'rollbar_flutter'
s.version = '1.2.0'
s.version = '1.4.0'
s.summary = 'Connect your Flutter applications to Rollbar for error reporting.'
s.description = <<-DESC
Connect your Flutter applications to Rollbar for error reporting.
Expand All @@ -16,10 +16,9 @@ Connect your Flutter applications to Rollbar for error reporting.
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'RollbarNotifier', '~> 2.3.4'
s.dependency 'RollbarPLCrashReporter', '~> 2.3.4'
s.dependency 'RollbarNotifier', '~> 3.0.1'
s.static_framework = true
s.platform = :ios, '13.0'
s.platform = :ios, '14.0'

# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES',
Expand Down
4 changes: 2 additions & 2 deletions rollbar_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rollbar_flutter
description: Connect your Flutter applications to Rollbar for error reporting.
version: 1.3.1
version: 1.4.0
homepage: https://www.rollbar.com
documentation: https://docs.rollbar.com/docs/flutter#flutter
repository: https://github.com/rollbar/rollbar-flutter
Expand All @@ -14,7 +14,7 @@ dependencies:
sdk: flutter
meta: ^1.7.0
connectivity_plus: ^3.0.0
sqlite3_flutter_libs: '0.5.12'
sqlite3_flutter_libs: ^0.5.12
rollbar_common: ^1.1.0
rollbar_dart: ^1.3.0

Expand Down

0 comments on commit 751baee

Please sign in to comment.