diff --git a/.buildkite/pipeline.full.yml b/.buildkite/pipeline.full.yml index 7f5571300..5a8fed752 100644 --- a/.buildkite/pipeline.full.yml +++ b/.buildkite/pipeline.full.yml @@ -186,68 +186,6 @@ steps: - exit_status: -1 # Agent was lost limit: 2 - - label: ':bitbar: iOS 12 E2E tests batch 1' - depends_on: - - cocoa_fixture - timeout_in_minutes: 60 - agents: - queue: opensource - plugins: - artifacts#v1.9.0: - download: "features/fixtures/ios/output/ipa_url_bb.txt" - upload: "maze_output/failed/**/*" - docker-compose#v4.7.0: - pull: cocoa-maze-runner-bitbar - run: cocoa-maze-runner-bitbar - service-ports: true - command: - - "--app=@/app/build/ipa_url_bb.txt" - - "--farm=bb" - - "--device=IOS_12" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - # PLAT-11155: App hang scenarios run on BrowserStack - - "--exclude=features/app_hangs.feature" - - "--exclude=features/[e-z].*.feature$" - concurrency: 25 - concurrency_group: 'bitbar' - concurrency_method: eager - retry: - automatic: - - exit_status: -1 # Agent was lost - limit: 2 - - - label: ':bitbar: iOS 12 E2E tests batch 2' - depends_on: - - cocoa_fixture - timeout_in_minutes: 60 - agents: - queue: opensource - plugins: - artifacts#v1.9.0: - download: "features/fixtures/ios/output/ipa_url_bb.txt" - upload: "maze_output/failed/**/*" - docker-compose#v4.7.0: - pull: cocoa-maze-runner-bitbar - run: cocoa-maze-runner-bitbar - service-ports: true - command: - - "--app=@/app/build/ipa_url_bb.txt" - - "--farm=bb" - - "--device=IOS_12" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - - "--exclude=features/[a-d].*.feature$" - concurrency: 25 - concurrency_group: 'bitbar' - concurrency_method: eager - retry: - automatic: - - exit_status: -1 # Agent was lost - limit: 2 - # # BrowserStack # @@ -338,97 +276,6 @@ steps: - exit_status: -1 # Agent was lost limit: 2 - # PLAT-11155: App hang tests run on BrowserStack (Appium 1.x) for now - - label: ':browserstack: iOS 12 app hang tests' - depends_on: - - cocoa_fixture - timeout_in_minutes: 10 - agents: - queue: opensource - plugins: - artifacts#v1.5.0: - download: "features/fixtures/ios/output/ipa_url_bs.txt" - upload: "maze_output/failed/**/*" - docker-compose#v3.7.0: - pull: cocoa-maze-runner - run: cocoa-maze-runner - command: - - "--app=@build/ipa_url_bs.txt" - - "--farm=bs" - - "--device=IOS_12" - - "--appium-version=1.21.0" - - "--fail-fast" - - "features/app_hangs.feature" - concurrency: 5 - concurrency_group: 'browserstack-app' - concurrency_method: eager - retry: - automatic: - - exit_status: -1 # Agent was lost - limit: 2 - - - label: ':browserstack: iOS 11 E2E tests batch 1' - skip: "https://smartbear.atlassian.net/browse/PLAT-11154" - depends_on: - - cocoa_fixture - # More time than other steps as the BrowserStack iOS 11 devices seem particularly unstable and - # sessions need resetting frequently, taking a minute or more each time. - timeout_in_minutes: 60 - agents: - queue: opensource - plugins: - artifacts#v1.5.0: - download: "features/fixtures/ios/output/ipa_url_bs.txt" - upload: "maze_output/failed/**/*" - docker-compose#v3.7.0: - pull: cocoa-maze-runner-legacy - run: cocoa-maze-runner-legacy - command: - - "--app=@build/ipa_url_bs.txt" - - "--farm=bs" - - "--device=IOS_11_0_IPHONE_8_PLUS" - - "--appium-version=1.16.0" - - "--fail-fast" - - "--exclude=features/[e-z].*.feature$" - concurrency: 5 - concurrency_group: 'browserstack-app' - concurrency_method: eager - retry: - automatic: - - exit_status: -1 # Agent was lost - limit: 2 - - - label: ':browserstack: iOS 11 E2E tests batch 2' - skip: "https://smartbear.atlassian.net/browse/PLAT-11154" - depends_on: - - cocoa_fixture - # More time than other steps as the BrowserStack iOS 11 devices seem particularly unstable and - # sessions need resetting frequently, taking a minute or more each time. - timeout_in_minutes: 60 - agents: - queue: opensource - plugins: - artifacts#v1.5.0: - download: "features/fixtures/ios/output/ipa_url_bs.txt" - upload: "maze_output/failed/**/*" - docker-compose#v3.7.0: - pull: cocoa-maze-runner-legacy - run: cocoa-maze-runner-legacy - command: - - "--app=@build/ipa_url_bs.txt" - - "--farm=bs" - - "--device=IOS_11_0_IPHONE_8_PLUS" - - "--appium-version=1.16.0" - - "--fail-fast" - - "--exclude=features/[a-d].*.feature$" - concurrency: 5 - concurrency_group: 'browserstack-app' - concurrency_method: eager - retry: - automatic: - - exit_status: -1 # Agent was lost - limit: 2 - - label: 'macOS 11 E2E tests' depends_on: - cocoa_fixture diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 10b2f567d..11cb5c3f2 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -98,7 +98,7 @@ steps: agents: queue: macos-13-arm commands: - - ./scripts/run-unit-tests.sh PLATFORM=iOS OS=17.0 + - ./scripts/run-unit-tests.sh PLATFORM=iOS OS=17.0.1 DEVICE="iPhone 15" artifact_paths: - logs/* @@ -120,33 +120,6 @@ steps: artifact_paths: - logs/* - - label: iOS 11 unit tests - timeout_in_minutes: 10 - agents: - queue: macos-11 - commands: - - ./scripts/run-unit-tests.sh PLATFORM=iOS OS=11.4 - artifact_paths: - - logs/* - - - label: iOS 10 unit tests - timeout_in_minutes: 10 - agents: - queue: macos-10.15 - commands: - - ./scripts/run-unit-tests.sh PLATFORM=iOS OS=10.3.1 DEVICE=iPhone\ 5s - artifact_paths: - - logs/* - - - label: iOS 9 unit tests - timeout_in_minutes: 10 - agents: - queue: opensource-mac-cocoa-10.13 - commands: - - ./scripts/run-unit-tests.sh PLATFORM=iOS OS=9.0 DEVICE=iPhone\ 5s - artifact_paths: - - logs/* - - label: tvOS 15 unit tests timeout_in_minutes: 10 agents: @@ -165,33 +138,6 @@ steps: artifact_paths: - logs/* - - label: tvOS 11 unit tests - timeout_in_minutes: 10 - agents: - queue: macos-11 - commands: - - ./scripts/run-unit-tests.sh PLATFORM=tvOS OS=11.4 - artifact_paths: - - logs/* - - - label: tvOS 10 unit tests - timeout_in_minutes: 10 - agents: - queue: macos-10.15 - commands: - - ./scripts/run-unit-tests.sh PLATFORM=tvOS OS=10.2 - artifact_paths: - - logs/* - - - label: tvOS 9 unit tests - timeout_in_minutes: 10 - agents: - queue: opensource-mac-cocoa-10.13 - commands: - - ./scripts/run-unit-tests.sh PLATFORM=tvOS OS=9.2 - artifact_paths: - - logs/* - - label: watchOS 8 unit tests timeout_in_minutes: 60 agents: @@ -476,36 +422,6 @@ steps: - exit_status: -1 # Agent was lost limit: 2 - - label: ':bitbar: iOS 12 barebone tests' - depends_on: - - cocoa_fixture - timeout_in_minutes: 60 - agents: - queue: opensource - plugins: - artifacts#v1.9.0: - download: "features/fixtures/ios/output/ipa_url_bb.txt" - upload: "maze_output/failed/**/*" - docker-compose#v4.7.0: - pull: cocoa-maze-runner-bitbar - run: cocoa-maze-runner-bitbar - service-ports: true - command: - - "--app=@/app/build/ipa_url_bb.txt" - - "--farm=bb" - - "--device=IOS_12" - - "--no-tunnel" - - "--aws-public-ip" - - "--fail-fast" - - "features/barebone_tests.feature" - concurrency: 25 - concurrency_group: 'bitbar' - concurrency_method: eager - retry: - automatic: - - exit_status: -1 # Agent was lost - limit: 2 - # # BrowserStack # @@ -571,63 +487,6 @@ steps: - exit_status: -1 # Agent was lost limit: 2 - - label: ':browserstack: iOS 11 barebone tests' - skip: "https://smartbear.atlassian.net/browse/PLAT-11154" - depends_on: - - cocoa_fixture - timeout_in_minutes: 60 - agents: - queue: opensource - plugins: - artifacts#v1.5.0: - download: "features/fixtures/ios/output/ipa_url_bs.txt" - upload: "maze_output/failed/**/*" - docker-compose#v3.7.0: - pull: cocoa-maze-runner - run: cocoa-maze-runner - command: - - "--app=@build/ipa_url_bs.txt" - - "--farm=bs" - - "--device=IOS_11_0_IPHONE_8_PLUS" - - "--appium-version=1.16.0" - - "--fail-fast" - - "features/barebone_tests.feature" - concurrency: 5 - concurrency_group: 'browserstack-app' - concurrency_method: eager - retry: - automatic: - - exit_status: -1 # Agent was lost - limit: 2 - - - label: ':browserstack: iOS 10 barebone tests' - depends_on: - - cocoa_fixture - timeout_in_minutes: 60 - agents: - queue: opensource - plugins: - artifacts#v1.5.0: - download: "features/fixtures/ios/output/ipa_url_bs.txt" - upload: "maze_output/failed/**/*" - docker-compose#v3.7.0: - pull: cocoa-maze-runner - run: cocoa-maze-runner - command: - - "--app=@build/ipa_url_bs.txt" - - "--farm=bs" - - "--device=IOS_10" - - "--appium-version=1.15.0" - - "--fail-fast" - - "features/barebone_tests.feature" - concurrency: 5 - concurrency_group: 'browserstack-app' - concurrency_method: eager - retry: - automatic: - - exit_status: -1 # Agent was lost - limit: 2 - ############################################################################## # # Trigger more tests diff --git a/.github/workflows/downstream_updates.yml b/.github/workflows/downstream_updates.yml index a299295a4..8908c5a08 100644 --- a/.github/workflows/downstream_updates.yml +++ b/.github/workflows/downstream_updates.yml @@ -18,7 +18,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: matrix: - downstream_repo: ['bugsnag/bugsnag-unity'] + downstream_repo: ['bugsnag/bugsnag-unity', 'bugsnag/bugsnag-flutter'] steps: - name: Install libcurl4-openssl-dev and net-tools run: | diff --git a/.jazzy.yaml b/.jazzy.yaml index 8c9ad4004..bc06fedab 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -2,11 +2,11 @@ author_url: "https://www.bugsnag.com" author: "Bugsnag Inc" clean: false # avoid deleting docs/.git framework_root: "Bugsnag" -github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.27.3/Bugsnag" +github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.28.0/Bugsnag" github_url: "https://github.com/bugsnag/bugsnag-cocoa" hide_documentation_coverage: true module: "Bugsnag" -module_version: "6.27.3" +module_version: "6.28.0" objc: true output: "docs" readme: "README.md" diff --git a/Bugsnag.podspec.json b/Bugsnag.podspec.json index a63e40143..a9bfe9f9f 100644 --- a/Bugsnag.podspec.json +++ b/Bugsnag.podspec.json @@ -1,6 +1,6 @@ { "name": "Bugsnag", - "version": "6.27.3", + "version": "6.28.0", "summary": "The Bugsnag crash reporting framework for Apple platforms.", "homepage": "https://bugsnag.com", "license": "MIT", @@ -9,7 +9,7 @@ }, "source": { "git": "https://github.com/bugsnag/bugsnag-cocoa.git", - "tag": "v6.27.3" + "tag": "v6.28.0" }, "ios": { "frameworks": [ @@ -53,6 +53,9 @@ "source_files": [ "Bugsnag/{**/,}*.{m,h,mm,c}" ], + "resources": [ + "Bugsnag/resources/PrivacyInfo.xcprivacy" + ], "requires_arc": true, "prefix_header_file": false, "public_header_files": [ diff --git a/Bugsnag.xcodeproj/project.pbxproj b/Bugsnag.xcodeproj/project.pbxproj index 2907142e6..f61d56183 100644 --- a/Bugsnag.xcodeproj/project.pbxproj +++ b/Bugsnag.xcodeproj/project.pbxproj @@ -1625,6 +1625,7 @@ E746293624890C6B00F92D67 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; E746293824890C7000F92D67 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/lib/libc++.tbd"; sourceTree = DEVELOPER_DIR; }; E746293A24890C7900F92D67 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.4.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; }; + ED0951B22B232A2E006FE348 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = Bugsnag/resources/PrivacyInfo.xcprivacy; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -1890,6 +1891,7 @@ 01C2769C2601F455006901EA /* CONTRIBUTING.md */, 00E636B2248702A1006CBF1A /* README.md */, 00E636B3248702A1006CBF1A /* LICENSE.txt */, + ED0951B22B232A2E006FE348 /* PrivacyInfo.xcprivacy */, 00AD1C7424869B0E00A27979 /* Bugsnag */, 01A617662733CF2D00024A0B /* Tests */, 00AD1C7324869B0E00A27979 /* Products */, diff --git a/Bugsnag/Helpers/BSGRunContext.m b/Bugsnag/Helpers/BSGRunContext.m index 1af6767d3..974958b19 100644 --- a/Bugsnag/Helpers/BSGRunContext.m +++ b/Bugsnag/Helpers/BSGRunContext.m @@ -557,13 +557,14 @@ static int OpenFile(NSString *_Nonnull path) { /// Loads the contents of the state file into memory and sets the /// `bsg_lastRunContext` pointer if the contents are valid. static void LoadLastRunContext(int fd) { - struct stat sb; + static struct BSGRunContext context; + uint8_t buff[SIZEOF_STRUCT+1]; // +1 to detect if the size grew + // Only expose previous state if size matches... - if (fstat(fd, &sb) == 0 && sb.st_size == SIZEOF_STRUCT) { - static struct BSGRunContext context; - if (read(fd, &context, SIZEOF_STRUCT) == SIZEOF_STRUCT && - // ...and so does the structVersion - context.structVersion == BSGRUNCONTEXT_VERSION) { + if (read(fd, buff, sizeof(buff)) == SIZEOF_STRUCT) { + memcpy(&context, buff, SIZEOF_STRUCT); + // ...and so does the structVersion + if (context.structVersion == BSGRUNCONTEXT_VERSION) { bsg_lastRunContext = &context; } } diff --git a/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_Jailbreak.h b/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_Jailbreak.h index f9f1b23ed..101c55b5d 100644 --- a/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_Jailbreak.h +++ b/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_Jailbreak.h @@ -36,10 +36,10 @@ #ifndef bsg_jailbreak_h #define bsg_jailbreak_h +#include #include #include #include -#include #include #include #include @@ -195,9 +195,10 @@ static inline bool bsg_local_is_insert_libraries_env_var(const char* str) { } \ \ const char* etc_apt_path = "/etc/apt"; \ - struct stat st; \ - if(stat(etc_apt_path, &st) == 0) { \ + DIR *dirp = opendir(etc_apt_path); \ + if(dirp) { \ etc_apt_exists = true; \ + closedir(dirp); \ } \ \ for(int i = 0; environ[i] != NULL; i++) { \ diff --git a/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSCrashReport.c b/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSCrashReport.c index c36109511..49ce9438e 100644 --- a/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSCrashReport.c +++ b/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSCrashReport.c @@ -869,6 +869,7 @@ void bsg_kscrw_i_writeMemoryInfo(const BSG_KSCrashReportWriter *const writer, writer->endContainer(writer); } +#if TARGET_OS_OSX void bsg_kscrw_i_writeDiskInfo(const BSG_KSCrashReportWriter *const writer, const char *const key, const char *const path) { @@ -883,6 +884,7 @@ void bsg_kscrw_i_writeDiskInfo(const BSG_KSCrashReportWriter *const writer, } writer->endContainer(writer); } +#endif /** Write information about the error leading to the crash to the report. * @@ -1283,7 +1285,7 @@ void bsg_kscrashreport_writeStandardReport( void bsg_kscrashreport_writeKSCrashFields(BSG_KSCrash_Context *crashContext, BSG_KSCrashReportWriter *writer, - const char *const path) { + __unused const char *const path) { bsg_kscrw_i_writeProcessState(writer, BSG_KSCrashField_ProcessState); @@ -1298,7 +1300,9 @@ void bsg_kscrashreport_writeKSCrashFields(BSG_KSCrash_Context *crashContext, bsg_kscrw_i_writeMemoryInfo(writer, BSG_KSCrashField_Memory); bsg_kscrw_i_writeAppStats(writer, BSG_KSCrashField_AppStats, &crashContext->state); +#if TARGET_OS_OSX bsg_kscrw_i_writeDiskInfo(writer, BSG_KSCrashField_Disk, path); +#endif } writer->endContainer(writer); diff --git a/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSSystemInfo.m b/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSSystemInfo.m index 266593139..b4cb8f570 100644 --- a/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSSystemInfo.m +++ b/Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSSystemInfo.m @@ -381,6 +381,7 @@ + (NSDictionary *)systemInfo { @BSG_KSCrashField_Size: @(NSProcessInfo.processInfo.physicalMemory) }; +#if TARGET_OS_OSX NSString *dir = NSSearchPathForDirectoriesInDomains( NSCachesDirectory, NSUserDomainMask, YES).firstObject; const char *path = dir.fileSystemRepresentation; @@ -393,6 +394,7 @@ + (NSDictionary *)systemInfo { }; } } +#endif bsg_kscrashstate_updateDurationStats(); BSG_KSCrash_State state = crashContext()->state; diff --git a/Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSFileUtils.c b/Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSFileUtils.c index 224a1046a..3c583d468 100644 --- a/Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSFileUtils.c +++ b/Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSFileUtils.c @@ -33,6 +33,7 @@ #include #include #include +#include const char *bsg_ksfulastPathEntry(const char *const path) { if (path == NULL) { @@ -83,6 +84,7 @@ bool bsg_ksfuwriteBytesToFD(const int fd, const char *const bytes, return true; } +#if TARGET_OS_OSX bool bsg_ksfuStatfs(const char *path, uint64_t *free, uint64_t *total) { struct statfs st; if (statfs(path, &st) != 0) { @@ -92,3 +94,4 @@ bool bsg_ksfuStatfs(const char *path, uint64_t *free, uint64_t *total) { *total = st.f_bsize * st.f_blocks; return true; } +#endif diff --git a/Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSFileUtils.h b/Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSFileUtils.h index fa58fde0b..3ea5ac4ba 100644 --- a/Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSFileUtils.h +++ b/Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSFileUtils.h @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -65,6 +66,7 @@ bool bsg_ksfuwriteBytesToFD(const int fd, const char *bytes, ssize_t length); */ bool bsg_ksfuflushWriteBuffer(const int fd); +#if TARGET_OS_OSX /** * Get file system statistics. * @@ -76,6 +78,7 @@ bool bsg_ksfuflushWriteBuffer(const int fd); * should be written. */ bool bsg_ksfuStatfs(const char *path, uint64_t *free, uint64_t *total); +#endif #ifdef __cplusplus } diff --git a/Bugsnag/Payload/BugsnagNotifier.m b/Bugsnag/Payload/BugsnagNotifier.m index 4be649983..e06375aa7 100644 --- a/Bugsnag/Payload/BugsnagNotifier.m +++ b/Bugsnag/Payload/BugsnagNotifier.m @@ -23,7 +23,7 @@ - (instancetype)init { #else _name = @"Bugsnag Objective-C"; #endif - _version = @"6.27.3"; + _version = @"6.28.0"; _url = @"https://github.com/bugsnag/bugsnag-cocoa"; _dependencies = @[]; } diff --git a/Bugsnag/include/Bugsnag/BugsnagDeviceWithState.h b/Bugsnag/include/Bugsnag/BugsnagDeviceWithState.h index 2e92811f4..8ba5a07aa 100644 --- a/Bugsnag/include/Bugsnag/BugsnagDeviceWithState.h +++ b/Bugsnag/include/Bugsnag/BugsnagDeviceWithState.h @@ -19,7 +19,10 @@ BUGSNAG_EXTERN @interface BugsnagDeviceWithState : BugsnagDevice /** - * The number of free bytes of storage available on the device + * The number of free bytes of storage available on the device. + * + * Note: This field is no longer auto-populated on iOS, watchOS, or tvOS in order to + * comply with Apple "grey API" guidelines. If you populate it manually, it will be reported. */ @property (strong, nullable, nonatomic) NSNumber *freeDisk; diff --git a/Bugsnag/resources/PrivacyInfo.xcprivacy b/Bugsnag/resources/PrivacyInfo.xcprivacy new file mode 100644 index 000000000..080ea0068 --- /dev/null +++ b/Bugsnag/resources/PrivacyInfo.xcprivacy @@ -0,0 +1,96 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeDeviceID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeProductInteraction + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeCrashData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDataTypes + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + + diff --git a/BugsnagNetworkRequestPlugin.podspec.json b/BugsnagNetworkRequestPlugin.podspec.json index 9b50b097e..5cf9bfc7f 100644 --- a/BugsnagNetworkRequestPlugin.podspec.json +++ b/BugsnagNetworkRequestPlugin.podspec.json @@ -1,16 +1,16 @@ { "name": "BugsnagNetworkRequestPlugin", - "version": "6.27.3", + "version": "6.28.0", "summary": "Network request monitoring support for Bugsnag.", "homepage": "https://bugsnag.com", "license": "MIT", "authors": { "Bugsnag": "notifiers@bugsnag.com" }, - "readme": "https://raw.githubusercontent.com/bugsnag/bugsnag-cocoa/v6.27.3/BugsnagNetworkRequestPlugin/README.md", + "readme": "https://raw.githubusercontent.com/bugsnag/bugsnag-cocoa/v6.28.0/BugsnagNetworkRequestPlugin/README.md", "source": { "git": "https://github.com/bugsnag/bugsnag-cocoa.git", - "tag": "v6.27.3" + "tag": "v6.28.0" }, "dependencies": { "Bugsnag": "~> 6.13" diff --git a/CHANGELOG.md b/CHANGELOG.md index 63c0f7ee1..ccfaa69e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ Changelog ========= +## 6.28.0 (2023-12-13) + +### Enhancements + +* Free disk space is only sent on macOS, since the APIs to get it are now on the Apple grey list. + [1617](https://github.com/bugsnag/bugsnag-cocoa/pull/1617) + +* Remove calls to stat, which is now an API on the Apple grey list. + [1614](https://github.com/bugsnag/bugsnag-cocoa/pull/1614) + +* Add Privacy Manifest covering BugSnag data and API usage + [1616](https://github.com/bugsnag/bugsnag-cocoa/pull/1616) + ## 6.27.3 (2023-11-15) ### Bug fixes diff --git a/Framework/Info.plist b/Framework/Info.plist index b022480f9..ec4764d29 100644 --- a/Framework/Info.plist +++ b/Framework/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 6.27.3 + 6.28.0 CFBundleVersion 1 diff --git a/Gemfile b/Gemfile index 95566ec28..427043d09 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ gem 'cocoapods' # A reference to Maze Runner is only needed for running tests locally and if committed it must be # portable for CI, e.g. a specific release. However, leaving it commented out would mean quicker CI. -gem 'bugsnag-maze-runner', '~> 8.8' +gem 'bugsnag-maze-runner', '~> 8.0' # Use a specific branch #gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', branch: 'master' diff --git a/Gemfile.lock b/Gemfile.lock index d50a61457..a1573dab1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,12 +3,17 @@ GEM specs: CFPropertyList (3.0.6) rexml - activesupport (7.0.6) + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) @@ -21,9 +26,11 @@ GEM faye-websocket (~> 0.11.0) selenium-webdriver (~> 4.2, < 4.6) atomos (0.1.3) + base64 (0.2.0) + bigdecimal (3.1.4) bugsnag (6.26.0) concurrent-ruby (~> 1.0) - bugsnag-maze-runner (8.8.0) + bugsnag-maze-runner (8.13.0) appium_lib (~> 12.0.0) appium_lib_core (~> 5.4.0) bugsnag (~> 6.24) @@ -43,12 +50,12 @@ GEM builder (3.2.4) childprocess (4.1.0) claide (1.1.0) - cocoapods (1.12.1) + cocoapods (1.14.3) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.12.1) + cocoapods-core (= 1.14.3) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.6.0, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-trunk (>= 1.6.0, < 2.0) @@ -60,8 +67,8 @@ GEM molinillo (~> 0.8.0) nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.12.1) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.14.3) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -72,7 +79,7 @@ GEM public_suffix (~> 4.0) typhoeus (~> 1.0) cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.6.3) + cocoapods-downloader (2.1) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.1) @@ -82,6 +89,7 @@ GEM cocoapods-try (1.2.0) colored2 (3.1.2) concurrent-ruby (1.2.2) + connection_pool (2.4.1) cucumber (7.1.0) builder (~> 3.2, >= 3.2.4) cucumber-core (~> 10.1, >= 10.1.0) @@ -116,6 +124,8 @@ GEM curb (0.9.11) diff-lcs (1.5.0) dogstatsd-ruby (5.5.0) + drb (2.2.0) + ruby2_keywords ecma-re-validator (0.4.0) regexp_parser (~> 2.2) escape (0.0.4) @@ -125,7 +135,7 @@ GEM faye-websocket (0.11.3) eventmachine (>= 0.12.0) websocket-driver (>= 0.5.1) - ffi (1.15.5) + ffi (1.16.3) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) @@ -143,24 +153,28 @@ GEM mime-types (3.5.1) mime-types-data (~> 3.2015) mime-types-data (3.2023.1003) - minitest (5.18.1) + minitest (5.20.0) molinillo (0.8.0) multi_test (0.1.2) + mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) - nokogiri (1.15.4-x86_64-darwin) + nokogiri (1.15.5-arm64-darwin) + racc (~> 1.4) + nokogiri (1.15.5-x86_64-darwin) racc (~> 1.4) optimist (3.0.1) os (1.0.1) power_assert (2.0.3) public_suffix (4.0.7) - racc (1.7.1) + racc (1.7.3) rack (2.2.8) rake (12.3.3) regexp_parser (2.8.2) - rexml (3.2.5) + rexml (3.2.6) ruby-macho (2.5.1) + ruby2_keywords (0.0.5) rubyzip (2.3.2) selenium-webdriver (4.5.0) childprocess (>= 0.5, < 5.0) @@ -174,20 +188,20 @@ GEM test-unit (3.5.9) power_assert tomlrb (2.0.3) - typhoeus (1.4.0) + typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unf (0.1.4) unf_ext - unf_ext (0.0.8.2) + unf_ext (0.0.9.1) uri_template (0.7.0) webrick (1.7.0) websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - xcodeproj (1.22.0) + xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -196,12 +210,11 @@ GEM rexml (~> 3.2.4) PLATFORMS + arm64-darwin-22 x86_64-darwin-19 - x86_64-darwin-20 - x86_64-darwin-21 DEPENDENCIES - bugsnag-maze-runner (~> 8.8) + bugsnag-maze-runner (~> 8.0) cocoapods BUNDLED WITH diff --git a/Makefile b/Makefile index 352c5ea02..cace29028 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,6 @@ else else DEVICE?=iPhone 8 endif - DESTINATION?=platform=iOS Simulator,name=$(DEVICE),OS=$(OS) RELEASE_DIR=Release-iphoneos else diff --git a/Package.swift b/Package.swift index 86289ee10..94231ab60 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.3 import PackageDescription let package = Package( @@ -19,6 +19,9 @@ let package = Package( name: "Bugsnag", dependencies: [], path: "Bugsnag", + resources: [ + .copy("resources/PrivacyInfo.xcprivacy") + ], publicHeadersPath: "include", cSettings: [ .headerSearchPath("."), diff --git a/Tests/BugsnagTests/BugsnagClientPayloadInfoTest.m b/Tests/BugsnagTests/BugsnagClientPayloadInfoTest.m index fe60f3a31..a735afc39 100755 --- a/Tests/BugsnagTests/BugsnagClientPayloadInfoTest.m +++ b/Tests/BugsnagTests/BugsnagClientPayloadInfoTest.m @@ -48,7 +48,9 @@ - (void)testAppInfo { - (void)testDeviceInfo { BugsnagClient *client = [Bugsnag client]; NSDictionary *device = [[client generateDeviceWithState:BSGGetSystemInfo()] toDictionary]; +#if TARGET_OS_OSX XCTAssertNotNil(device[@"freeDisk"]); +#endif XCTAssertNotNil(device[@"freeMemory"]); XCTAssertNotNil(device[@"id"]); XCTAssertNotNil(device[@"jailbroken"]); diff --git a/Tests/BugsnagTests/Info.plist b/Tests/BugsnagTests/Info.plist index 7d778be1a..d05947470 100644 --- a/Tests/BugsnagTests/Info.plist +++ b/Tests/BugsnagTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 6.27.3 + 6.28.0 CFBundleVersion 1 diff --git a/Tests/TestHost-iOS/Info.plist b/Tests/TestHost-iOS/Info.plist index 28bed4d56..273512018 100644 --- a/Tests/TestHost-iOS/Info.plist +++ b/Tests/TestHost-iOS/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 6.27.3 + 6.28.0 CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/VERSION b/VERSION index 0fc326d66..2ece8e17b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.27.3 +6.28.0 diff --git a/examples/swift-package-manager/swift-package-manager.xcodeproj/project.pbxproj b/examples/swift-package-manager/swift-package-manager.xcodeproj/project.pbxproj index 3b4881ec1..2b1bd286a 100644 --- a/examples/swift-package-manager/swift-package-manager.xcodeproj/project.pbxproj +++ b/examples/swift-package-manager/swift-package-manager.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ diff --git a/features/app_and_device_attributes.feature b/features/app_and_device_attributes.feature index 04a1b42e1..b317b352c 100644 --- a/features/app_and_device_attributes.feature +++ b/features/app_and_device_attributes.feature @@ -30,7 +30,7 @@ Feature: App and Device attributes present # DeviceWithState - And the error payload field "events.0.device.freeDisk" is an integer + And on macOS, the error payload field "events.0.device.freeDisk" is an integer And the error payload field "events.0.device.freeMemory" is an integer And on iOS, the event "device.orientation" matches "(face(down|up)|landscape(left|right)|portrait(upsidedown)?)" And the error payload field "events.0.device.time" is a date diff --git a/features/app_hangs.feature b/features/app_hangs.feature index 8f31de417..9b16ea501 100644 --- a/features/app_hangs.feature +++ b/features/app_hangs.feature @@ -56,7 +56,7 @@ Feature: App hangs # DeviceWithState - And the error payload field "events.0.device.freeDisk" is an integer + And on macOS, the error payload field "events.0.device.freeDisk" is an integer And the error payload field "events.0.device.freeMemory" is an integer And on iOS, the event "device.orientation" matches "(face(down|up)|landscape(left|right)|portrait(upsidedown)?)" And the error payload field "events.0.device.time" is a date diff --git a/features/barebone_tests.feature b/features/barebone_tests.feature index 691eeb534..b8547805b 100644 --- a/features/barebone_tests.feature +++ b/features/barebone_tests.feature @@ -108,7 +108,7 @@ Feature: Barebone tests And the error payload field "events.0.app.dsymUUIDs" is a non-empty array And the error payload field "events.0.app.duration" is a number And the error payload field "events.0.app.durationInForeground" is a number - And the error payload field "events.0.device.freeDisk" is an integer + And on macOS, the error payload field "events.0.device.freeDisk" is an integer And the error payload field "events.0.device.freeMemory" is an integer And the error payload field "events.0.device.model" matches the regex "[iPad|Macmini|iPhone]1?\d,\d" And the error payload field "events.0.device.totalMemory" is an integer @@ -232,7 +232,7 @@ Feature: Barebone tests And the error payload field "events.0.app.dsymUUIDs" is a non-empty array And the error payload field "events.0.app.duration" is a number And the error payload field "events.0.app.durationInForeground" is a number - And the error payload field "events.0.device.freeDisk" is an integer + And on macOS, the error payload field "events.0.device.freeDisk" is an integer And the error payload field "events.0.device.freeMemory" is an integer And the error payload field "events.0.device.model" matches the regex "[iPad|Macmini|iPhone]1?\d,\d" And the error payload field "events.0.device.totalMemory" is an integer @@ -335,6 +335,6 @@ Feature: Barebone tests And the error payload field "events.0.app.dsymUUIDs" is a non-empty array And the error payload field "events.0.app.duration" is null And the error payload field "events.0.app.durationInForeground" is null - And the error payload field "events.0.device.freeDisk" is null + And on macOS, the error payload field "events.0.device.freeDisk" is null And the error payload field "events.0.device.model" matches the regex "[iPad|Macmini|iPhone]1?\d,\d" And the error payload field "events.0.threads" is an array with 0 elements