Skip to content

Commit 53b776c

Browse files
authored
Feature/tvOS (#27)
* Feature/tvOS (#26) Add tvOS support includes: * Adding new target * Updating README.md and .travis.yaml config file * Adding crashing action to the demo app * Adding shared scheme for tvOS example application * Updating default logging level * Updating podspec
1 parent 1e5059f commit 53b776c

File tree

53 files changed

+2172
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2172
-248
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ script:
99
- bundle exec pod update
1010
- bundle exec fastlane ios tests
1111
- bundle exec fastlane mac tests
12+
- bundle exec fastlane tvos tests

Backtrace-tvOS/Backtrace.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#import <UIKit/UIKit.h>
2+
3+
//! Project version number for Backtrace.
4+
FOUNDATION_EXPORT double BacktraceVersionNumber;
5+
6+
//! Project version string for Backtrace.
7+
FOUNDATION_EXPORT const unsigned char BacktraceVersionString[];
8+
9+
// In this header, you should import all the public headers of your framework using statements like #import <Backtrace/PublicHeader.h>

Backtrace-tvOS/Info.plist

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>Backtrace</string>
9+
<key>CFBundleExecutable</key>
10+
<string>$(EXECUTABLE_NAME)</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>$(PRODUCT_NAME)</string>
17+
<key>CFBundlePackageType</key>
18+
<string>FMWK</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>1.0</string>
21+
<key>CFBundleVersion</key>
22+
<string>$(CURRENT_PROJECT_VERSION)</string>
23+
</dict>
24+
</plist>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import XCTest
2+
@testable import Backtrace
3+
4+
class BacktraceTeststvOS: XCTestCase {
5+
6+
}

Backtrace-tvOSTests/Info.plist

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>BNDL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>1</string>
21+
</dict>
22+
</plist>

Backtrace.podspec

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,28 @@
99
Pod::Spec.new do |s|
1010

1111
s.name = "Backtrace"
12-
s.version = "1.4.1"
13-
s.summary = "Backtrace's integration with iOS and macOS"
12+
s.version = "1.5.0"
13+
s.summary = "Backtrace's integration with iOS, macOS and tvOS"
1414
s.description = "Backtrace's integration with iOS and macOS for handling crashes"
1515
s.homepage = "https://backtrace.io/"
1616
s.license = { :type => "MIT", :file => 'LICENSE' }
1717
s.author = { "Backtrace I/O" => "info@backtrace.io" }
18-
s.source = { :git => "https://github.com/backtrace-labs/backtrace-cocoa", :tag => "#{s.version}" }
18+
s.source = { :git => "https://github.com/backtrace-labs/backtrace-cocoa.git", :tag => "#{s.version}" }
1919

2020
s.ios.deployment_target = "10.0"
2121
s.osx.deployment_target = "10.10"
22+
s.tvos.deployment_target = "10.0"
2223

23-
s.ios.source_files = ["Sources/**/*.{swift}", "Backtrace-iOS/**/*.{h*,swift}"]
24+
s.ios.source_files = ["Sources/**/*.{swift}", "Backtrace-iOS/**/*.{h*,swift}"]
2425
s.osx.source_files = ["Sources/**/*.{swift}", "Backtrace-macOS/**/*.{h*,swift}"]
26+
s.tvos.source_files = ["Sources/**/*.{swift}", "Backtrace-tvOS/**/*.{h*,swift}"]
2527

2628
s.ios.public_header_files = ["Backtrace-iOS/**/*.h*"]
2729
s.osx.public_header_files = ["Backtrace-macOS/**/*.h*"]
30+
s.tvos.public_header_files = ["Backtrace-tvOS/**/*.h*"]
2831

2932
s.dependency "Backtrace-PLCrashReporter"
3033
s.resources = 'Sources/**/*.xcdatamodeld'
3134

32-
s.swift_version = '4.0'
35+
s.swift_version = '4.2'
3336
end

Backtrace.xcodeproj/project.pbxproj

Lines changed: 1198 additions & 187 deletions
Large diffs are not rendered by default.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1010"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "28F95BAF22525DCC003936E0"
18+
BuildableName = "Backtrace.framework"
19+
BlueprintName = "Backtrace-tvOS"
20+
ReferencedContainer = "container:Backtrace.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "28F95BB722525DCC003936E0"
36+
BuildableName = "Backtrace-tvOSTests.xctest"
37+
BlueprintName = "Backtrace-tvOSTests"
38+
ReferencedContainer = "container:Backtrace.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "28F95BAF22525DCC003936E0"
46+
BuildableName = "Backtrace.framework"
47+
BlueprintName = "Backtrace-tvOS"
48+
ReferencedContainer = "container:Backtrace.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
53+
</TestAction>
54+
<LaunchAction
55+
buildConfiguration = "Debug"
56+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58+
launchStyle = "0"
59+
useCustomWorkingDirectory = "NO"
60+
ignoresPersistentStateOnLaunch = "NO"
61+
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
63+
allowLocationSimulation = "YES">
64+
<MacroExpansion>
65+
<BuildableReference
66+
BuildableIdentifier = "primary"
67+
BlueprintIdentifier = "28F95BAF22525DCC003936E0"
68+
BuildableName = "Backtrace.framework"
69+
BlueprintName = "Backtrace-tvOS"
70+
ReferencedContainer = "container:Backtrace.xcodeproj">
71+
</BuildableReference>
72+
</MacroExpansion>
73+
<AdditionalOptions>
74+
</AdditionalOptions>
75+
</LaunchAction>
76+
<ProfileAction
77+
buildConfiguration = "Release"
78+
shouldUseLaunchSchemeArgsEnv = "YES"
79+
savedToolIdentifier = ""
80+
useCustomWorkingDirectory = "NO"
81+
debugDocumentVersioning = "YES">
82+
<MacroExpansion>
83+
<BuildableReference
84+
BuildableIdentifier = "primary"
85+
BlueprintIdentifier = "28F95BAF22525DCC003936E0"
86+
BuildableName = "Backtrace.framework"
87+
BlueprintName = "Backtrace-tvOS"
88+
ReferencedContainer = "container:Backtrace.xcodeproj">
89+
</BuildableReference>
90+
</MacroExpansion>
91+
</ProfileAction>
92+
<AnalyzeAction
93+
buildConfiguration = "Debug">
94+
</AnalyzeAction>
95+
<ArchiveAction
96+
buildConfiguration = "Release"
97+
revealArchiveInOrganizer = "YES">
98+
</ArchiveAction>
99+
</Scheme>
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1020"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "F2A11BF622553C2800354640"
18+
BuildableName = "Example-tvOS.app"
19+
BlueprintName = "Example-tvOS"
20+
ReferencedContainer = "container:Backtrace.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "F2A11BF622553C2800354640"
36+
BuildableName = "Example-tvOS.app"
37+
BlueprintName = "Example-tvOS"
38+
ReferencedContainer = "container:Backtrace.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
41+
<AdditionalOptions>
42+
</AdditionalOptions>
43+
</TestAction>
44+
<LaunchAction
45+
buildConfiguration = "Debug"
46+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
47+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
48+
launchStyle = "0"
49+
useCustomWorkingDirectory = "NO"
50+
ignoresPersistentStateOnLaunch = "NO"
51+
debugDocumentVersioning = "YES"
52+
debugServiceExtension = "internal"
53+
allowLocationSimulation = "YES">
54+
<BuildableProductRunnable
55+
runnableDebuggingMode = "0">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "F2A11BF622553C2800354640"
59+
BuildableName = "Example-tvOS.app"
60+
BlueprintName = "Example-tvOS"
61+
ReferencedContainer = "container:Backtrace.xcodeproj">
62+
</BuildableReference>
63+
</BuildableProductRunnable>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<BuildableProductRunnable
74+
runnableDebuggingMode = "0">
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "F2A11BF622553C2800354640"
78+
BuildableName = "Example-tvOS.app"
79+
BlueprintName = "Example-tvOS"
80+
ReferencedContainer = "container:Backtrace.xcodeproj">
81+
</BuildableReference>
82+
</BuildableProductRunnable>
83+
</ProfileAction>
84+
<AnalyzeAction
85+
buildConfiguration = "Debug">
86+
</AnalyzeAction>
87+
<ArchiveAction
88+
buildConfiguration = "Release"
89+
revealArchiveInOrganizer = "YES">
90+
</ArchiveAction>
91+
</Scheme>

Example-iOS/ViewController.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ class ViewController: UIViewController {
1010
}
1111

1212
@IBAction func liveReportAction(_ sender: Any) {
13-
// Sned autogenerated report
14-
// BacktraceClient.shared?.send(attachmentPaths: [], completion: { (result) in
15-
// print(result)
16-
// })
17-
13+
1814
// Send NSException
19-
let exception = NSException(name: NSExceptionName.characterConversionException, reason: "cusotm reason", userInfo: ["testUserInfo": "tests"])
15+
let exception = NSException(name: NSExceptionName.characterConversionException, reason: "custom reason", userInfo: ["testUserInfo": "tests"])
2016
BacktraceClient.shared?.send(exception: exception, attachmentPaths: [], completion: { (result: BacktraceResult) in
2117
print(result)
2218
})

0 commit comments

Comments
 (0)