Skip to content

Commit bc18b5c

Browse files
authored
Merge pull request #53 from opendocument-app/development
v.1.15
2 parents 4961e40 + d65abf0 commit bc18b5c

439 files changed

Lines changed: 635 additions & 61140 deletions

File tree

Some content is hidden

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

.github/workflows/ios_main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
destination: ['platform=iOS Simulator,name=iPhone 11']
11-
scheme: [OpenDocumentReader]
11+
scheme: [ODR Full]
1212
steps:
1313
- uses: actions/checkout@v1
1414
- name: Checkout submodule

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ playground.xcworkspace
4646
# you should judge for yourself, the pros and cons are mentioned at:
4747
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
4848
#
49-
# Pods/
49+
Pods/
5050

5151
# Carthage
5252
#

OpenDocument.core

OpenDocumentReader.xcodeproj/project.pbxproj

Lines changed: 339 additions & 69 deletions
Large diffs are not rendered by default.

OpenDocumentReader.xcodeproj/xcshareddata/xcschemes/OpenDocumentReader.xcscheme renamed to OpenDocumentReader.xcodeproj/xcshareddata/xcschemes/ODR Full.xcscheme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
</AnalyzeAction>
8383
<ArchiveAction
8484
buildConfiguration = "Release"
85+
customArchiveName = "OpenDocumentReader Full"
8586
revealArchiveInOrganizer = "YES">
8687
</ArchiveAction>
8788
</Scheme>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1130"
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 = "E2F7ED4E220B54D600D63515"
18+
BuildableName = "OpenDocumentReader.app"
19+
BlueprintName = "OpenDocumentReader"
20+
ReferencedContainer = "container:OpenDocumentReader.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug Lite"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug Lite"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "E2F7ED4E220B54D600D63515"
48+
BuildableName = "OpenDocumentReader.app"
49+
BlueprintName = "OpenDocumentReader"
50+
ReferencedContainer = "container:OpenDocumentReader.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release Lite"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "E2F7ED4E220B54D600D63515"
65+
BuildableName = "OpenDocumentReader.app"
66+
BlueprintName = "OpenDocumentReader"
67+
ReferencedContainer = "container:OpenDocumentReader.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug Lite">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release Lite"
76+
customArchiveName = "OpenDocumentReader Lite"
77+
revealArchiveInOrganizer = "YES">
78+
</ArchiveAction>
79+
</Scheme>

OpenDocumentReader/AppDelegate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,22 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4646

4747
func application(_ app: UIApplication, open inputURL: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
4848
guard let documentBrowserViewController = window?.rootViewController as? DocumentBrowserViewController else {
49-
Crashlytics.sharedInstance().throwException()
49+
fatalError("documentBrowserViewController is null")
5050

5151
return false
5252
}
5353

5454
documentBrowserViewController.revealDocument(at: inputURL, importIfNeeded: true) { (revealedDocumentURL, error) in
5555

5656
guard error == nil else {
57-
Crashlytics.sharedInstance().recordError(error!)
58-
Crashlytics.sharedInstance().throwException()
57+
Crashlytics.crashlytics().record(error: error!)
58+
fatalError("error is not null")
5959

6060
return
6161
}
6262

6363
guard let url = revealedDocumentURL else {
64-
Crashlytics.sharedInstance().throwException()
64+
fatalError("revealedDocumentURL is null")
6565

6666
return
6767
}

OpenDocumentReader/AppType.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Foundation
2+
3+
enum AppType: String {
4+
case full = "at.tomtasche.reader"
5+
case lite = "at.tomtasche.reader.lite1"
6+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Foundation
2+
3+
struct ConfigurationManager {
4+
static let manager = ConfigurationManager()
5+
6+
private(set) var configuration: AppType!
7+
8+
private init () {
9+
10+
if let productId = Bundle.main.bundleIdentifier {
11+
configuration = AppType(rawValue: productId.lowercased()) ?? .lite
12+
}
13+
}
14+
}

OpenDocumentReader/Constants.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ class Constants {
2222
static let onboarding_image_2 = "onboard2"
2323
static let onboarding_image_3 = "onboard3"
2424
static let key_was_intro_watched = "wasIntroWatched"
25+
static let configurationFull = "Full"
26+
static let configurationLite = "Lite"
2527
}

0 commit comments

Comments
 (0)