Skip to content

Commit

Permalink
Workaround: add dynamic UTIs in case plugin fails to register its own…
Browse files Browse the repository at this point in the history
… type, closes #1
  • Loading branch information
bfabiszewski committed Dec 25, 2016
1 parent 1a5b92b commit 3b6303a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
8 changes: 5 additions & 3 deletions QLMobi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
15DD6F5F1BA48FF400336FF5 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = Bartek;
TargetAttributes = {
15DD6F671BA48FF400336FF5 = {
Expand Down Expand Up @@ -218,8 +218,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
Expand Down Expand Up @@ -278,8 +280,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
Expand Down Expand Up @@ -320,7 +324,6 @@
15DD6F761BA48FF400336FF5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = QLMobi/Info.plist;
Expand All @@ -334,7 +337,6 @@
15DD6F771BA48FF400336FF5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = QLMobi/Info.plist;
Expand Down
10 changes: 8 additions & 2 deletions QLMobi/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
<key>LSItemContentTypes</key>
<array>
<string>net.fabiszewski.mobi</string>
<string>dyn.ah62d4rv4ge80455cre</string><!-- ?0=6:1=mobi -->
<string>dyn.ah62d4rv4ge80c8x1</string><!-- ?0=6:1=azw -->
<string>dyn.ah62d4rv4ge80c8x1gq</string><!-- ?0=6:1=azw3 -->
<string>dyn.ah62d4rv4ge80c8x1gu</string><!-- ?0=6:1=azw4 -->
<string>dyn.ah62d4rv4ge81a6xd</string><!-- ?0=6:1=prc -->
<string>dyn.ah62d4rv4ge81a3dc</string><!-- ?0=6:1=pdb -->
</array>
</dict>
</array>
Expand All @@ -24,11 +30,11 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>0.4</string>
<string>0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4</string>
<string>5</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ Source code is available on [github][qlmobi]. It is bundled as an Xcode project
![Finder preview](http://www.mobileread.com/forums/attachment.php?attachmentid=143433&d=1446545022)
![Finder thubmnails](http://www.mobileread.com/forums/attachment.php?attachmentid=143432&d=1446545022)

[libmobi]: https://github.com/bfabiszewski/libmobi
[binary]: https://github.com/bfabiszewski/QLMobi/releases/latest
[qlmobi]: https://github.com/bfabiszewski/QLMobi

### Troubleshooting

If the plugin doesn't work:
- reload plugins running `qlmanage -r` from the console;
- try reinstalling the plugin;
- try in the top level `Library` folder instead of the user's one;
- go to github [issues] tab, start new issue describing your problem, you may also provide output of the command: `qlmanage -d 4 -p -o /tmp /path/to/your/test.mobi`.

### Changelog
**0.5**
Minor workaround for plugin failing to register handled file types
Include minor fixes from current libmobi
**0.4**
Hide broken image links in corrupt documents
**0.3**
Expand All @@ -37,4 +45,7 @@ Initial version
Licensed under the [GNU Public License (GPL)](http://www.gnu.org/licenses/) version 3 or later.



[libmobi]: https://github.com/bfabiszewski/libmobi
[binary]: https://github.com/bfabiszewski/QLMobi/releases/latest
[qlmobi]: https://github.com/bfabiszewski/QLMobi
[issues]: https://github.com/bfabiszewski/QLMobi/issues

0 comments on commit 3b6303a

Please sign in to comment.