diff --git a/Brewfile b/Brewfile index e60cf70..544084d 100644 --- a/Brewfile +++ b/Brewfile @@ -1,5 +1,3 @@ brew 'gh' -brew 'rbenv' -brew 'ruby-build' tap 'getsentry/tools' brew 'getsentry/tools/sentry-cli' diff --git a/EmpowerPlant.xcodeproj/project.pbxproj b/EmpowerPlant.xcodeproj/project.pbxproj index fbe5c99..1b96a20 100644 --- a/EmpowerPlant.xcodeproj/project.pbxproj +++ b/EmpowerPlant.xcodeproj/project.pbxproj @@ -7,10 +7,11 @@ objects = { /* Begin PBXBuildFile section */ - 674899180B469D888700A555 /* Pods_EmpowerPlant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 74014747DE857D26E9BD7B24 /* Pods_EmpowerPlant.framework */; }; - 846BEA1C2ABE611A0032F77F /* mobydick.txt in Resources */ = {isa = PBXBuildFile; fileRef = 846BEA1B2ABE611A0032F77F /* mobydick.txt */; }; - 843BD6272AD7798C00B0098F /* jwt-deep-field.png in Resources */ = {isa = PBXBuildFile; fileRef = 843BD6262AD7798C00B0098F /* jwt-deep-field.png */; }; 843BD60F2AD08CE900B0098F /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 843BD60E2AD08CE900B0098F /* Utils.swift */; }; + 843BD6272AD7798C00B0098F /* jwt-deep-field.png in Resources */ = {isa = PBXBuildFile; fileRef = 843BD6262AD7798C00B0098F /* jwt-deep-field.png */; }; + 846BEA1C2ABE611A0032F77F /* mobydick.txt in Resources */ = {isa = PBXBuildFile; fileRef = 846BEA1B2ABE611A0032F77F /* mobydick.txt */; }; + 848716A32AD8C3CD00756467 /* BigInt in Frameworks */ = {isa = PBXBuildFile; productRef = 848716A22AD8C3CD00756467 /* BigInt */; }; + 848716B72ADFAA2000756467 /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 848716B62ADFAA2000756467 /* Sentry */; }; 8B21663C29D3F8C80009C890 /* RandomErrors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B21663B29D3F8C80009C890 /* RandomErrors.swift */; }; 8BA3AB382A20212C00BE1EA8 /* CartViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BA3AB372A20212C00BE1EA8 /* CartViewControllerTests.swift */; }; D15EDF12282BF7FB00FC13D6 /* Product+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = D15EDF11282BF7FB00FC13D6 /* Product+CoreDataProperties.swift */; }; @@ -38,24 +39,20 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 57BE79023D12DCDCB69BA73D /* Pods-EmpowerPlant.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EmpowerPlant.release.xcconfig"; path = "Target Support Files/Pods-EmpowerPlant/Pods-EmpowerPlant.release.xcconfig"; sourceTree = ""; }; - 74014747DE857D26E9BD7B24 /* Pods_EmpowerPlant.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EmpowerPlant.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 843BD60E2AD08CE900B0098F /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; 843BD6262AD7798C00B0098F /* jwt-deep-field.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "jwt-deep-field.png"; sourceTree = ""; }; 846BEA1A2ABE46880032F77F /* upload-symbols.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "upload-symbols.sh"; sourceTree = ""; }; - 8474F0482ACCE2D800F21E06 /* deploy_project.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = deploy_project.sh; sourceTree = ""; }; 846BEA1B2ABE611A0032F77F /* mobydick.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = mobydick.txt; sourceTree = ""; }; + 8474F0482ACCE2D800F21E06 /* deploy_project.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = deploy_project.sh; sourceTree = ""; }; 8474F04D2ACE54F300F21E06 /* .github */ = {isa = PBXFileReference; lastKnownFileType = folder; path = .github; sourceTree = ""; }; 84A264182AA9155800A62A88 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; 84A264192AA915B100A62A88 /* Brewfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Brewfile; sourceTree = ""; }; - 84A2641A2AA915B100A62A88 /* Gemfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Gemfile; sourceTree = ""; }; 84A2641B2AA915D800A62A88 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 84A2641C2AA9165A00A62A88 /* EmpowerPlant.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EmpowerPlant.app; sourceTree = BUILT_PRODUCTS_DIR; }; 84A2641D2AA9165A00A62A88 /* EmpowerPlantTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EmpowerPlantTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 84A2641E2AA926A300A62A88 /* .env */ = {isa = PBXFileReference; lastKnownFileType = text; path = .env; sourceTree = ""; }; 8B21663B29D3F8C80009C890 /* RandomErrors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RandomErrors.swift; sourceTree = ""; }; 8BA3AB372A20212C00BE1EA8 /* CartViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartViewControllerTests.swift; sourceTree = ""; }; - CC58FA1A8A084A40FC763820 /* Pods-EmpowerPlant.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EmpowerPlant.debug.xcconfig"; path = "Target Support Files/Pods-EmpowerPlant/Pods-EmpowerPlant.debug.xcconfig"; sourceTree = ""; }; D15EDF11282BF7FB00FC13D6 /* Product+CoreDataProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Product+CoreDataProperties.swift"; sourceTree = ""; }; D15EDF13282BF80400FC13D6 /* Product+CoreDataClass.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Product+CoreDataClass.swift"; sourceTree = ""; }; D15FCDA827E00F0D00258BF3 /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = ""; }; @@ -83,7 +80,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 674899180B469D888700A555 /* Pods_EmpowerPlant.framework in Frameworks */, + 848716A32AD8C3CD00756467 /* BigInt in Frameworks */, + 848716B72ADFAA2000756467 /* Sentry in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -98,14 +96,6 @@ path = EmpowerPlantTests; sourceTree = ""; }; - A2BF5384A6D041CDB3FCA8D9 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 74014747DE857D26E9BD7B24 /* Pods_EmpowerPlant.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; D17C73A627D8291D006650AF = { isa = PBXGroup; children = ( @@ -114,13 +104,10 @@ 84A2641E2AA926A300A62A88 /* .env */, 846BEA1A2ABE46880032F77F /* upload-symbols.sh */, 84A264192AA915B100A62A88 /* Brewfile */, - 84A2641A2AA915B100A62A88 /* Gemfile */, 84A264182AA9155800A62A88 /* Makefile */, 84A2641B2AA915D800A62A88 /* README.md */, D17C73B127D8291D006650AF /* EmpowerPlant */, 8BA3AB2D2A201FE900BE1EA8 /* EmpowerPlantTests */, - A2BF5384A6D041CDB3FCA8D9 /* Frameworks */, - DBBFE14A41453664EF0F8F57 /* Pods */, 84A2641C2AA9165A00A62A88 /* EmpowerPlant.app */, 84A2641D2AA9165A00A62A88 /* EmpowerPlantTests.xctest */, ); @@ -150,15 +137,6 @@ path = EmpowerPlant; sourceTree = ""; }; - DBBFE14A41453664EF0F8F57 /* Pods */ = { - isa = PBXGroup; - children = ( - CC58FA1A8A084A40FC763820 /* Pods-EmpowerPlant.debug.xcconfig */, - 57BE79023D12DCDCB69BA73D /* Pods-EmpowerPlant.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -184,11 +162,9 @@ isa = PBXNativeTarget; buildConfigurationList = D17C73C327D8291D006650AF /* Build configuration list for PBXNativeTarget "EmpowerPlant" */; buildPhases = ( - C23F49D22CAB6B4570AD18F4 /* [CP] Check Pods Manifest.lock */, D17C73AB27D8291D006650AF /* Sources */, D17C73AC27D8291D006650AF /* Frameworks */, D17C73AD27D8291D006650AF /* Resources */, - 64CD5DF2D474DFE9B615DAE0 /* [CP] Embed Pods Frameworks */, 21715E6128A2D59700248175 /* [Sentry] Upload debug symbols */, ); buildRules = ( @@ -196,6 +172,10 @@ dependencies = ( ); name = EmpowerPlant; + packageProductDependencies = ( + 848716A22AD8C3CD00756467 /* BigInt */, + 848716B62ADFAA2000756467 /* Sentry */, + ); productName = EmpowerPlant; productReference = 84A2641C2AA9165A00A62A88 /* EmpowerPlant.app */; productType = "com.apple.product-type.application"; @@ -227,6 +207,10 @@ Base, ); mainGroup = D17C73A627D8291D006650AF; + packageReferences = ( + 848716A12AD8C3CD00756467 /* XCRemoteSwiftPackageReference "BigInt" */, + 848716B52ADFAA2000756467 /* XCRemoteSwiftPackageReference "sentry-cocoa" */, + ); productRefGroup = D17C73A627D8291D006650AF; projectDirPath = ""; projectRoot = ""; @@ -280,45 +264,6 @@ shellPath = /bin/sh; shellScript = "./upload-symbols.sh\n"; }; - 64CD5DF2D474DFE9B615DAE0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-EmpowerPlant/Pods-EmpowerPlant-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-EmpowerPlant/Pods-EmpowerPlant-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-EmpowerPlant/Pods-EmpowerPlant-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - C23F49D22CAB6B4570AD18F4 /* [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-EmpowerPlant-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 */ @@ -537,7 +482,6 @@ }; D17C73C427D8291D006650AF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CC58FA1A8A084A40FC763820 /* Pods-EmpowerPlant.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -558,7 +502,6 @@ }; D17C73C527D8291D006650AF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 57BE79023D12DCDCB69BA73D /* Pods-EmpowerPlant.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -609,6 +552,38 @@ }; /* End XCConfigurationList section */ +/* Begin XCRemoteSwiftPackageReference section */ + 848716A12AD8C3CD00756467 /* XCRemoteSwiftPackageReference "BigInt" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/attaswift/BigInt"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.1.0; + }; + }; + 848716B52ADFAA2000756467 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/getsentry/sentry-cocoa"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 8.13.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 848716A22AD8C3CD00756467 /* BigInt */ = { + isa = XCSwiftPackageProductDependency; + package = 848716A12AD8C3CD00756467 /* XCRemoteSwiftPackageReference "BigInt" */; + productName = BigInt; + }; + 848716B62ADFAA2000756467 /* Sentry */ = { + isa = XCSwiftPackageProductDependency; + package = 848716B52ADFAA2000756467 /* XCRemoteSwiftPackageReference "sentry-cocoa" */; + productName = Sentry; + }; +/* End XCSwiftPackageProductDependency section */ + /* Begin XCVersionGroup section */ D15FCDA727E00F0D00258BF3 /* Model.xcdatamodeld */ = { isa = XCVersionGroup; diff --git a/EmpowerPlant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/EmpowerPlant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..b72026e --- /dev/null +++ b/EmpowerPlant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "bigint", + "kind" : "remoteSourceControl", + "location" : "https://github.com/attaswift/BigInt", + "state" : { + "revision" : "0ed110f7555c34ff468e72e1686e59721f2b0da6", + "version" : "5.3.0" + } + }, + { + "identity" : "sentry-cocoa", + "kind" : "remoteSourceControl", + "location" : "https://github.com/getsentry/sentry-cocoa", + "state" : { + "revision" : "008325304ada69fa32aa7aeba967b65984f30569", + "version" : "8.14.2" + } + } + ], + "version" : 2 +} diff --git a/EmpowerPlant.xcodeproj/xcshareddata/xcschemes/EmpowerPlant.xcscheme b/EmpowerPlant.xcodeproj/xcshareddata/xcschemes/EmpowerPlant.xcscheme index 30a919c..11b3cb5 100644 --- a/EmpowerPlant.xcodeproj/xcshareddata/xcschemes/EmpowerPlant.xcscheme +++ b/EmpowerPlant.xcodeproj/xcshareddata/xcschemes/EmpowerPlant.xcscheme @@ -72,6 +72,18 @@ argument = "--wipe-db" isEnabled = "NO"> + + + + + + - - - - - - - - diff --git a/EmpowerPlant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/EmpowerPlant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/EmpowerPlant.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/EmpowerPlant.xcworkspace/xcuserdata/wcap.xcuserdatad/UserInterfaceState.xcuserstate b/EmpowerPlant.xcworkspace/xcuserdata/wcap.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 7fcf790..0000000 Binary files a/EmpowerPlant.xcworkspace/xcuserdata/wcap.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/EmpowerPlant.xcworkspace/xcuserdata/wcap.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/EmpowerPlant.xcworkspace/xcuserdata/wcap.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index 4d3ddc4..0000000 --- a/EmpowerPlant.xcworkspace/xcuserdata/wcap.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - diff --git a/EmpowerPlant/AppDelegate.swift b/EmpowerPlant/AppDelegate.swift index 119ede7..2f83c9a 100644 --- a/EmpowerPlant/AppDelegate.swift +++ b/EmpowerPlant/AppDelegate.swift @@ -15,28 +15,35 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. + + // the Sentry default is to enable swizzling. we'll use that as our default as well. we check for the launch arg to disable swizzling; if it's provided, then we'll disable swizzling. if it's absent, then swizzling will be enabled. + let enableSwizzling = !ProcessInfo.processInfo.arguments.contains("--disable-swizzling") + SentrySDK.start { options in options.dsn = "https://c88045e430864a8e864af6233e7c18ea@o87286.ingest.sentry.io/6249899" + + // set the SDK debug mode according to defaults and overrides. #if DEBUG - options.debug = true + // in debug builds, we default to enabling debug mode. the launch arg --no-debug-mode-in-debug-build is a way to override that and turn it off, like if you don't want to see the logs in the xcode console. + options.debug = !ProcessInfo.processInfo.arguments.contains("--no-debug-mode-in-debug-build") + #else + // in release builds, we default to disabling debug mode. the launch arg --debug-mode-in-release-build is a way to override that and turn it on. + options.debug = ProcessInfo.processInfo.arguments.contains("--debug-mode-in-release-build") #endif - // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring. - // We recommend adjusting this value in production. options.tracesSampleRate = 1.0 options.profilesSampleRate = 1.0 - options.enableCoreDataTracing = true - options.enableFileIOTracing = true options.attachScreenshot = true options.attachViewHierarchy = true options.enableTimeToFullDisplayTracing = true - options.enableAutoPerformanceTracing = true - options.enableUserInteractionTracing = false + + options.enableSwizzling = enableSwizzling + } SentrySDK.configureScope{ scope in scope.setTag(value: ["corporate", "enterprise", "self-serve"].randomElement() ?? "unknown", key: "customer.type") scope.setTag(value: ProcessInfo.processInfo.environment["USER"] ?? "tda", key: "se") + scope.setTag(value: "\(enableSwizzling)", key: "enableSwizzling") } if ProcessInfo.processInfo.arguments.contains("--wipe-db") { diff --git a/EmpowerPlant/Base.lproj/Main.storyboard b/EmpowerPlant/Base.lproj/Main.storyboard index 542c90a..4c22f7b 100644 --- a/EmpowerPlant/Base.lproj/Main.storyboard +++ b/EmpowerPlant/Base.lproj/Main.storyboard @@ -69,10 +69,10 @@ - + - + + + + + + + + - +