Skip to content

Commit 73526d4

Browse files
author
Librelio Dev
committed
Implemented rtfd handling for html files
1 parent aa1b80d commit 73526d4

File tree

3 files changed

+127
-131
lines changed

3 files changed

+127
-131
lines changed

Classes/NSString+WAURLString.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,17 @@ - (NSString*) urlOfMainFileOfPackageWithUrlString{
279279
return ([NSString stringWithFormat:@"%@/%@.pdf",self,fileName]);
280280

281281
}
282+
else if ([extension isEqualToString:@"rtfd"]){
283+
return ([NSString stringWithFormat:@"%@/index.html",self]);
284+
}
282285
else{
283286
return self;
284287
}
285-
288+
286289
}
287290

288291

292+
289293
- (NSString *) urlOfUnzippedFolder{
290294
//If there is a waroot arg, use it
291295
NSString * baseUrl = [self valueOfParameterInUrlStringforKey:@"waroot"];

Librelio.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@
195195
142EBBE61A2E5F5E00BBDD97 /* d3.v3.min.js in Resources */ = {isa = PBXBuildFile; fileRef = 142EBBE31A2E5F5E00BBDD97 /* d3.v3.min.js */; };
196196
142EBBE71A2E5F5E00BBDD97 /* d3.tip.v0.6.3.js in Resources */ = {isa = PBXBuildFile; fileRef = 142EBBE41A2E5F5E00BBDD97 /* d3.tip.v0.6.3.js */; };
197197
142EBBE91A2E5F7000BBDD97 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 142EBBE81A2E5F7000BBDD97 /* index.html */; };
198+
142EBBEA1A2F588A00BBDD97 /* WAURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 14D8296B19A2098E0059F3E0 /* WAURLProtocol.m */; };
198199
144B2C5218229DE200CDD200 /* calendar.png in Resources */ = {isa = PBXBuildFile; fileRef = 144B2C4718229DE200CDD200 /* calendar.png */; };
199200
144B2C5318229DE200CDD200 /* calendar.png in Resources */ = {isa = PBXBuildFile; fileRef = 144B2C4718229DE200CDD200 /* calendar.png */; };
200201
144B2C5518229DE200CDD200 /* calendar@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 144B2C4818229DE200CDD200 /* calendar@2x.png */; };
@@ -2081,6 +2082,7 @@
20812082
142EBB5C1A2B018C00BBDD97 /* WAOperationsManager.m in Sources */,
20822083
142EBB5D1A2B018C00BBDD97 /* WARSSBackViewController.m in Sources */,
20832084
142EBB5E1A2B018C00BBDD97 /* WARSSParser.m in Sources */,
2085+
142EBBEA1A2F588A00BBDD97 /* WAURLProtocol.m in Sources */,
20842086
142EBB5F1A2B018C00BBDD97 /* WAPDFParserView.m in Sources */,
20852087
142EBB601A2B018C00BBDD97 /* WAThumbnailCell.m in Sources */,
20862088
142EBB611A2B018C00BBDD97 /* unzip.c in Sources */,

ReaderTarget/Application.plist

Lines changed: 120 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,124 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
4-
<dict>
5-
<key>CFBundleDevelopmentRegion</key>
6-
<string>fr_FR</string>
7-
<key>CFBundleDisplayName</key>
8-
<string>Librelio Reader</string>
9-
<key>CFBundleExecutable</key>
10-
<string>${EXECUTABLE_NAME}</string>
11-
<key>UTExportedTypeDeclarations</key>
12-
<array>
13-
<dict>
14-
<key>UTTypeIdentifier</key>
15-
<string>com.librelio.sqlite</string>
16-
<key>UTTypeDescription</key>
17-
<string>SQLite databases</string>
18-
<key>UTTypeConformsTo</key>
19-
<array>
20-
<string>public.database</string>
21-
<string>public.data</string>
22-
</array>
23-
<key>UTTypeTagSpecification</key>
24-
<dict>
25-
<key>public.filename-extension</key>
26-
<array>
27-
<string>sqlite</string>
28-
</array>
29-
<key>public.mime-type</key>
30-
<array>
31-
<string>application/x-sqlite3</string>
32-
<string>application/octet-stream</string>
33-
</array>
34-
</dict>
35-
</dict>
36-
</array>
37-
<key>CFBundleDocumentTypes</key>
38-
<array>
39-
<dict>
40-
<key>CFBundleTypeName</key>
41-
<string>PDF</string>
42-
<key>LSHandlerRank</key>
43-
<string>Alternate</string>
44-
<key>LSItemContentTypes</key>
45-
<array>
46-
<string>com.adobe.pdf</string>
47-
</array>
48-
</dict>
49-
<dict>
50-
<key>CFBundleTypeName</key>
51-
<string>Package</string>
52-
<key>LSHandlerRank</key>
53-
<string>Alternate</string>
54-
<key>LSItemContentTypes</key>
55-
<array>
56-
<string>com.apple.plugin</string>
57-
<string>com.apple.photo.library</string>
58-
</array>
59-
</dict>
60-
<dict>
61-
<key>CFBundleTypeName</key>
62-
<string>SQLite</string>
63-
<key>LSHandlerRank</key>
64-
<string>Alternate</string>
65-
<key>LSItemContentTypes</key>
66-
<array>
67-
<string>com.librelio.sqlite</string>
68-
</array>
69-
</dict>
70-
</array>
71-
<key>CFBundleIcons</key>
72-
<dict>
73-
<key>CFBundlePrimaryIcon</key>
74-
<dict>
75-
<key>CFBundleIconFiles</key>
76-
<array>
77-
<string>Icon.png</string>
78-
<string>Icon@2x.png</string>
79-
<string>Icon-72.png</string>
80-
<string>Icon-72@2x.png</string>
81-
<string>Icon-60@2x.png</string>
82-
<string>Icon-76.png</string>
83-
<string>Icon-76@2x.png</string>
84-
</array>
85-
</dict>
86-
</dict>
87-
<key>CFBundleIdentifier</key>
88-
<string>com.widgetavenue.pdfbrowser</string>
89-
<key>CFBundleInfoDictionaryVersion</key>
90-
<string>6.0</string>
91-
<key>CFBundleName</key>
92-
<string>Librelio Reader</string>
93-
<key>CFBundlePackageType</key>
94-
<string>APPL</string>
95-
<key>CFBundleShortVersionString</key>
96-
<string>3.0.6</string>
97-
<key>CFBundleSignature</key>
98-
<string>????</string>
99-
<key>CFBundleURLTypes</key>
100-
<array>
101-
<dict>
102-
<key>CFBundleURLName</key>
103-
<string>com.widgetavenue.pdfbrowser</string>
104-
<key>CFBundleURLSchemes</key>
105-
<array>
106-
<string>librelio</string>
107-
</array>
108-
</dict>
109-
</array>
110-
<key>CFBundleVersion</key>
111-
<string>316</string>
112-
<key>LSRequiresIPhoneOS</key>
113-
<true/>
114-
<key>NSMainNibFile</key>
115-
<string></string>
116-
<key>NSMainNibFile~ipad</key>
117-
<string></string>
118-
<key>UIFileSharingEnabled</key>
119-
<true/>
120-
<key>UIPrerenderedIcon</key>
121-
<true/>
122-
<key>UIStatusBarHidden</key>
123-
<true/>
124-
<key>UISupportedInterfaceOrientations</key>
125-
<array>
126-
<string>UIInterfaceOrientationPortrait</string>
127-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
128-
<string>UIInterfaceOrientationLandscapeLeft</string>
129-
<string>UIInterfaceOrientationLandscapeRight</string>
130-
</array>
131-
<key>UIViewControllerBasedStatusBarAppearance</key>
132-
<false/>
133-
</dict>
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>fr_FR</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>Librelio Reader</string>
9+
<key>CFBundleExecutable</key>
10+
<string>${EXECUTABLE_NAME}</string>
11+
<key>UTExportedTypeDeclarations</key>
12+
<array>
13+
<dict>
14+
<key>UTTypeIdentifier</key>
15+
<string>com.librelio.sqlite</string>
16+
<key>UTTypeDescription</key>
17+
<string>SQLite databases</string>
18+
<key>UTTypeConformsTo</key>
19+
<array>
20+
<string>public.database</string>
21+
<string>public.data</string>
22+
</array>
23+
<key>UTTypeTagSpecification</key>
24+
<dict>
25+
<key>public.filename-extension</key>
26+
<array>
27+
<string>sqlite</string>
28+
</array>
29+
<key>public.mime-type</key>
30+
<array>
31+
<string>application/x-sqlite3</string>
32+
<string>application/octet-stream</string>
33+
</array>
34+
</dict>
35+
</dict>
36+
</array>
37+
<key>CFBundleDocumentTypes</key>
38+
<array>
39+
<dict>
40+
<key>CFBundleTypeName</key>
41+
<string>PDF</string>
42+
<key>LSHandlerRank</key>
43+
<string>Alternate</string>
44+
<key>LSItemContentTypes</key>
45+
<array>
46+
<string>com.adobe.pdf</string>
47+
</array>
48+
</dict>
49+
<dict>
50+
<key>CFBundleTypeName</key>
51+
<string>Package</string>
52+
<key>LSHandlerRank</key>
53+
<string>Alternate</string>
54+
<key>LSItemContentTypes</key>
55+
<array>
56+
<string>com.apple.plugin</string>
57+
<string>com.apple.rtfd</string>
58+
</array>
59+
</dict>
60+
</array>
61+
<key>CFBundleIcons</key>
62+
<dict>
63+
<key>CFBundlePrimaryIcon</key>
64+
<dict>
65+
<key>CFBundleIconFiles</key>
66+
<array>
67+
<string>Icon.png</string>
68+
<string>Icon@2x.png</string>
69+
<string>Icon-72.png</string>
70+
<string>Icon-72@2x.png</string>
71+
<string>Icon-60@2x.png</string>
72+
<string>Icon-76.png</string>
73+
<string>Icon-76@2x.png</string>
74+
</array>
75+
</dict>
76+
</dict>
77+
<key>CFBundleIdentifier</key>
78+
<string>com.widgetavenue.pdfbrowser</string>
79+
<key>CFBundleInfoDictionaryVersion</key>
80+
<string>6.0</string>
81+
<key>CFBundleName</key>
82+
<string>Librelio Reader</string>
83+
<key>CFBundlePackageType</key>
84+
<string>APPL</string>
85+
<key>CFBundleShortVersionString</key>
86+
<string>3.0.6</string>
87+
<key>CFBundleSignature</key>
88+
<string>????</string>
89+
<key>CFBundleURLTypes</key>
90+
<array>
91+
<dict>
92+
<key>CFBundleURLName</key>
93+
<string>com.widgetavenue.pdfbrowser</string>
94+
<key>CFBundleURLSchemes</key>
95+
<array>
96+
<string>librelio</string>
97+
</array>
98+
</dict>
99+
</array>
100+
<key>CFBundleVersion</key>
101+
<string>316</string>
102+
<key>LSRequiresIPhoneOS</key>
103+
<true/>
104+
<key>NSMainNibFile</key>
105+
<string></string>
106+
<key>NSMainNibFile~ipad</key>
107+
<string></string>
108+
<key>UIFileSharingEnabled</key>
109+
<true/>
110+
<key>UIPrerenderedIcon</key>
111+
<true/>
112+
<key>UIStatusBarHidden</key>
113+
<true/>
114+
<key>UISupportedInterfaceOrientations</key>
115+
<array>
116+
<string>UIInterfaceOrientationPortrait</string>
117+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
118+
<string>UIInterfaceOrientationLandscapeLeft</string>
119+
<string>UIInterfaceOrientationLandscapeRight</string>
120+
</array>
121+
<key>UIViewControllerBasedStatusBarAppearance</key>
122+
<false/>
123+
</dict>
134124
</plist>

0 commit comments

Comments
 (0)