diff --git a/examples/flutter/.gitignore b/example/flutter/.gitignore similarity index 100% rename from examples/flutter/.gitignore rename to example/flutter/.gitignore diff --git a/examples/flutter/.metadata b/example/flutter/.metadata similarity index 100% rename from examples/flutter/.metadata rename to example/flutter/.metadata diff --git a/examples/flutter/README.md b/example/flutter/README.md similarity index 100% rename from examples/flutter/README.md rename to example/flutter/README.md diff --git a/examples/flutter/analysis_options.yaml b/example/flutter/analysis_options.yaml similarity index 100% rename from examples/flutter/analysis_options.yaml rename to example/flutter/analysis_options.yaml diff --git a/examples/flutter/android/.gitignore b/example/flutter/android/.gitignore similarity index 100% rename from examples/flutter/android/.gitignore rename to example/flutter/android/.gitignore diff --git a/examples/flutter/android/app/build.gradle b/example/flutter/android/app/build.gradle similarity index 100% rename from examples/flutter/android/app/build.gradle rename to example/flutter/android/app/build.gradle diff --git a/examples/flutter/android/app/src/debug/AndroidManifest.xml b/example/flutter/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from examples/flutter/android/app/src/debug/AndroidManifest.xml rename to example/flutter/android/app/src/debug/AndroidManifest.xml diff --git a/examples/flutter/android/app/src/main/AndroidManifest.xml b/example/flutter/android/app/src/main/AndroidManifest.xml similarity index 100% rename from examples/flutter/android/app/src/main/AndroidManifest.xml rename to example/flutter/android/app/src/main/AndroidManifest.xml diff --git a/examples/flutter/android/app/src/main/java/com/bugsnag/examples/flutter/MainActivity.java b/example/flutter/android/app/src/main/java/com/bugsnag/examples/flutter/MainActivity.java similarity index 100% rename from examples/flutter/android/app/src/main/java/com/bugsnag/examples/flutter/MainActivity.java rename to example/flutter/android/app/src/main/java/com/bugsnag/examples/flutter/MainActivity.java diff --git a/examples/flutter/android/app/src/main/res/drawable-v21/launch_background.xml b/example/flutter/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from examples/flutter/android/app/src/main/res/drawable-v21/launch_background.xml rename to example/flutter/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/examples/flutter/android/app/src/main/res/drawable/launch_background.xml b/example/flutter/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from examples/flutter/android/app/src/main/res/drawable/launch_background.xml rename to example/flutter/android/app/src/main/res/drawable/launch_background.xml diff --git a/examples/flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from examples/flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to example/flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/examples/flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from examples/flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to example/flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/examples/flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from examples/flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to example/flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/examples/flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from examples/flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to example/flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/examples/flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from examples/flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to example/flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/examples/flutter/android/app/src/main/res/values-night/styles.xml b/example/flutter/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from examples/flutter/android/app/src/main/res/values-night/styles.xml rename to example/flutter/android/app/src/main/res/values-night/styles.xml diff --git a/examples/flutter/android/app/src/main/res/values/styles.xml b/example/flutter/android/app/src/main/res/values/styles.xml similarity index 100% rename from examples/flutter/android/app/src/main/res/values/styles.xml rename to example/flutter/android/app/src/main/res/values/styles.xml diff --git a/examples/flutter/android/app/src/profile/AndroidManifest.xml b/example/flutter/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from examples/flutter/android/app/src/profile/AndroidManifest.xml rename to example/flutter/android/app/src/profile/AndroidManifest.xml diff --git a/examples/flutter/android/build.gradle b/example/flutter/android/build.gradle similarity index 100% rename from examples/flutter/android/build.gradle rename to example/flutter/android/build.gradle diff --git a/examples/flutter/android/gradle.properties b/example/flutter/android/gradle.properties similarity index 100% rename from examples/flutter/android/gradle.properties rename to example/flutter/android/gradle.properties diff --git a/examples/flutter/android/gradle/wrapper/gradle-wrapper.properties b/example/flutter/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from examples/flutter/android/gradle/wrapper/gradle-wrapper.properties rename to example/flutter/android/gradle/wrapper/gradle-wrapper.properties diff --git a/examples/flutter/android/settings.gradle b/example/flutter/android/settings.gradle similarity index 100% rename from examples/flutter/android/settings.gradle rename to example/flutter/android/settings.gradle diff --git a/examples/flutter/ios/.gitignore b/example/flutter/ios/.gitignore similarity index 100% rename from examples/flutter/ios/.gitignore rename to example/flutter/ios/.gitignore diff --git a/example/flutter/ios/Flutter/AppFrameworkInfo.plist b/example/flutter/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..8d4492f9 --- /dev/null +++ b/example/flutter/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/examples/flutter/ios/Flutter/Debug.xcconfig b/example/flutter/ios/Flutter/Debug.xcconfig similarity index 100% rename from examples/flutter/ios/Flutter/Debug.xcconfig rename to example/flutter/ios/Flutter/Debug.xcconfig diff --git a/examples/flutter/ios/Flutter/Release.xcconfig b/example/flutter/ios/Flutter/Release.xcconfig similarity index 100% rename from examples/flutter/ios/Flutter/Release.xcconfig rename to example/flutter/ios/Flutter/Release.xcconfig diff --git a/example/flutter/ios/Podfile b/example/flutter/ios/Podfile new file mode 100644 index 00000000..674a3812 --- /dev/null +++ b/example/flutter/ios/Podfile @@ -0,0 +1,38 @@ +# Uncomment this line to define a global platform for your project +platform :ios, '9.3' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/flutter/ios/Runner.xcodeproj/project.pbxproj b/example/flutter/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e26d7027 --- /dev/null +++ b/example/flutter/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,532 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 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 */; }; + BAFA21F5AC46E3CB2D9F4765 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CF7607A0543D80FFE45BCB0E /* libPods-Runner.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 852B934E5A6988F0B6A42AD6 /* 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 = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + CF7607A0543D80FFE45BCB0E /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + D61A181CFBF0FE5A906D91AB /* 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 = ""; }; + FC92024C0B5D6D9CEE85EF8E /* 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 = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BAFA21F5AC46E3CB2D9F4765 /* libPods-Runner.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3BC3667AD0BB2353683AE5B5 /* Pods */ = { + isa = PBXGroup; + children = ( + FC92024C0B5D6D9CEE85EF8E /* Pods-Runner.debug.xcconfig */, + D61A181CFBF0FE5A906D91AB /* Pods-Runner.release.xcconfig */, + 852B934E5A6988F0B6A42AD6 /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 47D3455078C5A6053939A1FB /* Frameworks */ = { + isa = PBXGroup; + children = ( + CF7607A0543D80FFE45BCB0E /* libPods-Runner.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 3BC3667AD0BB2353683AE5B5 /* Pods */, + 47D3455078C5A6053939A1FB /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 97C146F21CF9000F007C117D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 6DCCA982512329615ABB8394 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 6DCCA982512329615ABB8394 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + 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; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + 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"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, + 97C146F31CF9000F007C117D /* main.m in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 372ZUL2ZB7; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.examples.flutter; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 372ZUL2ZB7; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.examples.flutter; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 372ZUL2ZB7; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.examples.flutter; + PRODUCT_NAME = "$(TARGET_NAME)"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/examples/flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to example/flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/examples/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from examples/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/examples/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from examples/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to example/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/examples/flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from examples/flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to example/flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/examples/flutter/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/flutter/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/flutter/ios/Runner.xcworkspace/contents.xcworkspacedata rename to example/flutter/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/examples/flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from examples/flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/examples/flutter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/flutter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from examples/flutter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to example/flutter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/examples/flutter/ios/Runner/AppDelegate.h b/example/flutter/ios/Runner/AppDelegate.h similarity index 100% rename from examples/flutter/ios/Runner/AppDelegate.h rename to example/flutter/ios/Runner/AppDelegate.h diff --git a/examples/flutter/ios/Runner/AppDelegate.m b/example/flutter/ios/Runner/AppDelegate.m similarity index 100% rename from examples/flutter/ios/Runner/AppDelegate.m rename to example/flutter/ios/Runner/AppDelegate.m diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to example/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from examples/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to example/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/examples/flutter/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/flutter/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from examples/flutter/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to example/flutter/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/examples/flutter/ios/Runner/Base.lproj/Main.storyboard b/example/flutter/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from examples/flutter/ios/Runner/Base.lproj/Main.storyboard rename to example/flutter/ios/Runner/Base.lproj/Main.storyboard diff --git a/example/flutter/ios/Runner/Info.plist b/example/flutter/ios/Runner/Info.plist new file mode 100644 index 00000000..f008db9e --- /dev/null +++ b/example/flutter/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Bugsnag Flutter + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + bugsnag_flutter_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + + diff --git a/examples/flutter/ios/Runner/main.m b/example/flutter/ios/Runner/main.m similarity index 100% rename from examples/flutter/ios/Runner/main.m rename to example/flutter/ios/Runner/main.m diff --git a/example/flutter/lib/main.dart b/example/flutter/lib/main.dart new file mode 100644 index 00000000..4e811db3 --- /dev/null +++ b/example/flutter/lib/main.dart @@ -0,0 +1,186 @@ +import 'dart:async'; + +import 'package:bugsnag_breadcrumbs_dart_io/bugsnag_breadcrumbs_dart_io.dart'; +import 'package:bugsnag_breadcrumbs_http/bugsnag_breadcrumbs_http.dart' as http; +import 'package:bugsnag_example/native_crashes.dart'; +import 'package:bugsnag_flutter/bugsnag_flutter.dart'; +import 'package:flutter/material.dart'; + +enum TestEnum { + value1, + value2, + value3, +} + +void main() async => bugsnag.start( + // Wrap your application start to capture unhandled errors + runApp: () => runApp(const ExampleApp()), + // Find your API key in the settings menu of your Bugsnag dashboard + apiKey: 'b28932bd31a0601f963fcbf7c4d718d2', + // Specify in-project packages if you have multiple or are splitting debug info in your build (--split-debug-info) + projectPackages: const BugsnagProjectPackages.only({'bugsnag_example'}), + // onError callbacks can be used to modify or reject certain events + onError: [ + (event) { + if (event.unhandled) { + // Metadata can be added on a per-event basis + event.addMetadata('info', const {'hint': 'Example'}); + } + // Return `true` to allow or `false` to prevent sending the event. + return true; + } + ], + ); + +class ExampleApp extends StatelessWidget { + const ExampleApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return MaterialApp( + navigatorObservers: [BugsnagNavigatorObserver()], + initialRoute: '/', + routes: { + '/': (context) => const ExampleHomeScreen(), + '/native-crashes': (context) => const NativeCrashesScreen(), + }, + ); + } +} + +class ExampleHomeScreen extends StatelessWidget { + const ExampleHomeScreen({Key? key}) : super(key: key); + + // Unhandled exceptions will automatically be detected and reported. + // They are displayed with an 'Error' severity on the dashboard. + void _unhandledFlutterError() { + throw Exception('Unhandled Exception'); + } + + // Exceptions thrown asynchronously are also automatically reported. + void _asyncUnhandledFlutterError() async { + await Future.delayed(const Duration(milliseconds: 1)); + throw Exception('Async Exception on Timer'); + } + + // Handled exceptions can be manually reported to Bugsnag using notify(). + // These will have a 'Warning' severity on the dashboard. + void _handledException() async { + try { + throw Exception('handled exception'); + } catch (e, stack) { + await bugsnag.notify(e, stack); + } + } + + // Use leaveBreadcrumb() to log potentially useful events in order to + // understand what happened in your app before each error. + void _leaveBreadcrumb() async => bugsnag.leaveBreadcrumb( + 'message', + metadata: {'enum': TestEnum.value1.toString()}, + type: BugsnagBreadcrumbType.request, + ); + + // bugsnag.leaveBreadcrumb('This is a custom breadcrumb', + // Additional data can be attached to breadcrumbs as metadata + // metadata: {'from': 'a', 'to': 'z'}); + + // Use the bugsnag_flutter_http package to automatically capture breadcrumbs + // for network requests: + // import 'package:bugsnag_flutter_http/bugsnag_flutter_http.dart' as http; + void _networkSuccess() async => http.get(Uri.parse('https://example.com')); + + void _networkFailure() async => + http.post(Uri.parse('https://example.com/invalid')); + + void _networkError() async => + http.get(Uri.parse('https://example.invalid')).ignore(); + + void _networkHttpClient() async { + var client = BugsnagHttpClient(); + try { + final request = await client.getUrl(Uri.parse('https://example.com')); + await request.close(); + } finally { + client.close(); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Bugsnag example app'), + ), + body: Center( + child: ListView( + padding: const EdgeInsets.symmetric(horizontal: 16), + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 16), + child: Text( + 'Unhandled Errors', + style: Theme.of(context).textTheme.headline6, + ), + ), + ElevatedButton( + onPressed: _unhandledFlutterError, + child: const Text('Unhandled Error'), + ), + ElevatedButton( + onPressed: _asyncUnhandledFlutterError, + child: const Text('Async Unhandled Error'), + ), + ElevatedButton( + onPressed: _handledException, + child: const Text('Notify Handled Error'), + ), + ElevatedButton( + child: const Text('Native Errors'), + onPressed: () { + Navigator.pushNamed(context, '/native-crashes'); + }, + style: ElevatedButton.styleFrom( + primary: Colors.redAccent.shade200, + ), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 16), + child: Text( + 'Breadcrumbs', + style: Theme.of(context).textTheme.headline6, + ), + ), + ElevatedButton( + onPressed: _leaveBreadcrumb, + child: const Text('Leave a breadcrumb'), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 16), + child: Text( + 'Network Breadcrumbs', + style: Theme.of(context).textTheme.headline6, + ), + ), + ElevatedButton( + onPressed: _networkSuccess, + child: const Text('Success'), + ), + ElevatedButton( + onPressed: _networkFailure, + child: const Text('Failure'), + ), + ElevatedButton( + onPressed: _networkError, + child: const Text('Error'), + ), + ElevatedButton( + onPressed: _networkHttpClient, + child: const Text('HttpClient'), + ), + ], + ), + ), + ); + } +} diff --git a/examples/flutter/lib/native_crashes.dart b/example/flutter/lib/native_crashes.dart similarity index 100% rename from examples/flutter/lib/native_crashes.dart rename to example/flutter/lib/native_crashes.dart diff --git a/example/flutter/pubspec.yaml b/example/flutter/pubspec.yaml new file mode 100644 index 00000000..825d2ad0 --- /dev/null +++ b/example/flutter/pubspec.yaml @@ -0,0 +1,93 @@ +name: bugsnag_example +version: 1.0.0 +description: Demonstrates how to use the bugsnag_flutter package. + +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +environment: + sdk: ">=2.12.0 <3.0.0" + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + bugsnag_flutter: + # When depending on this package from a real application you should use: + # flutter: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../../packages/bugsnag_flutter + + bugsnag_breadcrumbs_dart_io: + path: ../../packages/bugsnag_breadcrumbs_dart_io + + bugsnag_breadcrumbs_http: + path: ../../packages/bugsnag_breadcrumbs_http + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + + http: ^0.13.4 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^1.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/examples/native/README.md b/example/native/README.md similarity index 100% rename from examples/native/README.md rename to example/native/README.md diff --git a/examples/native/android/.gitignore b/example/native/android/.gitignore similarity index 100% rename from examples/native/android/.gitignore rename to example/native/android/.gitignore diff --git a/examples/native/android/README.md b/example/native/android/README.md similarity index 100% rename from examples/native/android/README.md rename to example/native/android/README.md diff --git a/examples/native/android/app/.gitignore b/example/native/android/app/.gitignore similarity index 100% rename from examples/native/android/app/.gitignore rename to example/native/android/app/.gitignore diff --git a/examples/native/android/app/build.gradle b/example/native/android/app/build.gradle similarity index 100% rename from examples/native/android/app/build.gradle rename to example/native/android/app/build.gradle diff --git a/examples/native/android/app/proguard-rules.pro b/example/native/android/app/proguard-rules.pro similarity index 100% rename from examples/native/android/app/proguard-rules.pro rename to example/native/android/app/proguard-rules.pro diff --git a/examples/native/android/app/src/main/AndroidManifest.xml b/example/native/android/app/src/main/AndroidManifest.xml similarity index 100% rename from examples/native/android/app/src/main/AndroidManifest.xml rename to example/native/android/app/src/main/AndroidManifest.xml diff --git a/examples/native/android/app/src/main/java/com/example/bugsnag/flutter/android/ExampleApp.kt b/example/native/android/app/src/main/java/com/example/bugsnag/flutter/android/ExampleApp.kt similarity index 100% rename from examples/native/android/app/src/main/java/com/example/bugsnag/flutter/android/ExampleApp.kt rename to example/native/android/app/src/main/java/com/example/bugsnag/flutter/android/ExampleApp.kt diff --git a/examples/native/android/app/src/main/java/com/example/bugsnag/flutter/android/MainActivity.kt b/example/native/android/app/src/main/java/com/example/bugsnag/flutter/android/MainActivity.kt similarity index 100% rename from examples/native/android/app/src/main/java/com/example/bugsnag/flutter/android/MainActivity.kt rename to example/native/android/app/src/main/java/com/example/bugsnag/flutter/android/MainActivity.kt diff --git a/examples/native/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/example/native/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from examples/native/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml rename to example/native/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml diff --git a/examples/native/android/app/src/main/res/drawable/ic_launcher_background.xml b/example/native/android/app/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from examples/native/android/app/src/main/res/drawable/ic_launcher_background.xml rename to example/native/android/app/src/main/res/drawable/ic_launcher_background.xml diff --git a/examples/native/android/app/src/main/res/layout/activity_main.xml b/example/native/android/app/src/main/res/layout/activity_main.xml similarity index 100% rename from examples/native/android/app/src/main/res/layout/activity_main.xml rename to example/native/android/app/src/main/res/layout/activity_main.xml diff --git a/examples/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/example/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to example/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/examples/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/example/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to example/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/examples/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/example/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp rename to example/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp diff --git a/examples/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/example/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp rename to example/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp diff --git a/examples/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/example/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp rename to example/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp diff --git a/examples/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/example/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp rename to example/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp diff --git a/examples/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/example/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp rename to example/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp diff --git a/examples/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/example/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp rename to example/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp diff --git a/examples/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/example/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp rename to example/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/examples/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/example/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp rename to example/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp diff --git a/examples/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/example/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp rename to example/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/examples/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/example/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp similarity index 100% rename from examples/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp rename to example/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp diff --git a/examples/native/android/app/src/main/res/values-night/themes.xml b/example/native/android/app/src/main/res/values-night/themes.xml similarity index 100% rename from examples/native/android/app/src/main/res/values-night/themes.xml rename to example/native/android/app/src/main/res/values-night/themes.xml diff --git a/examples/native/android/app/src/main/res/values/colors.xml b/example/native/android/app/src/main/res/values/colors.xml similarity index 100% rename from examples/native/android/app/src/main/res/values/colors.xml rename to example/native/android/app/src/main/res/values/colors.xml diff --git a/examples/native/android/app/src/main/res/values/strings.xml b/example/native/android/app/src/main/res/values/strings.xml similarity index 100% rename from examples/native/android/app/src/main/res/values/strings.xml rename to example/native/android/app/src/main/res/values/strings.xml diff --git a/examples/native/android/app/src/main/res/values/themes.xml b/example/native/android/app/src/main/res/values/themes.xml similarity index 100% rename from examples/native/android/app/src/main/res/values/themes.xml rename to example/native/android/app/src/main/res/values/themes.xml diff --git a/examples/native/android/build.gradle b/example/native/android/build.gradle similarity index 100% rename from examples/native/android/build.gradle rename to example/native/android/build.gradle diff --git a/examples/native/android/gradle.properties b/example/native/android/gradle.properties similarity index 100% rename from examples/native/android/gradle.properties rename to example/native/android/gradle.properties diff --git a/examples/native/android/gradle/wrapper/gradle-wrapper.jar b/example/native/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from examples/native/android/gradle/wrapper/gradle-wrapper.jar rename to example/native/android/gradle/wrapper/gradle-wrapper.jar diff --git a/examples/native/android/gradle/wrapper/gradle-wrapper.properties b/example/native/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from examples/native/android/gradle/wrapper/gradle-wrapper.properties rename to example/native/android/gradle/wrapper/gradle-wrapper.properties diff --git a/examples/native/android/gradlew b/example/native/android/gradlew similarity index 100% rename from examples/native/android/gradlew rename to example/native/android/gradlew diff --git a/examples/native/android/gradlew.bat b/example/native/android/gradlew.bat similarity index 100% rename from examples/native/android/gradlew.bat rename to example/native/android/gradlew.bat diff --git a/examples/native/android/settings.gradle b/example/native/android/settings.gradle similarity index 100% rename from examples/native/android/settings.gradle rename to example/native/android/settings.gradle diff --git a/examples/native/example_flutter/.gitignore b/example/native/example_flutter/.gitignore similarity index 100% rename from examples/native/example_flutter/.gitignore rename to example/native/example_flutter/.gitignore diff --git a/examples/native/example_flutter/.metadata b/example/native/example_flutter/.metadata similarity index 100% rename from examples/native/example_flutter/.metadata rename to example/native/example_flutter/.metadata diff --git a/examples/native/example_flutter/analysis_options.yaml b/example/native/example_flutter/analysis_options.yaml similarity index 100% rename from examples/native/example_flutter/analysis_options.yaml rename to example/native/example_flutter/analysis_options.yaml diff --git a/example/native/example_flutter/lib/main.dart b/example/native/example_flutter/lib/main.dart new file mode 100644 index 00000000..f3e81d08 --- /dev/null +++ b/example/native/example_flutter/lib/main.dart @@ -0,0 +1,148 @@ +import 'dart:async'; + +import 'package:bugsnag_flutter/bugsnag_flutter.dart'; +import 'package:flutter/material.dart'; + +void main() async => bugsnag.attach(runApp: () => runApp(const MyApp())); + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) => MaterialApp( + title: 'Bugsnag Flutter Example', + initialRoute: '/', + navigatorObservers: [BugsnagNavigatorObserver()], + routes: { + '/': (context) => const ExampleHomeScreen(), + '/login': (context) => LoginScreen(), + }, + ); +} + +class ExampleHomeScreen extends StatelessWidget { + const ExampleHomeScreen({Key? key}) : super(key: key); + + // Unhandled exceptions will automatically be detected and reported. + // They are displayed with an 'Error' severity on the dashboard. + void _unhandledFlutterError() { + throw Exception('Unhandled Exception'); + } + + // Exceptions thrown asynchronously are also automatically reported. + void _asyncUnhandledFlutterError() async { + await Future.delayed(const Duration(milliseconds: 1)); + throw Exception('Async Exception on Timer'); + } + + // Handled exceptions can be manually reported to Bugsnag using notify(). + // These will have a 'Warning' severity on the dashboard. + void _handledException() async { + try { + throw Exception('handled exception'); + } catch (e, stack) { + await bugsnag.notify(e, stack); + } + } + + // Use leaveBreadcrumb() to log potentially useful events in order to + // understand what happened in your app before each error. + void _leaveBreadcrumb() async => + bugsnag.leaveBreadcrumb('This is a custom breadcrumb from Flutter', + // Additional data can be attached to breadcrumbs as metadata + metadata: {'from': 'a', 'to': 'z'}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Bugsnag Flutter Module'), + ), + body: Center( + child: ListView( + padding: const EdgeInsets.symmetric(horizontal: 16), + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 16), + child: Text( + 'Unhandled Errors', + style: Theme.of(context).textTheme.headline6, + ), + ), + ElevatedButton( + onPressed: _unhandledFlutterError, + child: const Text('Unhandled Error'), + ), + ElevatedButton( + onPressed: _asyncUnhandledFlutterError, + child: const Text('Async Unhandled Error'), + ), + ElevatedButton( + onPressed: _handledException, + child: const Text('Notify Handled Error'), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 16), + child: Text( + 'Breadcrumbs', + style: Theme.of(context).textTheme.headline6, + ), + ), + ElevatedButton( + onPressed: _leaveBreadcrumb, + child: const Text('Leave a breadcrumb'), + ), + ElevatedButton( + onPressed: () async { + final email = await Navigator.of(context).pushNamed('/login'); + ScaffoldMessenger.of(context).showSnackBar(SnackBar( + content: Text('User logged in as $email'), + )); + }, + child: const Text('Login (bugsnag.setUser)'), + ), + ], + ), + ), + ); + } +} + +class LoginScreen extends StatelessWidget { + final TextEditingController _email = TextEditingController(); + + LoginScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Login'), + ), + body: Center( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + children: [ + TextField( + controller: _email, + decoration: const InputDecoration( + labelText: 'Email Address', + ), + ), + ElevatedButton( + onPressed: () async { + bugsnag.setUser(email: _email.value.text); + bugsnag.leaveBreadcrumb('User has logged in'); + + Navigator.of(context).pop(_email.value.text); + }, + child: const Text('Login'), + ), + ], + ), + ), + ), + ); + } +} diff --git a/example/native/example_flutter/pubspec.yaml b/example/native/example_flutter/pubspec.yaml new file mode 100644 index 00000000..30fdda30 --- /dev/null +++ b/example/native/example_flutter/pubspec.yaml @@ -0,0 +1,95 @@ +name: example_flutter +description: A new flutter module project. + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# +# This version is used _only_ for the Runner app, which is used if you just do +# a `flutter run` or a `flutter make-host-app-editable`. It has no impact +# on any other native host app that you embed your Flutter project into. +version: 1.0.0+1 + +environment: + sdk: ">=2.16.1 <3.0.0" + +dependencies: + flutter: + sdk: flutter + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + + bugsnag_flutter: + # When depending on this package from a real application you should use: + # flutter: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../../../packages/bugsnag_flutter + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^1.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +flutter: + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add Flutter specific assets to your application, add an assets section, + # like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add Flutter specific custom fonts to your application, add a fonts + # section here, in this "flutter" section. Each entry in this list should + # have a "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages + + + # This section identifies your Flutter project as a module meant for + # embedding in a native host app. These identifiers should _not_ ordinarily + # be changed after generation - they are used to ensure that the tooling can + # maintain consistency when adding or modifying assets and plugins. + # They also do not have any bearing on your native host application's + # identifiers, which may be completely independent or the same as these. + module: + androidX: true + androidPackage: com.bugsnag.example_flutter + iosBundleIdentifier: com.bugsnag.exampleFlutter diff --git a/examples/native/ios/.gitignore b/example/native/ios/.gitignore similarity index 100% rename from examples/native/ios/.gitignore rename to example/native/ios/.gitignore diff --git a/example/native/ios/BugsnagFlutter.xcodeproj/project.pbxproj b/example/native/ios/BugsnagFlutter.xcodeproj/project.pbxproj new file mode 100644 index 00000000..41d4c38b --- /dev/null +++ b/example/native/ios/BugsnagFlutter.xcodeproj/project.pbxproj @@ -0,0 +1,432 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 53; + objects = { + +/* Begin PBXBuildFile section */ + 010BAB872833F1160003FF36 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 010BAB862833F1160003FF36 /* AppDelegate.swift */; }; + 010BAB8B2833F1160003FF36 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 010BAB8A2833F1160003FF36 /* ViewController.swift */; }; + 010BAB8E2833F1160003FF36 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 010BAB8C2833F1160003FF36 /* Main.storyboard */; }; + 010BAB902833F1180003FF36 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 010BAB8F2833F1180003FF36 /* Assets.xcassets */; }; + 010BAB932833F1180003FF36 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 010BAB912833F1180003FF36 /* LaunchScreen.storyboard */; }; + 348E0FB3C2ECCC2B76E71D02 /* Pods_BugsnagFlutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF8DC1F683D46322D385A2C3 /* Pods_BugsnagFlutter.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 010BAB832833F1160003FF36 /* BugsnagFlutter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BugsnagFlutter.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 010BAB862833F1160003FF36 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 010BAB8A2833F1160003FF36 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 010BAB8D2833F1160003FF36 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 010BAB8F2833F1180003FF36 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 010BAB922833F1180003FF36 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 010BAB942833F1180003FF36 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; usesTabs = 1; }; + 3B0399F2915D916877E81B2C /* Pods-BugsnagFlutter.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BugsnagFlutter.debug.xcconfig"; path = "Target Support Files/Pods-BugsnagFlutter/Pods-BugsnagFlutter.debug.xcconfig"; sourceTree = ""; }; + 488944D7BBF1C05E30A86D11 /* Pods-BugsnagFlutter.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BugsnagFlutter.release.xcconfig"; path = "Target Support Files/Pods-BugsnagFlutter/Pods-BugsnagFlutter.release.xcconfig"; sourceTree = ""; }; + FF8DC1F683D46322D385A2C3 /* Pods_BugsnagFlutter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BugsnagFlutter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 010BAB802833F1160003FF36 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 348E0FB3C2ECCC2B76E71D02 /* Pods_BugsnagFlutter.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 010BAB7A2833F1160003FF36 = { + isa = PBXGroup; + children = ( + 010BAB852833F1160003FF36 /* BugsnagFlutter */, + 010BAB842833F1160003FF36 /* Products */, + 14C3452EBFA571DE8B7F666E /* Pods */, + 5754597D2C288F6FDD9B8613 /* Frameworks */, + ); + sourceTree = ""; + }; + 010BAB842833F1160003FF36 /* Products */ = { + isa = PBXGroup; + children = ( + 010BAB832833F1160003FF36 /* BugsnagFlutter.app */, + ); + name = Products; + sourceTree = ""; + }; + 010BAB852833F1160003FF36 /* BugsnagFlutter */ = { + isa = PBXGroup; + children = ( + 010BAB862833F1160003FF36 /* AppDelegate.swift */, + 010BAB8A2833F1160003FF36 /* ViewController.swift */, + 010BAB8C2833F1160003FF36 /* Main.storyboard */, + 010BAB8F2833F1180003FF36 /* Assets.xcassets */, + 010BAB912833F1180003FF36 /* LaunchScreen.storyboard */, + 010BAB942833F1180003FF36 /* Info.plist */, + ); + path = BugsnagFlutter; + sourceTree = ""; + }; + 14C3452EBFA571DE8B7F666E /* Pods */ = { + isa = PBXGroup; + children = ( + 3B0399F2915D916877E81B2C /* Pods-BugsnagFlutter.debug.xcconfig */, + 488944D7BBF1C05E30A86D11 /* Pods-BugsnagFlutter.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 5754597D2C288F6FDD9B8613 /* Frameworks */ = { + isa = PBXGroup; + children = ( + FF8DC1F683D46322D385A2C3 /* Pods_BugsnagFlutter.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 010BAB822833F1160003FF36 /* BugsnagFlutter */ = { + isa = PBXNativeTarget; + buildConfigurationList = 010BAB972833F1180003FF36 /* Build configuration list for PBXNativeTarget "BugsnagFlutter" */; + buildPhases = ( + FB612272889FD5A6EC0D3A81 /* [CP] Check Pods Manifest.lock */, + 4B6EFDDDC5A18D2213239548 /* [CP-User] Run Flutter Build example_flutter Script */, + 010BAB7F2833F1160003FF36 /* Sources */, + 010BAB802833F1160003FF36 /* Frameworks */, + 010BAB812833F1160003FF36 /* Resources */, + E89B3AC476390C585D0BE274 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = BugsnagFlutter; + productName = BugsnagFlutter; + productReference = 010BAB832833F1160003FF36 /* BugsnagFlutter.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 010BAB7B2833F1160003FF36 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1340; + LastUpgradeCheck = 1340; + TargetAttributes = { + 010BAB822833F1160003FF36 = { + CreatedOnToolsVersion = 13.4; + LastSwiftMigration = 1400; + }; + }; + }; + buildConfigurationList = 010BAB7E2833F1160003FF36 /* Build configuration list for PBXProject "BugsnagFlutter" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 010BAB7A2833F1160003FF36; + productRefGroup = 010BAB842833F1160003FF36 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 010BAB822833F1160003FF36 /* BugsnagFlutter */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 010BAB812833F1160003FF36 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 010BAB932833F1180003FF36 /* LaunchScreen.storyboard in Resources */, + 010BAB902833F1180003FF36 /* Assets.xcassets in Resources */, + 010BAB8E2833F1160003FF36 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4B6EFDDDC5A18D2213239548 /* [CP-User] Run Flutter Build example_flutter Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + name = "[CP-User] Run Flutter Build example_flutter Script"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../example_flutter/.ios/Flutter/flutter_export_environment.sh\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build"; + }; + E89B3AC476390C585D0BE274 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-BugsnagFlutter/Pods-BugsnagFlutter-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-BugsnagFlutter/Pods-BugsnagFlutter-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BugsnagFlutter/Pods-BugsnagFlutter-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + FB612272889FD5A6EC0D3A81 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-BugsnagFlutter-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; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 010BAB7F2833F1160003FF36 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 010BAB8B2833F1160003FF36 /* ViewController.swift in Sources */, + 010BAB872833F1160003FF36 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 010BAB8C2833F1160003FF36 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 010BAB8D2833F1160003FF36 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 010BAB912833F1180003FF36 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 010BAB922833F1180003FF36 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 010BAB952833F1180003FF36 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 010BAB962833F1180003FF36 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 010BAB982833F1180003FF36 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3B0399F2915D916877E81B2C /* Pods-BugsnagFlutter.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 372ZUL2ZB7; + INFOPLIST_FILE = BugsnagFlutter/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.BugsnagFlutter; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 010BAB992833F1180003FF36 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 488944D7BBF1C05E30A86D11 /* Pods-BugsnagFlutter.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 372ZUL2ZB7; + INFOPLIST_FILE = BugsnagFlutter/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.BugsnagFlutter; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 010BAB7E2833F1160003FF36 /* Build configuration list for PBXProject "BugsnagFlutter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 010BAB952833F1180003FF36 /* Debug */, + 010BAB962833F1180003FF36 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 010BAB972833F1180003FF36 /* Build configuration list for PBXNativeTarget "BugsnagFlutter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 010BAB982833F1180003FF36 /* Debug */, + 010BAB992833F1180003FF36 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 010BAB7B2833F1160003FF36 /* Project object */; +} diff --git a/examples/native/ios/BugsnagFlutter.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/native/ios/BugsnagFlutter.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/native/ios/BugsnagFlutter.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to example/native/ios/BugsnagFlutter.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/examples/native/ios/BugsnagFlutter.xcworkspace/contents.xcworkspacedata b/example/native/ios/BugsnagFlutter.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/native/ios/BugsnagFlutter.xcworkspace/contents.xcworkspacedata rename to example/native/ios/BugsnagFlutter.xcworkspace/contents.xcworkspacedata diff --git a/examples/native/ios/BugsnagFlutter/AppDelegate.swift b/example/native/ios/BugsnagFlutter/AppDelegate.swift similarity index 100% rename from examples/native/ios/BugsnagFlutter/AppDelegate.swift rename to example/native/ios/BugsnagFlutter/AppDelegate.swift diff --git a/examples/native/ios/BugsnagFlutter/Assets.xcassets/AccentColor.colorset/Contents.json b/example/native/ios/BugsnagFlutter/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from examples/native/ios/BugsnagFlutter/Assets.xcassets/AccentColor.colorset/Contents.json rename to example/native/ios/BugsnagFlutter/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/examples/native/ios/BugsnagFlutter/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/native/ios/BugsnagFlutter/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/native/ios/BugsnagFlutter/Assets.xcassets/AppIcon.appiconset/Contents.json rename to example/native/ios/BugsnagFlutter/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/native/ios/BugsnagFlutter/Assets.xcassets/Contents.json b/example/native/ios/BugsnagFlutter/Assets.xcassets/Contents.json similarity index 100% rename from examples/native/ios/BugsnagFlutter/Assets.xcassets/Contents.json rename to example/native/ios/BugsnagFlutter/Assets.xcassets/Contents.json diff --git a/examples/native/ios/BugsnagFlutter/Base.lproj/LaunchScreen.storyboard b/example/native/ios/BugsnagFlutter/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from examples/native/ios/BugsnagFlutter/Base.lproj/LaunchScreen.storyboard rename to example/native/ios/BugsnagFlutter/Base.lproj/LaunchScreen.storyboard diff --git a/examples/native/ios/BugsnagFlutter/Base.lproj/Main.storyboard b/example/native/ios/BugsnagFlutter/Base.lproj/Main.storyboard similarity index 100% rename from examples/native/ios/BugsnagFlutter/Base.lproj/Main.storyboard rename to example/native/ios/BugsnagFlutter/Base.lproj/Main.storyboard diff --git a/example/native/ios/BugsnagFlutter/Info.plist b/example/native/ios/BugsnagFlutter/Info.plist new file mode 100644 index 00000000..4e385492 --- /dev/null +++ b/example/native/ios/BugsnagFlutter/Info.plist @@ -0,0 +1,50 @@ + + + + + bugsnag + + apiKey + YOUR-API-KEY + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/native/ios/BugsnagFlutter/ViewController.swift b/example/native/ios/BugsnagFlutter/ViewController.swift similarity index 100% rename from examples/native/ios/BugsnagFlutter/ViewController.swift rename to example/native/ios/BugsnagFlutter/ViewController.swift diff --git a/example/native/ios/Podfile b/example/native/ios/Podfile new file mode 100644 index 00000000..41bee485 --- /dev/null +++ b/example/native/ios/Podfile @@ -0,0 +1,16 @@ +# Uncomment the next line to define a global platform for your project +platform :ios, '9.0' + +flutter_application_path = '../example_flutter' +load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb') + +target 'BugsnagFlutter' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + install_all_flutter_pods(flutter_application_path) +end + +post_install do |installer| + flutter_post_install(installer) if defined?(flutter_post_install) +end diff --git a/examples/native/ios/README.md b/example/native/ios/README.md similarity index 100% rename from examples/native/ios/README.md rename to example/native/ios/README.md