UPDATE: User @Bogdan Cuza helped me to find an issue running this code on a real device (showing a blank screen instead of the PDF). You can see more details here: twitter.com/swiftandtips/status/1413962229968510978 Here's the solution: kzitem.info/news/bejne/sKh90JyCinqgZmk
@akrep55tr
3 жыл бұрын
Very good video. It is a very valuable video on UIViewControllerRepresentable and UIViewRepresentable. Thanks.
@FernandoZafe
3 жыл бұрын
Excelente Pedro. Claro como el agua.
@swiftandtips
3 жыл бұрын
Muchas gracias @Fernando 😁!
@rtjh045h
7 ай бұрын
Tell me how you can add your own menu item to the standard menu when selecting text in pdfview
@mrondeu
8 ай бұрын
How can I get a list of pdf files from a website? List on the app and save on the app when downloaded!
@swiftandtips
8 ай бұрын
What have you found yet?
@shitoumoss
11 ай бұрын
Thanks for the video, it work on simulator, but it do not work on my phone ios17, is this a known bugs ?
@swiftandtips
11 ай бұрын
Check out this link and the pinned comment at the top: x.com/swiftandtips/status/1413962229968510978?s=20 Here’s the fix: kzitem.info/news/bejne/sKh90JyCinqgZmksi=yGPsayxxndB7xofm Thanks for your comment!
@opsenpai8818
3 жыл бұрын
Hi. Thanks for the great video. But I ran into problem. I did exactly the same as you but somehow the sheet for PDFComponent only shows blank sheet. Any idea why is this happening?
@swiftandtips
3 жыл бұрын
Hi @OP, actually other people reported me the same issue and I made a video explaining why: kzitem.info/news/bejne/sKh90JyCinqgZmk It is tricky without enough context, but once you get the idea is very easy! Let me know if that helped you :)
@opsenpai8818
3 жыл бұрын
@@swiftandtips Yes! It really helped! Thank you very much :D
@techme_blog
2 жыл бұрын
Hi!! Very useful!!! Thanks! I got a blank page but after reading & debugging I found out about the security thing, which I saw already it is in the comments. However I have a different issue. I tried to store de URL so I can access later, it doesn’t seem to be working, I don’t get why. I guess something to do again with security but I haven’t achieve anything yet!
@swiftandtips
2 жыл бұрын
Hi Diego, thank you for your comment! Did you check the links in the description of this video? kzitem.info/news/bejne/sKh90JyCinqgZmk There was some additional steps to access the URL later.
@techme_blog
2 жыл бұрын
@@swiftandtips hey, man. Thanks for the replay. I watched your video… I’ll try it out later, I am not sure it’ll work for me tho. However your videos are really helpful, man! Thanks!
@techme_blog
2 жыл бұрын
@@swiftandtips hey, man. So I checked the video again to try it out. The first option was to do it as it was on minute 7:48. I had it something like that before but you did it better. & with that approach it kinda works, however if it is been a while or I close the app. I cannot open it again, it shows a blank page. I know for sure the url is stored correctly it just won’t open, & that is my issue. & the second option is to do it all the way to the end of the video in which is actually passing the file itself, with this approach I would need to store the actual file right? & I don’t want to do that. Do you have any advise for any of those options?
@swiftandtips
2 жыл бұрын
hmm, Did you try using NSFileCoordinator? developer.apple.com/documentation/uikit/view_controllers/providing_access_to_directories This is the ultimate way to access a url document secure. Check out “Save the URL as a Bookmark”: To access the URL in the future, save the URL as a minimalBookmark using its bookmarkData(options:includingResourceValuesForKeys:relativeTo:) method. I haven’t explored it in detail, but looks like the right way to do it.
@techme_blog
2 жыл бұрын
@@swiftandtips thanks, man! Really appreciate it. I’ll give it a try. Looks promising
@BogdanCuza
3 жыл бұрын
Hi! First of all, thanks for the wonderful tutorial. For some reason, when I run this on my iPhone, I'm not able to actually access the resource at the URL provided by the document picker. I just get a blank sheet, instead of the PDF preview. I tried to run startAccessingSecurityScopedResource() but it still doesn't work :/
@swiftandtips
3 жыл бұрын
Hi @Bogdan, good catch! I will debug the issue and update the description with the solution 🤓. thank you for the support! 😃
@swiftandtips
3 жыл бұрын
Hey @Bogdan! After HOURS of debugging, I finally could find the issue. Don't copy the url to work, instead, use the document itself. Check it out my thread: twitter.com/swiftandtips/status/1413962229968510978 I will create a follow up video pretty soon, Thank you for the finding!!
@BogdanCuza
3 жыл бұрын
@@swiftandtips Exactly! In my case, I used the security scoped resource access to copy the data from the file to my app’s document directory where there would be no sandboxing issues (I need to have constant access to the file). BTW, it’s also nice to combine this approach with quicklook (which is what I used instead of PDFkit eventually). Basically, in the end you get a 100-line Walmart version of the files app 😹😹
@swiftandtips
3 жыл бұрын
Here's the solution: kzitem.info/news/bejne/sKh90JyCinqgZmk Thank you so much for your help! ☺️
@BogdanCuza
3 жыл бұрын
@@swiftandtips awesome explanation!! Thank you
@sho98765
3 жыл бұрын
is it possible to print a pdf file in the app?
@swiftandtips
3 жыл бұрын
Hi @Shadan, actually yes! One way to do it easily setting up share button API. Check this out: developer.apple.com/design/human-interface-guidelines/ios/extensions/sharing-and-actions/
Пікірлер: 28