mysterioustrousers / MTPDF

Objective-C PDF objects. Doing my part to help us stay out of the headache that is Core Foundation.
MIT License
205 stars 28 forks source link

Fixed angled import in MTPDF.m #12

Closed OlafAndreas closed 8 years ago

OlafAndreas commented 8 years ago

This resolves an issue when using the MTPDF pod in a swift-based project(Not tested with objective-c), where the #import <NSDate+MTDates.h> fails due to a file not found issue.

This is due to the angled import in MTPDF.m which will look for the NSDate+MTDates.h in the same scope as the MTPDF.m file.

On a comment made by orta(CocoaPods member) on an issue for CocoaPods

In simplified: angled bracket imports are for externals, and should be scoped according to where they come from

Since the NSDate+MTDates.h lies within the MTDates pod. The import should be prepended with MTDates/ like this: #import <MTDates/NSDate+MTDates.h>

atomkirk commented 8 years ago

Yes! Great find! This is the idea fix for this I think. (and great to learn in general)

OlafAndreas commented 8 years ago

It looks like the MTPDF.podspec file, which I was testing with, got mixed into the pull request. Maybe you could clean that out and create a new podspec for the new release? Sorry for the trouble.