Skip to content

Commit

Permalink
Merge pull request #39 from backtrace-labs/develop
Browse files Browse the repository at this point in the history
* Fix Xcode 11.x compilation issue (#38)

* Initialize URLSession response
Fix issue in Xcode 11 caused by URLSession response being captured before initialization
* Fix dangling pointer
Use `withUnsafeMutableBytes` in order to explicitly convert the argument to buffer pointer valid for a defined scope.
* Bump podspec version
* Update dependencies
* Update Travis CI script
* Update Fastfile
* Add Brewfile
* Remove Fastlane from Gemfile (#40)
* Feature/update schemes (#41)
* Update target's schemes
* Bump Xcode version on Travis CI
  • Loading branch information
krml19 authored Jul 18, 2020
2 parents f463bf9 + 8a4dd06 commit 19e90ac
Show file tree
Hide file tree
Showing 17 changed files with 103 additions and 199 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.4
2.7.0
11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
language: swift
os: osx
osx_image: xcode11.2
before_install:
- bundler install
- bundle update
- bundle exec pod repo update
- bundle exec pod install
osx_image: xcode11.6
script:
- bundle exec fastlane ios tests
- bundle exec fastlane mac tests
- sh scripts/install.sh
- sh scripts/test.sh
2 changes: 1 addition & 1 deletion Backtrace.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|

s.name = "Backtrace"
s.version = "1.5.4"
s.version = "1.5.5"
s.summary = "Backtrace's integration with iOS, macOS and tvOS"
s.description = "Reliable crash and hang reporting for iOS, macOS and tvOS."
s.homepage = "https://backtrace.io/"
Expand Down
14 changes: 0 additions & 14 deletions Backtrace.xcodeproj/xcshareddata/xcschemes/Backtrace-iOS.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@
ReferencedContainer = "container:Backtrace.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F2C2FA5821BBD26300934744"
BuildableName = "Backtrace-iOSTests.xctest"
BlueprintName = "Backtrace-iOSTests"
ReferencedContainer = "container:Backtrace.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@
BlueprintName = "Backtrace-macOSTests"
ReferencedContainer = "container:Backtrace.xcodeproj">
</BuildableReference>
<SkippedTests>
<Test
Identifier = "BacktraceIntegrationTests">
</Test>
</SkippedTests>
</TestableReference>
</Testables>
</TestAction>
Expand Down
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew "fastlane"
39 changes: 39 additions & 0 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"entries": {
"brew": {
"fastlane": {
"version": "2.152.0",
"bottle": {
"cellar": ":any",
"prefix": "/usr/local",
"files": {
"catalina": {
"url": "https://homebrew.bintray.com/bottles/fastlane-2.152.0.catalina.bottle.tar.gz",
"sha256": "133fd49959694621a60d6212e9e21631c34015b836427353e8c864a280d579cb"
},
"mojave": {
"url": "https://homebrew.bintray.com/bottles/fastlane-2.152.0.mojave.bottle.tar.gz",
"sha256": "346c5892ebc93be7f37ab7e080db591d4d91c1849096b478739a1873988af4f9"
},
"high_sierra": {
"url": "https://homebrew.bintray.com/bottles/fastlane-2.152.0.high_sierra.bottle.tar.gz",
"sha256": "6d96e2a20decfae69a34e7e774edaa30da4b3d7f7895291612c33031a6d27d53"
}
}
}
}
}
},
"system": {
"macos": {
"catalina": {
"HOMEBREW_VERSION": "2.4.7",
"HOMEBREW_PREFIX": "/usr/local",
"Homebrew/homebrew-core": "3635145b479e8168b3a6b6f93c6662e862364fd3",
"CLT": "1103.0.32.62",
"Xcode": "11.6",
"macOS": "10.15.6"
}
}
}
}
5 changes: 0 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem "fastlane"
gem "cocoapods"
175 changes: 23 additions & 152 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.2)
activesupport (4.2.11.1)
activesupport (4.2.11.3)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.1)
algoliasearch (1.27.3)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
babosa (1.0.3)
claide (1.0.3)
cocoapods (1.8.4)
cocoapods (1.9.3)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.8.4)
cocoapods-core (= 1.9.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -33,187 +30,61 @@ GEM
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.11.1, < 2.0)
cocoapods-core (1.8.4)
xcodeproj (>= 1.14.0, < 2.0)
cocoapods-core (1.9.3)
activesupport (>= 4.0.2, < 6)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.3.0)
cocoapods-downloader (1.4.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.4.1)
cocoapods-trunk (1.5.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored (1.2)
cocoapods-try (1.2.0)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
concurrent-ruby (1.1.6)
declarative (0.0.10)
declarative-option (0.1.0)
digest-crc (0.4.1)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.5)
emoji_regex (1.0.1)
escape (0.0.4)
excon (0.72.0)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.7)
fastlane (2.141.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 0.17)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 0.13.1)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.29.2, < 0.37.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
jwt (~> 2.1.0)
mini_magick (>= 4.9.4, < 5.0.0)
multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.3.0, < 2.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
ethon (0.12.0)
ffi (>= 1.3.0)
ffi (1.13.1)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-api-client (0.36.4)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.0)
faraday (~> 0.11)
google-cloud-errors (1.0.0)
google-cloud-storage (1.25.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.10.0)
faraday (~> 0.12)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.12)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.3.0)
jwt (2.1.0)
memoist (0.16.2)
mini_magick (4.10.1)
mini_mime (1.0.2)
minitest (5.14.0)
json (2.3.1)
minitest (5.14.1)
molinillo (0.6.6)
multi_json (1.14.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.0)
netrc (0.11.0)
os (1.0.1)
plist (3.5.0)
public_suffix (2.0.5)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rouge (2.0.7)
ruby-macho (1.4.0)
rubyzip (1.3.0)
security (0.1.3)
signet (0.12.0)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-cursor (0.7.1)
tty-screen (0.7.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
tzinfo (1.2.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)
unicode-display_width (1.6.1)
word_wrap (1.0.0)
xcodeproj (1.15.0)
xcodeproj (1.17.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
xcpretty (~> 0.2, >= 0.0.7)
nanaimo (~> 0.3.0)

PLATFORMS
ruby

DEPENDENCIES
cocoapods
fastlane

BUNDLED WITH
2.0.2
2.1.4
6 changes: 3 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Backtrace (1.5.4):
- Backtrace (1.5.5):
- Backtrace-PLCrashReporter
- Backtrace-PLCrashReporter (1.5.2)
- Nimble (8.0.5)
Expand All @@ -22,11 +22,11 @@ EXTERNAL SOURCES:
:path: "./Backtrace.podspec"

SPEC CHECKSUMS:
Backtrace: 3be763061ac14fd97029d78cbfc6b39c179b62a9
Backtrace: d3dfe8106c641cbee1413dec5e3c997840bbe17d
Backtrace-PLCrashReporter: cae6b9bd6d0b2f55adc114c1a41908c03f1bfc72
Nimble: 4ab1aeb9b45553c75b9687196b0fa0713170a332
Quick: 7fb19e13be07b5dfb3b90d4f9824c855a11af40e

PODFILE CHECKSUM: 62d8c592f7a14dbdbf06ce7cbf47810c1a25075e

COCOAPODS: 1.8.4
COCOAPODS: 1.9.3
8 changes: 5 additions & 3 deletions Sources/Features/Crash Reporting/CrashReporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ final class CrashReporter {
private let reporter: PLCrashReporter
static private let crashName = "live_report"
public init(config: PLCrashReporterConfig = PLCrashReporterConfig.defaultConfiguration()) {
reporter = PLCrashReporter.init(configuration: config)
reporter = PLCrashReporter(configuration: config)
}
}

extension CrashReporter: CrashReporting {
func signalContext(_ mutableContext: inout SignalContext) {
let rawMutablePointer = UnsafeMutableRawPointer(&mutableContext)
let handler: @convention(c) (_ signalInfo: UnsafeMutablePointer<siginfo_t>?,
_ uContext: UnsafeMutablePointer<ucontext_t>?,
_ context: UnsafeMutableRawPointer?) -> Void = { signalInfoPointer, _, context in
Expand All @@ -22,7 +21,10 @@ extension CrashReporter: CrashReporting {
attributesProvider.set(faultMessage: "siginfo_t.si_signo: \(signalInfo.si_signo)")
try? AttributesStorage.store(attributesProvider.allAttributes, fileName: CrashReporter.crashName)
}
var callbacks = PLCrashReporterCallbacks(version: 0, context: rawMutablePointer, handleSignal: handler)

var callbacks = withUnsafeMutableBytes(of: &mutableContext) { rawMutablePointer in
PLCrashReporterCallbacks(version: 0, context: rawMutablePointer.baseAddress, handleSignal: handler)
}
reporter.setCrash(&callbacks)
}

Expand Down
Loading

0 comments on commit 19e90ac

Please sign in to comment.