Skip to content

Commit

Permalink
Stops assuming annotations store will be initialized
Browse files Browse the repository at this point in the history
Adds issue template
  • Loading branch information
pushchris committed Feb 17, 2017
1 parent ab8bb9b commit f62d11d
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!— Provide a general summary of the issue in the Title above —>

## Expected Behavior
<!— If you’re describing a bug, tell us what should happen —>
<!— If you’re suggesting a change/improvement, tell us how it should work —>

## Current Behavior
<!— If describing a bug, tell us what happens instead of the expected behavior —>
<!— If suggesting a change/improvement, explain the difference from current behavior —>

## Steps to Reproduce (for bugs)
<!— Provide a link to a live example, or an unambiguous set of steps to —>
<!— reproduce this bug. Include code to reproduce, if relevant —>
1.
2.
3.
4.


## Your Environment
<!— Include as many relevant details about the environment you experienced the bug in —>
* iOS Version:
* Xcode Version:
* Swift Version:
25 changes: 25 additions & 0 deletions Example/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!— Provide a general summary of the issue in the Title above —>

## Expected Behavior
<!— If you’re describing a bug, tell us what should happen —>
<!— If you’re suggesting a change/improvement, tell us how it should work —>

## Current Behavior
<!— If describing a bug, tell us what happens instead of the expected behavior —>
<!— If suggesting a change/improvement, explain the difference from current behavior —>

## Steps to Reproduce (for bugs)
<!— Provide a link to a live example, or an unambiguous set of steps to —>
<!— reproduce this bug. Include code to reproduce, if relevant —>
1.
2.
3.
4.


## Your Environment
<!— Include as many relevant details about the environment you experienced the bug in —>
* UXMPDF Version:
* iOS Version:
* Xcode Version:
* Swift Version:
4 changes: 4 additions & 0 deletions Example/UXMPDFKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
614D2EE31C8C8A9A00A856CD /* sample.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 614D2EE21C8C8A9A00A856CD /* sample.pdf */; };
616B61061CF7395100B743A7 /* sample2.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 616B61051CF7395100B743A7 /* sample2.pdf */; };
61C453CD1E5758B500A7BC7B /* ISSUE_TEMPLATE.md in Sources */ = {isa = PBXBuildFile; fileRef = 61C453CC1E5758B500A7BC7B /* ISSUE_TEMPLATE.md */; };
61CBF9411D86EB7F00282554 /* sample3.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 61CBF9401D86EB7F00282554 /* sample3.pdf */; };
61D3B3771CDE9C1600E7C3A6 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61D3B3761CDE9C1600E7C3A6 /* ExampleViewController.swift */; };
/* End PBXBuildFile section */
Expand All @@ -33,6 +34,7 @@
611BF2C21D08B78100F863A4 /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Package.swift; path = ../Package.swift; sourceTree = "<group>"; };
614D2EE21C8C8A9A00A856CD /* sample.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = sample.pdf; sourceTree = "<group>"; };
616B61051CF7395100B743A7 /* sample2.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = sample2.pdf; sourceTree = "<group>"; };
61C453CC1E5758B500A7BC7B /* ISSUE_TEMPLATE.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = ISSUE_TEMPLATE.md; sourceTree = "<group>"; };
61CBF9401D86EB7F00282554 /* sample3.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = sample3.pdf; sourceTree = "<group>"; };
61D3B3761CDE9C1600E7C3A6 /* ExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = "<group>"; };
A9FF669EE8472D82692EADE4 /* Pods-UXMPDFKit_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UXMPDFKit_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-UXMPDFKit_Example/Pods-UXMPDFKit_Example.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -102,6 +104,7 @@
children = (
2796C7F95FF0FCF4538111B7 /* UXMPDFKit.podspec */,
21803DAC4DC99E3892836720 /* README.md */,
61C453CC1E5758B500A7BC7B /* ISSUE_TEMPLATE.md */,
E9B04CB08B51CFCD484BF776 /* LICENSE */,
611BF2C21D08B78100F863A4 /* Package.swift */,
);
Expand Down Expand Up @@ -252,6 +255,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
61C453CD1E5758B500A7BC7B /* ISSUE_TEMPLATE.md in Sources */,
607FACD81AFB9204008FA782 /* ViewController.swift in Sources */,
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
61D3B3771CDE9C1600E7C3A6 /* ExampleViewController.swift in Sources */,
Expand Down
7 changes: 6 additions & 1 deletion Pod/Classes/Renderer/PDFDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ open class PDFDocument: NSObject, NSCoding {
self.currentPage = aDecoder.decodeInteger(forKey: "currentPage")
self.bookmarks = aDecoder.decodeObject(forKey: "bookmarks") as! NSMutableIndexSet
self.lastOpen = aDecoder.decodeObject(forKey: "lastOpen") as? Date
self.annotations = aDecoder.decodeObject(forKey: "annotations") as! PDFAnnotationStore
if let annotations = aDecoder.decodeObject(forKey: "annotations") as? PDFAnnotationStore {
self.annotations = annotations
}
else {
self.annotations = PDFAnnotationStore()
}

super.init()
}
Expand Down
2 changes: 1 addition & 1 deletion UXMPDFKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "UXMPDFKit"
s.version = "0.6.3"
s.version = "0.6.4"
s.summary = "A fully functioning PDF reader written completely in Swift"

s.homepage = "https://github.com/uxmstudio/UXMPDFKit"
Expand Down

0 comments on commit f62d11d

Please sign in to comment.