UIDocumentInteractionController does not open PDF, txt etc - ios

I am trying to implement UIDocumentInteractionController to show previous of some file in my app. The problem is that any files I checked so far PDFs, txts, docs etc. is not shown. The issue is that I can see UIDocumentInteractionController showing up, but the only thing I see is "Loading..." and spinning dialog. What is even more weird PNG files are loaded correctly and show up immediately.
I am using Xamarin.iOS (the newest stable release) and iOS 8.1.1.
Any of you has an idea why is that happening?

Related

Why do changes made to photos within the iOS simulator not persist?

I've recently been working with Apple's Photos framework, when I noticed that any changes made to PHAssets don't actually persist - the photo library kind of "glitches out" and a blank, grey space is left in the thumbnail view within my app.
Upon opening the Photos app, the view "resets" the thumbnail, but displays the original photo, and not the modifications I made within my app. Further, going into the native "editing" mode within the photos app revealed that those modifications were acknowledged, as there was a red "Revert" button available. Tapping it did nothing (since the photo displayed was already the original photo).
I decided to investigate this further. Even within the native Photos app, any filters or changes (such as straightening, cropping, etc) are ultimately not reflected within the Photos app. The changes are made, and then when tapping "done", the image reverts by itself to the original image. Changes are not kept!
However, after testing my app on a device, the app works fine! Changes are reflected immediately, and no "glitches" occur! Very weird!
I've tried resetting the simulator, and reinstalling Xcode (my version is 7.2). It might be important to note I've also tried on different simulators (iOS 9.1 & 9.2). Any ideas on why this is happening? Is it being experienced by others? Please share!
Thanks for reading!
UPDATE 1
At one point after making changes within the native Photos app, tapping "Done" yielded the following error message:
"There was an error saving this photo. Please try again later."

Changing old UI on Xcode to new UI

This is a newbie question. But I would like to change my old UI (pngs) on my current project to some new updated ones that are of similar size. Is there anyway to drag and drop the UI directly without affecting the actions so the buttons still work the same on the app. Or do you have to recode everything when you change UI? I'm not really sure the steps I need to do, but I have all the new UI ready to go. Can anybody guide me through these steps?
Another question is, I have a video editor and want to test out a video player in the simulator at run time, but right now I can see my music or video files because I don't have any in the simulator. How do I import these files into a project to test it out (on the computer), I know the camera roll on a phone would work.
If anybody can give me some guidance, I would greatly appreciate it. I know these are newbie questions.
Thanks,
If the new images are the same size of the old images, just rename the new images exactly like the old images and then overwrite the old images at the project's path.
And for the video files, drag the video files directly to the iOS simulator. The video will open in the Safari, click the share button in the tab bar of the safari and hit "Save Video".

iOS: Old Tab Bar Icons showing

So originally I made some custom tab bar icons that looked pretty neat, and I put them in my project. I recently just realized they look disgusting. So, I got some free tab bar icons and replaced the old ones. When the app loads, I at first see the old icons, then when the app is fully loaded I see my new icons. Now I don't want any user to see this. I then took action by permanently deleting the pictures not only from Xcode, but from my hard drive, which still did not fix the problem. I went to my DerivedData folder and emptied all my cache files. No success. This is a giant project and I don't want to have to make a new app, copy paste, make all the connections, and get all the frameworks again.
You said "when the app loads" you see the old icons. By any chance are you seeing this during load of the app, before it's actually usable, and as soon as the app becomes usable it's showing the new icons? I bet your default.png shows the old icons and you never updated it.

How to upload multiple pictures at once in itunesconnect?

How can I upload multiple pictures at once to my app details in itunesconnect? I remember that at some time it was possible via Safari and drag/dropping multiple pictures onto the 'choose picture'-button. Now (Mountain Lion, Safari 6.0.1) it isn´t anymore.
Any ideas on how to solve this? It´s really annoying to upload 15 pictures (iPhone, iPhone5, iPad) one after another.
I not sure if it was ever possible to upload multiple pictures at once. However, drag & drop (for single files) is still possible - it's just broken in Safari, which opens/displays the dragged file. In Firefox and Chrome, dropping an image file (e.g. some .png) on the "Choose File" button results in an upload.
Seems like apple removed this feature, for whatever reason.
Best you make a suggestion on iTunes Connect.
Just log in and click on "Contact Us" in the footer.
(I can't provide a link, because it varies)
You can't do that as i have tried up to 2 images

iOS 4.2.1 Mobile Safari won't show poster image

I've been working on an iPad-specific site that uses HTML5 video and though I've got video playback working, I can't for the life of me get the poster image to appear. It looks fine on Desktop Safari. Here's the code:
<video src="video/about_the_man.mp4" controls height=360 width=480 poster="video/posters/about_the_man.jpg"></video>
I've using this link as a reference (listing 1.2): https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/AudioandVideoTagBasics/AudioandVideoTagBasics.html#//apple_ref/doc/uid/TP40009523-CH2-SW6
It says that on iOS the poster image will be shown until the user initiates playback, but right now all I'm getting is a black video-sized screen with a big play button in the center. I've looked at other postings on this top (here and here) but neither solution has worked for me. The only thing that's a little bit unconventional about the site is that the video element is in an inline lightbox, so initially on pageload it's not visible, but I don't know why that would make a difference.
I had the exact same problem. I decided to try my code on other iPad's, and it worked fine. The poster image showed up.
After scratching my head for a bit, the solution was to hard reset the iPad and try again. After a reboot, my iPad displayed the poster image as it should.
Maybe it will work for you?
I found there is a limit to the amount of images you can load on an iPad
Here is what it says:
I hit a mobile Safari limitation recently when building an AJAX-y site
on the iPad. If you load a ton of images eventually mobile Safari cuts
you off and will display a [?] instead of the image. After doing some
tests it appears that this limit is around 6.5 MB. Here’s a test page
I made that attempts to load 20 500kb images. When opening this page
on an iPad, 7 of the images don’t appear, even though in Charles they
are returning 200 – success. I’m assuming this is similar to the way
autoplay is disabled for the video tag on iPad/iPhone. Apple probably
wants to make sure users don’t get overloaded with downloads when
browsing on 3G.
Anyhow, 6.5 MB is a hefty load and wouldn’t fare well on 3G, but for one reason or another you may want to work around this limitation. I found the easiest way to patch my code was to load the image into a canvas tag using drawImage(). The canvas tag appears to be immune to the limitation.
Here’s another test page using the canvas tag, all the images should load.

Resources