.des files not opening in xcode - iphone

I have a problem that i want to open and edit some images of .png extension that are currently in .des extension (for example button_start.png is in the form button_start.des) when i open button_start.des in the xcode it just show a text file like this(button_start.png 12234.00132330122309.that is now of image along with a long numerical number or possibly a hash code) i had been trying to open this .des file with many softwares like coreldraw and quickbooks but it still dont open.It had been weeks but still i am not finding any solution.please guys help me to solve this problem. thanks

.des-files are 3D-project-files. Xcode can't read nor see them, so you need to open them in the application they were created in and export them as PNGs.
If you added the .des-ending manually to a .png-file, you could simply rename the file file.png and it will work.

Related

What is the ID of the 'MessageReceived' sound on macOS?

I'm trying to use the 'ReceivedMessage' sound on macOS using AudioServicesPlaySystemSound() but I can't seem to find the ID anywhere.
What I've tried:
I've looked under /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds and couldn't find it either - although MessageSent is there.
I've tried AudioServicesPlaySystemSound(1003) as well following this link but that just results in silence. Any help would be greatly appreciated!
I've tried looking in Messages > Show Package Contents which only led to more disappointment.
I found the file here but I was a hoping to just link to it directly rather than including the .caf file in my app bundle.

Visio .vsdx format unzip and zip corrupts

I'm attempting to modify a Visio file (Open XML format) without having to use the Windows Visio application. My first experiment is just to use 7zip to unzip a known good .vsdx file that was created using Visio. That is all good; I can view the content of the package. Without making any modifications, I use 7zip to re-zip the content and renamed to .vsdx, but when I tried to open the resulting new file using Visio, it complains that the file is corrupt. Is there a way to manually re-zip the content into something that Visio accepts as a valid Visio file? I suspect that there may be some sort of checks for the validity of the file, but can't find what that may be. Thanks for any input.
I would use some form of OpenXML library to get at the file's guts using some sort of "approved magic".
Understanding that you might not want to do whatever you're doing via programming, I looked for some sort of free editor.
I found this free plug-in for Visual Studio:
https://marketplace.visualstudio.com/items?itemName=bsivanov.OpenXMLPackageEditorforVisualStudio
It works in the free "Microsoft Visual Studio Community 2019" as well. I just opened the dev environment (aka: the application) and dragged a Visio .vsdx file into the app. It opened with a tree-like editor. I was able to dig down until I found the visio > pages > page1.xml "leaf". Inside there, I was able to change some text on a shape, then save the "package".
Whatever this tool does, it saves the file properly, and I was able to open the altered .vsdx file in Visio. And the text that I changed in the editor was indeed changed inside of Visio!
I think I've used this in the past:
"Welcome to the Open XML SDK 2.5 for Office"
https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk
https://github.com/OfficeDev/Open-XML-SDK
To edit Visio files without the Visio application, you'll still need to understand how Visio works, to some extent.
A simple example:
I changed the text on a shape fairly easily within one of the page.xml files. That was easy. Then I wanted to add a copy of that shape. It was simple enough to copy and paste the whole xml block for the existing shape, then change the PinX and PinY attributes to move the shape to a different location on the page.
But you won't see that shape unless you give it a unique ID within the page. I tested deleting the ID attribute (to see if Visio would figure it out on open and assign one automatically), but it didn't work. If the ID is the same as another shape, the shape is ignored when you open the file. Once I changed ID to something unused, I did see the new copy of the shape.
If you create grouped shapes, or shapes that have advanced behavior (SmartShapes, ShapeSheet formulas, etc.), then this could get complicated. As formulas need to reference other shapes by ID, so you need to manage the IDs! For simple boxes and lines, etc., it might work well (and fast) to generate these things via OpenXML. Good luck!

Failed to display UIWebView to display docx/xlsx file with SFUZipEndOfCentralDirectoryError error with custom URL

We are writing some program to display documents on iOS. I think that there are a lot of confusion on the web about what type of documents which iOS UIWebView could display. Generally people refer to Technical Q&A QA1630 Using UIWebView to display select document types to see that all the MS office 07+ files (such as docx, xlsx, pptx) could not be displayed, however actually that is not what we see from testing. Actually we are able to display docx/xlsx/pptx document at UIWebView either loading from a remote URL, local file or in memory (loadData, here the baseURL can not be nil on simulator, see this link). Of course We are testing on latest version of iOS on iPhone simulator, it might be that the support was not at older iOS. At this point, We don't know that yet. If you know, please let me know.
However right now, We have one issue to display document at UIWebView by using custom URL for security reason. I did the custom URL by following the code here: protecting iOS resource. We could display xls, doc, ppt, pdf file, but not docx/xlsx/pptx, We got some error like this:
EXCEPTION SFUZipEndOfCentralDirectoryError: Could not find the end of central directory record
We tried to debug and could not figure what's to do here. Do you see similar error here? Could anyone shed some lights on this? Thanks very much.
It looks like the document you're trying to open might be corrupt. docx, xlsx, and pptx files are actually zip files containing a bunch of XML documents and other data. Check if you are able to uncompress the file on your computer by renaming it to .zip and then unzipping.

Retrieving updated files from server to replace files on documents folder of an iPhone

Im new to iPhone programming and wanted to see how people have solved this problem:
Ive created my app which will ship with certain pLists and .png files in the main bundle. However, what I want to do is when the app starts up, Id like it to check my server to see if there are updated versions of the files in the documents folder available. If so Id like the app to download those files.
I was wondering if someone can point me to some resources on how to do this? Ive searched online but haven't come up with good hits.
Whats the google key-word for searching this topic anyways?
Thanks a lot
you can use NSUrlRequest to download the files, to move them to the correct place you can use NSFileManager, if you look at the apple docs for both these classes there should be sample code explaining how to copy/save a file from NSData, and also how to download it.
I don't have any example resources of how to do exactly this, though I would probably do something along the lines of onAppLoad checking to see if the content of the application that you want to keep updated is the most recent, and if not, download it.
As for keywords to search I would try something along the lines of "Automatic App Content Updating/Verification" and throw in "iOS/iPhone/iPad" or some similar combination.
I'll do some more poking around and shoot you a comment notification if I find anything worthwhile, and then edit my post with it.

Is it possible to search files of particular extension in the entire device?

In my application, i am trying to find all files of particular extension (like .pdf, .txt, etc) that are stored in the device (either downloaded or transferred from system) and want to list them in table View. Is it possible to do so and if it is then can i associate file of specific extension to get it open in supporting application (any third party plug-ins).I went through numerous documentation but couldn't find the solution. Also how can i index files of these extension for fast search.
Any help is appreciated. Thanks.
No, it's not possible. You app can't access files of other apps directly.