Skip to content

Commit dfdfd70

Browse files
authored
Merge pull request #75 from opendocument-app/development
v1.26
2 parents 6d71b02 + 1f0e6dd commit dfdfd70

20 files changed

Lines changed: 127 additions & 344 deletions

.github/workflows/ios_main.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push]
44
jobs:
55
test:
66
name: test
7-
runs-on: macos-latest
7+
runs-on: macos-11
88
steps:
99
- name: checkout
1010
uses: actions/checkout@v2
@@ -15,18 +15,19 @@ jobs:
1515
- name: pods
1616
run: pod install
1717

18-
- name: brew
19-
run: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
20-
- name: fix ninja install
21-
run: rm '/usr/local/bin/2to3'
22-
- name: ninja
23-
run: brew install ninja
2418
# https://stackoverflow.com/a/57758679/198996
2519
- name: bundler
2620
run: gem install bundler:1.17.3
2721
- name: fastlane
2822
run: bundle install
2923

24+
- name: pip
25+
run: python3 -m ensurepip
26+
- name: conan
27+
run: pip3 install conan
28+
- name: conan repo
29+
run: conan remote add odr https://odr.jfrog.io/artifactory/api/conan/odr-conan
30+
3031
- name: run tests
3132
run: bundle exec fastlane tests
3233
# - uses: actions/upload-artifact@v2

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,8 @@ fastlane/test_output
7070
.DS_Store
7171

7272
fastlane/report.xml
73+
74+
conanbuildinfo.*
75+
conaninfo.txt
76+
conan.lock
77+
graph_info.json

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "OpenDocument.core"]
2-
path = OpenDocument.core
3-
url = https://github.com/andiwand/OpenDocument.core.git
41
[submodule "ios-cmake"]
52
path = ios-cmake
63
url = https://github.com/leetal/ios-cmake.git

OpenDocument.core

Lines changed: 0 additions & 1 deletion
This file was deleted.

OpenDocumentReader.xcodeproj/project.pbxproj

Lines changed: 33 additions & 277 deletions
Large diffs are not rendered by default.

OpenDocumentReader/CoreWrapper.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ - (bool)translate:(NSString *)inputPath into:(NSString *)outputPath with:(NSStri
6363

6464
_pageNames = pageNames;
6565
_pagePaths = pagePaths;
66-
} catch (odr::UnknownFileType) {
66+
} catch (odr::UnknownFileType&) {
6767
_errorCode = @(-5);
6868
return false;
69-
} catch (odr::WrongPassword) {
69+
} catch (odr::WrongPassword&) {
7070
_errorCode = @(-2);
7171
return false;
7272
} catch (...) {

OpenDocumentReader/Document.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ class Document: UIDocument {
125125
delegate?.documentLoadingCompleted(self)
126126
}
127127

128+
override func handleError(_ error: Error, userInteractionPermitted: Bool) {
129+
Crashlytics.crashlytics().record(error: error)
130+
}
131+
128132
override func writeContents(_ contents: Any, to url: URL, for saveOperation: UIDocument.SaveOperation, originalContentsURL: URL?) throws {
129133
var diff = ""
130134

OpenDocumentReader/DocumentViewController.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
233233
webview?.evaluateJavaScript("odr.searchNext(\"" + searchText + "\")", completionHandler: { (value: Any!, error: Error!) -> Void in
234234
if error != nil {
235235
Crashlytics.crashlytics().record(error: error)
236-
fatalError("search failed")
237236
}
238237
})
239238
}
@@ -242,7 +241,6 @@ class DocumentViewController: UIViewController, DocumentDelegate, GADBannerViewD
242241
webview?.evaluateJavaScript("odr.search(\"" + searchText + "\")", completionHandler: { (value: Any!, error: Error!) -> Void in
243242
if error != nil {
244243
Crashlytics.crashlytics().record(error: error)
245-
fatalError("search failed")
246244
}
247245
})
248246
}

OpenDocumentReaderTests/OpenDocumentReaderTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ class OpenDocumentReaderTests: XCTestCase {
5656
var translatePath = URL(fileURLWithPath: NSTemporaryDirectory())
5757
translatePath.appendPathComponent("translate.html")
5858

59-
coreWrapper.translate(saveURL?.path, into: translatePath.path, at: 0, with: nil, editable: true)
59+
coreWrapper.translate(saveURL?.path, into: translatePath.path, with: nil, editable: true)
6060
XCTAssertNil(coreWrapper.errorCode)
6161

6262
var backTranslatePath = URL(fileURLWithPath: NSTemporaryDirectory())
6363
backTranslatePath.appendPathComponent("backtranslate.html")
6464

65-
let diff = "{\"modifiedText\":{\"3\":\"This is a simple test document to demonstrate the DocumentLoadewwwwr example!\"}}"
65+
let diff = "{\"modifiedText\":{\"/child:3/child:0\":\"This is a simple test document to demonstrate the DocumentLoaderwwww example!\"}}"
6666

6767
coreWrapper.backTranslate(diff, into: backTranslatePath.path)
6868
XCTAssertNil(coreWrapper.errorCode)

Podfile.lock

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
11
PODS:
2-
- Firebase/Analytics (8.9.0):
2+
- Firebase/Analytics (8.10.0):
33
- Firebase/Core
4-
- Firebase/Core (8.9.0):
4+
- Firebase/Core (8.10.0):
55
- Firebase/CoreOnly
6-
- FirebaseAnalytics (~> 8.9.0)
7-
- Firebase/CoreOnly (8.9.0):
8-
- FirebaseCore (= 8.9.0)
9-
- Firebase/Crashlytics (8.9.0):
6+
- FirebaseAnalytics (~> 8.10.0)
7+
- Firebase/CoreOnly (8.10.0):
8+
- FirebaseCore (= 8.10.0)
9+
- Firebase/Crashlytics (8.10.0):
1010
- Firebase/CoreOnly
11-
- FirebaseCrashlytics (~> 8.9.0)
12-
- Firebase/Storage (8.9.0):
11+
- FirebaseCrashlytics (~> 8.10.0)
12+
- Firebase/Storage (8.10.0):
1313
- Firebase/CoreOnly
14-
- FirebaseStorage (~> 8.9.0)
15-
- FirebaseAnalytics (8.9.0):
16-
- FirebaseAnalytics/AdIdSupport (= 8.9.0)
14+
- FirebaseStorage (~> 8.10.0)
15+
- FirebaseAnalytics (8.10.0):
16+
- FirebaseAnalytics/AdIdSupport (= 8.10.0)
1717
- FirebaseCore (~> 8.0)
1818
- FirebaseInstallations (~> 8.0)
1919
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
2020
- GoogleUtilities/MethodSwizzler (~> 7.6)
2121
- GoogleUtilities/Network (~> 7.6)
2222
- "GoogleUtilities/NSData+zlib (~> 7.6)"
2323
- nanopb (~> 2.30908.0)
24-
- FirebaseAnalytics/AdIdSupport (8.9.0):
24+
- FirebaseAnalytics/AdIdSupport (8.10.0):
2525
- FirebaseCore (~> 8.0)
2626
- FirebaseInstallations (~> 8.0)
27-
- GoogleAppMeasurement (= 8.9.0)
27+
- GoogleAppMeasurement (= 8.10.0)
2828
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
2929
- GoogleUtilities/MethodSwizzler (~> 7.6)
3030
- GoogleUtilities/Network (~> 7.6)
3131
- "GoogleUtilities/NSData+zlib (~> 7.6)"
3232
- nanopb (~> 2.30908.0)
33-
- FirebaseCore (8.9.0):
33+
- FirebaseCore (8.10.0):
3434
- FirebaseCoreDiagnostics (~> 8.0)
3535
- GoogleUtilities/Environment (~> 7.6)
3636
- GoogleUtilities/Logger (~> 7.6)
37-
- FirebaseCoreDiagnostics (8.9.0):
37+
- FirebaseCoreDiagnostics (8.10.0):
3838
- GoogleDataTransport (~> 9.1)
3939
- GoogleUtilities/Environment (~> 7.6)
4040
- GoogleUtilities/Logger (~> 7.6)
4141
- nanopb (~> 2.30908.0)
42-
- FirebaseCrashlytics (8.9.0):
42+
- FirebaseCrashlytics (8.10.0):
4343
- FirebaseCore (~> 8.0)
4444
- FirebaseInstallations (~> 8.0)
4545
- GoogleDataTransport (~> 9.1)
4646
- GoogleUtilities/Environment (~> 7.6)
4747
- nanopb (~> 2.30908.0)
4848
- PromisesObjC (< 3.0, >= 1.2)
49-
- FirebaseInstallations (8.9.0):
49+
- FirebaseInstallations (8.10.0):
5050
- FirebaseCore (~> 8.0)
5151
- GoogleUtilities/Environment (~> 7.6)
5252
- GoogleUtilities/UserDefaults (~> 7.6)
5353
- PromisesObjC (< 3.0, >= 1.2)
54-
- FirebaseStorage (8.9.0):
54+
- FirebaseStorage (8.10.0):
5555
- FirebaseCore (~> 8.0)
5656
- GTMSessionFetcher/Core (~> 1.5)
57-
- Google-Mobile-Ads-SDK (8.12.0):
57+
- Google-Mobile-Ads-SDK (8.13.0):
5858
- GoogleAppMeasurement (< 9.0, >= 7.0)
5959
- GoogleUserMessagingPlatform (>= 1.1)
60-
- GoogleAppMeasurement (8.9.0):
61-
- GoogleAppMeasurement/AdIdSupport (= 8.9.0)
60+
- GoogleAppMeasurement (8.10.0):
61+
- GoogleAppMeasurement/AdIdSupport (= 8.10.0)
6262
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
6363
- GoogleUtilities/MethodSwizzler (~> 7.6)
6464
- GoogleUtilities/Network (~> 7.6)
6565
- "GoogleUtilities/NSData+zlib (~> 7.6)"
6666
- nanopb (~> 2.30908.0)
67-
- GoogleAppMeasurement/AdIdSupport (8.9.0):
68-
- GoogleAppMeasurement/WithoutAdIdSupport (= 8.9.0)
67+
- GoogleAppMeasurement/AdIdSupport (8.10.0):
68+
- GoogleAppMeasurement/WithoutAdIdSupport (= 8.10.0)
6969
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
7070
- GoogleUtilities/MethodSwizzler (~> 7.6)
7171
- GoogleUtilities/Network (~> 7.6)
7272
- "GoogleUtilities/NSData+zlib (~> 7.6)"
7373
- nanopb (~> 2.30908.0)
74-
- GoogleAppMeasurement/WithoutAdIdSupport (8.9.0):
74+
- GoogleAppMeasurement/WithoutAdIdSupport (8.10.0):
7575
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
7676
- GoogleUtilities/MethodSwizzler (~> 7.6)
7777
- GoogleUtilities/Network (~> 7.6)
@@ -138,15 +138,15 @@ SPEC REPOS:
138138
- ScrollableSegmentedControl
139139

140140
SPEC CHECKSUMS:
141-
Firebase: 13d8d96499e2635428d5bf0ec675df21f95d9a95
142-
FirebaseAnalytics: 3a11ed901750e1ebcbe35e75915ff079878ea385
143-
FirebaseCore: 599ee609343eaf4941bd188f85e3aa077ffe325b
144-
FirebaseCoreDiagnostics: 5daa63f1c1409d981a2d5007daa100b36eac6a34
145-
FirebaseCrashlytics: 40efbd81157dae307ec95612fa1328347284d2c2
146-
FirebaseInstallations: caa7c8e0d3e2345b8829d2fa9ca1b4dfbf2fcc85
147-
FirebaseStorage: 452c98c31ccb40b819764bf3039426c4388d9939
148-
Google-Mobile-Ads-SDK: fb31b6ef68ef352b551ee29585cd9ceb07230cd0
149-
GoogleAppMeasurement: b54a857d347703d67c7a6f23713760c9bcfe9008
141+
Firebase: 44213362f1dcc52555b935dc925ed35ac55f1b20
142+
FirebaseAnalytics: 319c9b3b1bdd400d60e2f415dff0c5f6959e6760
143+
FirebaseCore: 04186597c095da37d90ff9fd3e53bc61a1ff2440
144+
FirebaseCoreDiagnostics: 56fb7216d87e0e6ec2feddefa9d8a392fe8b2c18
145+
FirebaseCrashlytics: 3b7f17cdf5bf1ae6ad5956696a6c26edeb39cca7
146+
FirebaseInstallations: 830327b45345ffc859eaa9c17bcd5ae893fd5425
147+
FirebaseStorage: 815410224b548172c578f02554a86bbc8f817f50
148+
Google-Mobile-Ads-SDK: 05e5d68bb42a61b2e5bef336a52789785605aa22
149+
GoogleAppMeasurement: a3311dbcf3ea651e5a070fe8559b57c174ada081
150150
GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940
151151
GoogleUserMessagingPlatform: ab890ce5f6620f293a21b6bdd82e416a2c73aeca
152152
GoogleUtilities: 684ee790a24f73ebb2d1d966e9711c203f2a4237
@@ -157,4 +157,4 @@ SPEC CHECKSUMS:
157157

158158
PODFILE CHECKSUM: 55a033d715a08541580f2abd7fcc12a2d724614e
159159

160-
COCOAPODS: 1.10.2
160+
COCOAPODS: 1.11.2

0 commit comments

Comments
 (0)