About Box Contents - objective-c

I came across this About dialog of the Sparrow Mail app. Is this possible 'out of the box' within the AppDelegate or is this a real 'window' I will have to develop so I can replace the default Apple generated one with the credits?

The About Box gets its content from the "Credits" RTF file that is present in all app-level projects created by Xcode templates. You can edit it within Xcode or in any rich text editor (including hyperlinks, formatting, etc.).
The icon is taken from the app's bundle settings (Info.plist) and requires no extra work beyond setting the app's icon (so don't include it in your RTF file). Similarly, the version is taken from the bundle settings. In other words, everything below the icon and version line comes from the rich text file.

Related

How to embed PDF viewer in DSPACE

How can I embed PDF viewer in my DSPACE instance. I have tried many solution but nothing works. There are many suggestion on DSPACE official site
https://wiki.duraspace.org/display/DSPACE/Document+Viewer+Integration
No soluton has a documnetation how to configure these viewer in dspace code.
I want a step wise soultion for embeding PDF Viewer. Please help me out of this problem. Thanks in advance.
I have researched through these site -
https://wiki.duraspace.org/display/DSPACE/Document+Viewer+Integration
http://peterpants.blogspot.com/2010/02/document-preview-in-dspace-using-google.html
It depends which version and which UI of DSpace you are using. I will describe roughly what we did to embed PDF.js into DSpace 6.3 JSPUI. We released all necessary code changes on github, so please take a look over there for details.
DSpace uses maven overlays to separate local code changes from the officially released code. Therefore, I will use paths within these overlays in the following description. If files that we changed do not exists within your local code repository, you have to copy them from there original location within [dspace-source]/dspace-jspui/src/main. It should also work if you do the code changes directly there, but I would consider that bad practice.
We added PDF.js and all files it needs to dspace/modules/jspui/src/main/webapp/static/pdfjs. We then changed dspace/modules/jspui/src/main/java/org/dspace/app/webui/jsptag/ItemTag.java. This class builds the item view. While I wish there would be a better separation of concerns, some HTML code is generated by this class, including the section of the item view that list all bitstreams. For every file that is listed, we check if its mime type is set to application/pdf and add a "preview" button for those files. The preview button links to the html site that renders the pdf viewer and loads the targeted file. We also added an attribute "download" to the default "Open/View" button, to ensure that it does not start another PDF viewer of the browser, but downloads the file. This is important to have one button called "preview" that opens the embeded PDF viewer and one button "download" that downloads the file to the user's computer. You can change the name of the button from "open/view" into "download" in the DSpace's message catalog. Last but not least we added JavaScript to dspace/modules/jpsui/src/main/webapp/display-item.jsp. The JavaScript suppress that the PDF viewer is loaded as a normal site, but loads it as an overlay over the item view, using JQuery UI. Then we wrote a small CSS file that helps us to position that overlay within the item view and referenced that file in dspace/modules/jspui/src/main/webapp/layout/header-default.jsp.
As mentioned above all these changes are published as open source under the DSpace Source Code BSD License on github.

Interface Builder: custom fonts don't appear in list

I've added some custom fonts to the project:
The fonts are added to the target, are included in the "Copy Bundle Resources" list, and are also added to Info.plist under Fonts Provided by Application.
However, those fonts don't show correctly in the Interface Builder. It shows the font family (CentraleSans), but gives me only 2 font choices for that family.
Moreover, the actual font IB ends up using seems random (the final selection can be CentraleSansBold or CentraleSansBook, or other ones, for the same family/font values I pick). Notice how in the screenshot above it says "CentraleSansBook", even though that was not an option in the drop down list. Is this an IB bug?
OK, I found a way to make it work. I had to install the custom fonts on my Mac. Double-click on the font file in Finder, then click "Install Font". After that the font will appear in the drop down list in IB.

How to sync localized storyboards' strings after modifying storyboard in Xcode 5

I'm just starting to look at IOS Apps' localization in XCode 5 and I've tried to add an Italian Localization:
Xcode 5 automatically generates the Main.strings file with a single entry, for the only label I've put within the Main.storyboard file:
/* Class = "IBUILabel"; text = "Label"; ObjectID = "PeT-4z-NSf"; */
"PeT-4z-NSf.text" = "Etichetta";
If I later modify the Main.storyboard file adding a new button to the view, then how should I tell Xcode 5, if possible, to add missing localization strings to the Main.strings file? Should I add a new entry by hand by looking at the Object ID field in Interface Builder (it works, but I don't know if this is how it is meant to update storyboards' localization)? Can I run something like genstrings on the Main.storyboard file to extract all the labels' text and add the new ones to the localized Main.strings files?
Check out ReMafoX, it's a Mac app that perfectly solves your problem. It can be easily installed and integrated within your project, watch this video for a detailed walkthrough.
Alternatively, if you prefer an open-source CLI tool without a GUI, you can also use BartyCrouch.
Install BartyCrouch via Homebrew:
brew install bartycrouch
Alternatively, install it via Mint:
mint install Flinesoft/BartyCrouch
Incrementally update your Storyboards/XIBs Strings files:
$ bartycrouch update
This will do exactly what you were looking for.
In order to keep your Storyboards/XIBs Strings files updated over time I highly recommend adding a build script (instructions on how to add a build script here):
if which bartycrouch > /dev/null; then
bartycrouch update -x
bartycrouch lint -x
else
echo "warning: BartyCrouch not installed, download it from https://github.com/Flinesoft/BartyCrouch"
fi
In addition to incrementally updating your Storyboards/XIBs Strings files this will also make sure your Localizable.strings files stay updated with newly added keys in code using NSLocalizedString and show warnings for duplicate keys or empty values.
Make sure to checkout BartyCrouch on GitHub for additional information.
The file that Xcode does not update automatically (at least 5.x version didn't) is the app's Localizable Strings. You can build a fresh file from Main.storyboard as follows:
In the project Navigator (the leftmost pane) click on the Main.storyboard file. In the Utilities pane (the rightmost pane) click on Show the File inspector icon. It is the leftmost icon in blue in the image below:
.
On the right pane that will appear, one of the sections will be Localization:
Uncheck the English (Localizable Strings) row and in the window that will pop-up check the Delete localized resource files from disk and click the Remove button (you do not have to check delete, in which case Xcode will ask for a permission to override it when you build it next).
Then check English (Localizable Strings) again to build it from scratch.
Using Xcode 6 the following worked for me:
I changed the localization for a language from "Localizable Strings" to "Interface Builder ..." like suggested at the SO question posted by h.orim. However the setting did not change, it still was set to "Localizable Strings". The next step now is to do that again, so Xcode will find the Storyboard it just created and show a prompt asking if it should be used or replaced. Now click on "Use file" instead of "Replace", otherwise the same will happen again.
Now you should have a localized Storyboard in the desired language. After you now switch back to "Localizable Strings" you will have a file containing all current strings used in the storyboard with your previous translations still in place.
Another way is to do it manually by selecting on the storyboard the field to translate. Go to the "Identity Inspector" and copy the Object ID (something like HP8-op-SmX).
After that, open the storyboard langage file (Main.strings, most cases) and past the Object ID. Depending your needs, you just have to add .text or .placeholder.
"HP8-op-SmX.placeholder" = "My translated placeholder text";
"HP9-op-VvD.text" = "My translated text";
Save, clean & build. It's a little bit painful but can save a lot of time if you only need to translate few things.
You can use a script called UpdatStoryboardStrings for this!Get it here: https://github.com/AppliedIS/iOSL10n
Intructions for use: http://blog.appliedis.com/2013/05/22/localization-of-an-xcode-ios-app-part-2/
With Xcode 6+, ideally developers should not have to manually manage strings files. Use XLIFF export to automatically gather development language strings to send to translators, and then use XLIFF import to update the strings files with translations.
https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/LocalizingYourApp/LocalizingYourApp.html#//apple_ref/doc/uid/10000171i-CH5-SW9
Another option is to use ibtool --export-strings-file directly.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ibtool.1.html
There are two options:
Option 1
Xcode can "reload" the file by converting the file to either an [Interface Builder Cocoa Touch Storyboard] file type or a [Localizable Strings] file type.
Select your base storyboard file from the Project Navigator
Find the Localization section in the File Inspector
If your file is currently a [Localizable Strings], change it to [Interface Builder Cocoa Touch Storyboard] or vice-versa.
Xcode should have converted your storyboard to the current version, while preserving your old localization efforts. Here you can change the file back to the original file type if you would like.
Option 2
Use ibtool to extract the strings in your storyboard.
Open the Terminal application
Locate your Base.lproj directory
Use this line to extract the strings:
ibtool MainStoryboard.storyboard --generate-strings-file file_name.strings
After ibtool extracts the strings to file_name.strings, you can copy and paste it to your original .strings file
Tested with Xcode 11, you can simply deselect the language.
Do not delete the file on disk.
And then choose to use the existing file.
The old translations will be kept and the new keys will be added.

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.

vb.net vs2010 project deployment problem: eula.rtf is not displayed during application deployment. Any ideas?

I've created a setup and deployment project for my vb.net application using the Visual Studio 2010 wizard. I also added the eula.rtf file to the setup project and set it to install to the user's application folder. I then added a license agreement UI dialog in the setup project and pointed the licenseFile to eula.rtf. However, when testing the resulting setup.msi, the UI License Agreement dialog appears but no text is displayed inside the box where the eula should appear. I tried re-naming the eula and tried to change the encoding of the file but without success. Am I missing something? What should I do to make it work?
Many thanks.
Did you actually create a .rtf in the proper format or did you just rename a text file? You'll need either Wordpad or Microsoft Word to create one. Wordpad is the better choice, it is likelier to create RTF in a format that the rich text box fully supports.