How can i Load and save pdf on iPhone simulator 5.0 - pdf

Like in iPhone simulator we can drag and drop an image and store it in photo library by double clicking and saving. How can we store pdf formatted files in iPhone simulator version 5.0 specifically.

I can't speak for iOS simulator v5 but in 7.1 you can simply drag your PDF to an open simulator. The PDF will open in safari where you can either save it your home screen or bookmark it. Alternatively, you could type the file path into the URL bar ala:
file:///Users/claristhecowdog/Documents/ImACowImADog.pdf

What you want is in the NSFileManager APIs. "… from library or something like that" is too vague - where exactly will the PDF come from? Did your application download it? Are you saving it correctly to your own application's sandbox (i.e., in the Documents directory)? iPhoto Library does not handle PDFs (only images), so for PDFs (and all other non-picture types) you have to handle storing/finding it yourself.

Related

iPhone: bulk move ALL voice memos + ALL pdfs generated from Safari page prints (pdf-exports using "Books") to pc

voice memos:
I have 100s of voice memos that I recorded using the Apple voice recorder standard app and I want to get them on my pc altogether in one go.
pdfs:
I often save mobile Safari pages as Books which are then automatically saved (very quickly and well-formatted) as pdfs. On a website opened in Safari, you can choose the "send to"- button and then the orange Symbol for books. I have houndreds of self-generated pdfs in ibooks, and I have googled and tested for a longer time how to transfer them to my pc (see the details of these tests in the answer section).
Is there any trick to bulk move ALL voice memos in just one go + ALL pdfs in Books to the pc in just one go? I am happy about ANY way to reach this.
Please mind: I do not want to save every voice memo / pdf, piece by piece, in a cloud or app nor send each of them, piece by piece, by mail. This costs too much time and nerves and is not a bulk move.
I found a working solution in Decipher Backup Browser 14. This program might not be the only one achieving the aim, but it does the thing. Whoever finds other programs, please add an answer.
It simply reads out the data from the iPhone backup that you can create with iTunes. The program offers extracting all voice memos, as well as extracting all PDFs in "All PDFs in Backup". In the full version, you can then save them in one go to your pc. Thanks go to the pragmatic e-mail help including the screenshot.
Another possible solution perhaps is to sync your iBooks with iCloud - perhaps, because there is no working test, neither on Windows nor on macOS.
#### Testing the sync of the Safari pdfs:
(I originally got the info of the possible sync on macOS from the Decipher company, but I assume this is a simple misunderstanding or outdated.)
I sync iBooks with iCloud, iBooks are part of iCloud's "Manage Storage" option in my iPhone Settings, and still I do not see the pdfs there. On Windows, I do not see any iBooks sign at all in iCloud. iBooks is supposed to be hidden in iCloud Drive according to https://apple.stackexchange.com/questions/296462/locating-the-ibooks-folder-in-icloud-drive?newreg=1d6ae7995129403b99e57fe74feae430, but I could not succeed with the help of that link, the answers there are for Apple macOS command line (macOS bash). Then an additional investigation turned out that even if there were a hidden folder on Windows (which does not), it would not help: #ankii was so kind to test this on macOS, the needed pdfs cannot be seen in the macOS hidden iBooks folder either. See https://apple.stackexchange.com/questions/395290/locating-the-ibooks-folder-in-icloud-drive-on-windows, #ankii:
I exported a wikipedia page to iOS iBooks, as pdf. It shows up on iOS
app. but not on Mac app. that is weird.
Please, if anyone has managed this iCloud sync on Windows or macOS, answer here, but it seems as if there is no solution.
####
The simple reason why all of the normal file transfer tools cannot help, but only those which give you the contents of the iTunes backup, is because the needed pdfs ARE only in the backup. :)
When you delete such a "Safari-pdf", it will ask you whether you want to delete this from iCloud or if you only want to delete it from the downloads. That is just the standard question for the real e-books, while the "Safari-pdfs" that this thread is about are not part of iCloud anyway.
And it seems as if this will not change in the future, according to https://discussions.apple.com/thread/251534441 discussion results.
##################### Finally:
After having saved all of the PDFs, deleting them in two alternatives:
Books > Library > Edit > "Select All" on the left (you may also do this inside a specific collection only so that you can filter what you want to delete, you can also multi-select PDFs manually instead of "Select All")
or delete all by going to Settings --> Passwords & Accounts --> iCloud --> iCloud --> Manage Storage --> Apple Books (mind there are 2 of them, take the first one) --> Delete Documents & Data
#
#
#
Additional documentation
##########################################################################
Proof that the bulk move cannot be done without a 3rd party app.
I have tried several 3rd party programs to transfer the pdfs, but none of them find the Safari pdf prints, they only find just the commercial e-books. iTunes does not find them either.
I was asked by a moderator to move the details of what I have already tried to reach a bulk move - and which were at first part of the question - to this answer. This was tested in 04/2020, but the problem will still be the same.
##########################################################################
iPhone 7, iOS 13.4.1 transfer iBooks pdfs to Windows 10
either with 3rd party apps or iTunes v. 12.10.5.12
result: nothing works, only workaround is using Adobe Acrobat or
iCloud Drive going through each single pdf
Unsuccessful try only using iBooks and iTunes:
In iTunes, clicking on your phone symbol, the iTunes pane that appears has a lot of options like overview, music, films... and also third party apps like kindle or acrobat in the last menu point, but there is no iBooks anywhere.
In the main menu, iBooks folder is empty. Right-click on iBooks and "transfer purchases" leads to nothing, of course: I have not bought any pdf, but just printed it from safari. In the settings, in "iTunes and App Store" make sure that "iBooks and audiobooks" are switched on for automatic download.
Third party apps fail to show iBooks' Safari pdf prints:
Tested up to now (few of so many): iMazing, iExplorer, easeus, ApowerManager, Phonepaw, iTools 4.4.5.8
Only those pdfs that you had actually added from the pc to the phone
are also in the books folder in the third party apps.
Those pdfs that are just printed pdfs from safari websites do not appear in the third party apps of iTunes.
iCloud Drive or Adobe Acrobat app: The current workaround which takes too much time and nerves:
Adobe Acrobat v. 20.04.00 app on the iPhone, click on every pdf's 3 dots in the overview in iBooks, save it in Acrobat. Then use iTunes, clicking on your Phone symbol, use the last menu point to get to Acrobat 3rd party app and then mark all pdfs and save them to a folder on your pc.
You can also use iCloud Drive, AirDrop or the like, works the same and does not need iTunes. Make sure that in your iPhone preferences, iBooks --> iCloud Drive is switched on (this is the standard anyway). Still the same issue with any such solution: no bulk move possible.
In Books, use the "Save to Files" option. Afterwards, follow these directions.

save pdf on ipad memory and not in my documents directory

I created a pdf file in ios using objective-C and is able to save it in my applications Document directory.
I wanted to know if it is possible to save the generated pdf in the ipad memory, so that i do not need my application to show the generated pdf. In other words I do not want to store it in the documents directory but somewhere on the ipad.
I might not be fully understanding what you are asking but; You can transfer PDF's directly to the iPad via regular cable syncing/itunes so it can be viewed in iBooks on the ipad. Just drag the PDF into itunes, it goes to books section and you can sync it.

iTunes Connect sends email about a issue with icon file, how to fix?

This is the email:
Dear developer,
We have discovered one or more issues with your recent binary submission for "Bla". Before your app can be reviewed, the following issues must be corrected:
Corrupt Icon File - The icon file 72 x 72.png appears to be corrupt.
Once these issues have been corrected , go to the Version Details page and click Ready to Upload Binary. Continue through the submission process until the app status is Waiting for Upload and then use Application Loader to upload the corrected binary.
I have change the file and re-upload the app, but I got the email again.
As Michael Dautermanm says.
Make sure "compress png's" is turned off in the build settings.
thanks
Can you open the file in Preview, and choose 'Tools' -> 'Show Inspector'? The file may be using some PNG format features that Apple don't like. They want RGB, 8 bit depth, no alpha. See the Custom Icon and Image Creation Guidelines.
For comparison, here are screenshots of the Preview Inspector, showing properties of an icon for an app that was accepted. If you're unsure, post similar screenshots for the properties of your picture.
The "Pixels Per Meter" part may or may not appear. It wasn't there when I first opened some icon files five minutes ago, and now it appears for every PNG I open. Weird.
Edit: also check the icon entries in your 'Info.plist', or the 'Info' tab for your Target. (These are not the same thing, as I just spent several hours discovering. Settings in the 'Info' tab override your 'Info.plist'.) As of the iOS 5.1 SDK, these include Icon file (a string), Icon files (an array), and Icon files (iOS 5) (a dictionary containing at least one dictionary containing an array). XCode seems to add your launch images to this list too. Don't rely on it to keep the list tidy - I have sometimes found outdated filenames in mine.
For further comparison, here's what ended up in the Info.plist of a valid app. Your filenames may be different, as long as they match the resources in your project.
I'm the developer of the app Pillboxie. I have been having the same issue as you, but I believe I may have finally found a solution.
Before proceeding with my suggestion, make sure that your Info.plist and all icon filenames appear exactly as Apple requires. Keep checking the documentation to make sure you're up-to-date, but Dondragmer's recommendation looks correct to me.
I created all my image resources, including app icons, in Photoshop, exporting for web as PNG-24's. Because Pillboxie has numerous images, setting "Compress png's" to YES in the build settings helps me save several megabytes of space. I was getting the same error as you until I tried turning off this compression, as Evaristoyok suggests. However, my app jumped up several mb. I hoped to find a better way.
Tonight I found the following link: article. In it the author suggests to make sure that "Interlaced" is NOT selected in Photoshop when exporting images in the Save For Web & Devices dialog window. I re-exported all icon and launch images with this disabled, and it solved my issue. I was able to submit my app and still leave png compression enabled.

QuickLook Preview Panel

I'm looking for some examples on how to use the QuickLook preview feature. I have an URL for a file on the hard drive and want to achieve the same functionality as pressing the 'Space' key in finder on a file or folder and get a preview windows on top of all windows.
From what i've read in the quickLook API, QLPreviewRequest returns a preview of the file.
Now the question raises, do i have to design my own window/panel for presenting the preview in or is there a way to do that automatically ?
The QLPreviewRequest stuff is for writing a QuickLook plug-in. To present a QuickLook panel from an app, look at the QLPreviewPanel class.

Open a PDF file in an external app on iPad

I'd like to make my app to open a specified PDF by an external app of the user's choice on the iPad. How can I do that? Or, is there any open-source PDF reader framework available so that I can put it into my app?
My situation in more detail:
I'm thinking of porting to the iPad from OS X / rewriting from scratch for the iPad an app which manages lots of PDFs (journal articles, etc.), but I don't want to write the PDF reader part, because there are many good ones already out there; I don't want to reinvent the wheels.
(You might say you shouldn't reinvent pdf management apps, but I'd like to make one as a front end to SPIRES, and there isn't one so far.)
As the app would be a front end to a serious reading activity, UIWebView's pdf capability is not enough.
Also, users of my app would have various preferences which app to use.
That's the background behind my question. Thanks in advance!
Here's my self-answer:
Use UIDocumentInteractionController. See this Apple doc.
The problem now is to find a way to choose programmatically exactly with which app you open a document, when multiple apps are available to a same file type.
Its not that hard to view PDFs without a UIWebView. You use some Quarts 2D drawing but a large majority of the work is done for you. You mainly have to choose how you will flip pages, and do pinch to zoom.
Quarts 2D PDF reference
You aren't able to search inside of PDF files. You can't access the text. You could do annotation, but it would be a hack at best.