What is the right way to keep notes file in Xcode - xcode

I have a .swift file with notes about what to do in the project:
/*
v1.1: do this
v1.1.1: update this
v1.3: optimize this
*/
Its over 100 lines long and I think that there might be a better way to hold these types of notes. Does this in anyway reduce my compiling time or affect my project?

Create a todo.swift file for these kinds of notes. .swift file allows links to be clickable also enables colorings. Other formats like txt doesn't allow these.

Related

Explanation of the different files in a PPTX file

Is there something that explains the purpose of the different files in a PPTX file.
First off, what's the purpose of the SlideMaster files, & SlideLayout files? And how do they relate to the Slide files?
Second, there are multiple theme.xml files - why? Word & XL each have a single theme file. No reason PPT can't have multiple, but what drives that?
Third, there are several notes files. What is the purpose of those?
And finally there are a bunch of customXml files. What is the purpose of those?
thanks - dave
Google/OtherSearchEngine "OFFICEXML" (w/o quotes). That'll bring up several possible references that'll explain the various files.
SlideMasters/SlideLayouts govern the formatting and layout of slides based on the layouts. This is more a matter for a PowerPoint tutorial, not a programming help site, though.
The PPT user can apply different themes to different slides and/or inserted slides from other presentations may carry themes from the original presentation. Or the original template the PPT file's based on may have been designed with different themes (each of which becomes a new set of SlideMaster + child Layouts).
Several notes files: each slide may have its own "attached" notes text. There'll be a notes xml file for each slide's notes text.
It's sort of the nature of the idea of "custom" that it's special-purpose, something outside the normal spec. Custom XML may define the ribbon interface or it might be anything else that the developer needed.

Is there a way to link yet to be created images into an indesign layout?

I'm creating a multipage publication with many ads that haven't been built yet. I know their size, and filename, but the image/pdf doesn't exist yet.
Is there an existing script or a possible way to link an image that doesn't exist? Another way to look at this would be kind of the reverse of how the missing links (relink) button works. Where I know what the file path will be, but the file is missing.
Publishing industry standard practice:
Rather than a script, just create a blank image at the exact size. Make it florescent magenta with the letters "FPO" huge and dead-centre so no one can mistake it for the real thing.
Importantly: give this FPO image the exact file name of the file which will eventually be used/placed.
When your production image is finalized and approved, cut-and-paste the exact FPO file name into the new file. Drop the production file into your working directory overwriting the FPO file, and refresh it in InDesign. Bob's your uncle.
If this is being done to hundreds of images, you can develop your own batch process to handle this with some time-saving automation. However, this is a good example of an issue that can be solved at the production-management level, rather than at the coding level.
Hoping this helps!

Resource pictures not include in directory

I am creating a vb6 application now and most of my command buttons were graphical style. Do the background images still show up even if I remove them from the app folder?
This is part of what goes into .FRX, .CTX, etc. files. Those are resource files created in a private "property bag" type format and are used to hold things like binary data, images, long strings, and so on.
But don't discard your source files, because you may need them down the road. Treat such things as valuable parts of the program source. They are not needed at run time though.
As far a I know it doesn't remove the picture from the command button when you delete it from the app folder, i suggest making a copy of your image and then delete the original and see if it works in case it doesn't you have the backup image, good luck.

How to reduce Xcode project file size

So I am trying to submit my WWDC scholarship app, however the file size limit is 100mb, and mine is currently 132mb. I have spent the past few hours reducing the size of the images, and compressing them, but I only saved about 10mb...
So now I am trying to figure out what is taking up all of the space, and what I can delete to get it under 100mb.
I noticed that when I go into the 'Developer' folder and right click on my project and tap 'Get info', it shows that the file is 132mb, however if I go in and check the three folders individually they only add up to about 40mb.
If I go to ~/Library/Developer/DerivedData then the file for this project is about 250mb, so is there something in there that can be deleted?
Thanks in advance!
~/Library/Developer/DerivedData can be deleted in its entirety at any time. However, doing so will not affect the size of the app.
Looks first at any assets that you have included, images, videos, sounds, data, and fonts. Figure out what can be eliminated, reduced, or hosted externally. Many times you can replace large images with drawing code.
Select your project target > Build Settings, check your VALID_ARCHS:
Remove useless ones, only keep right & less archs for your project, more archs will lead the final archived binary bigger. I think you can only keep x86_64 there in this case.
More reading about the ARCH, you can take a look at THIS ANSWER (it's about iOS).
I finally found the problem. I used the terminal command to uncover hidden files, and found that there was a .git file in the folder which was taking up 93mb. I have now deleted the file and it brought down the size to 37mb.

Localising nib files

I am writing a app which has about 10 nib files for conveying different UI messages and for taking user input. I want to know how to localize these messages that appear on my custom sheets. Is there any way i can have a single file with generic strings and depending on language it replaces the generic string with string in that particular language. also i want to know how to load dynamic strings into messages in custom sheets like file names or the number of files selected etc.
i have taken a look at ibtool but doesnt it duplicate the nib files by creating .lproj files for different languages? doing this simply makes the size of my app huge.
Thanks
At a Boston cocoa-heads meeting a while ago, we discussed this topic and came to a consensus that where two decent approaches.
1 - The first is it either use IBTool or manually make separate nibs.
2 - Gain programatic access to your labels and change the text programatically. Mipadi mentions Localizable.strings as being useful. To gain programatic access, you can either wire-up each label through IB, or you could do some king of walk-the-nib magic and find all of the labels (exercise left to the reader).
Pick whichever method fits your particular app.
Hope this helps,
JJ
This question might help: IPhone localization: Is it possible to translate nib files...
Standard practice is to have a nib for each language.
Your nibs shouldn't be more than 50-100 KB unless they're storing some uncompressed bitmap images, in which case you should load those images in code. Some components, like NSPathControl, will store uncompressed icons in the nib and add a few MB to the nib.
If you have a large .xib file open it in TextEdit and it should be obvious what's taking up all the space.
Probably worth to note that the current approach with Mac OS X 10.8 and auto-layout doesn't require multiple nibs anymore but a single .xib/.nib plus .strings files for each language.
The Times They Are A-Changin :-)
In addition to what Darren already posted, I would like to note that if you know most of your users are going to use English (or whatever the overwhelmingly most common language is), many developers will offer an English-only download that doesn't contain the nibs for other languages (thus reducing app size), and then also provide a multilingual download if desired.
Also, if you're programmatically generated UI elements, you'll want to take a look at the information for Localizable.strings, which is a text file containing translations for strings used programatically.
Wil Shipley recommends, and provides code for, localizing your nib files from strings files at run time.

Resources