пятница, 19 июня 2015 г.
воскресенье, 7 июня 2015 г.
GenStringResources. Application for localization the Xcode projects
Introduction
GenStringResources is a Mac OS application. It requirements MacOS at least 10.6.4 and above, Xcode 4.3 and above. The application uses ibtool and genstrings utilities from Xcode.
GenStringResources may be used for localization of the Xcode projects in Objective-C.
Application is divided on following parts:
⁃ scanner of the string resources from the Localizable.strings files;
⁃ scanner of the string resources from the XIB files;
⁃ of the string resources creator;
⁃ presenting total information about all string resources for all languages for all projects;
⁃ setting up all options of the application.
Scanner of the resources is passed all Localizable.strings by genstrings utility. It passed by recursive all folder with modules with the source code of a project. It generates Localizable.strings file with total string resources for the project.
It orders in ascending of key (it is a left part of the line before '=' in the file with resources). Then, it takes the current files with string resources for every language scheme (lproj-folder with according Localizable.strings file) and uses for comparing them with new
string resources on existing by key. In result, we have total string resources with new string without translating and old string with them. The string without translating are kept in separate Localizable.strings which can be used for translate.
After translate, all new strings can be merged with current resources by the application.
The same as the scanner of the string resources, the scanner of the XIB, used ibtool utility, builds the similar total file as the previous scanner, just for XIB strings resources.
All operation are carried out in automatic mode for every active project. You can set up active mode for every project in settings.
So, all string resources are unit in following total resources:
- current dictionary. It contains all phrases with translate for all projects.
- actual dictionary. In result of scanning that collected all resources for all projects. They are actual on now. Some phrases are translated (they present the current dictionary) and another part is waiting to translate.
After translate, all new strings can be merged with actual resources and become as current.
User interface
Main window is presented as many documents interface and consists from tools pane and tab bar.
Every document window presented as table with context menu. Tools pane is repeat of the main menu.
Menu item 'Open strings' and 'Start scanning' are calculating and presenting of the string resources.
Menu item 'Open XIBs' and 'Start scanning XIBs' are calculating and presenting of the string resources from the XIBs.
Menu item 'Total' presents total information about all string resources for all projects in one table.
Menu item 'Settings' are used for setting up all optional parameters. There are path to Xcode project, path to work folder and so on.
Then menu item for showing readme file and menu item for setup of the tools pane.
Data store
All data is kept in work directory. By default it is '~/Documents/LocalizableStrings'.
It can be changed in settings. The work directory is divided on three. They are: '/strings', '/XIBs', '/XcodeProjects'.
Every folder consists from project subdirectories by they name.
In result of scanning all string resources accumulate in the working directory. In main window, the user can see information view. By menu item, user can open information for researching.
User guide
Settings
SwiftOrganizer. Application in Swift for iOS.
SwiftOrganizer is a simple organizer application for an iPhone and for an iPad.
Was implemented for getting some practice of using the Swift.
Were implemented two types of database:
- Local database on Core Data- Remote database on the Parse.com server
- autolayout (on Interfase Builder Level only)
- switching of the database types from Core Data to remote database and vice versa
- used iCloud key-value storage for switching database types (if you change database type on your iPad, then on your iPhone is changing after some seconds too)
- Core Data on iCloud (fallback store)
- push notifications via Parse.com server
- events can be saved to the Calendar (then you can see your events in the Calendar app on your device) by using EventKit.
- localization app
- local notifications
- sharing via UIActivityViewController
- UIDocument. Enter and Edit files in the Documents folder.
- Document Picker - access to files on remote storage like iCloud, DropBox and etc with download to local Documents folder.
- extension
- todaye widget
- all database function are in the DataBaseKit.framework.
- abstract method;
- observer;
- singleton;
- builder;
On first start are created some tasks by default.
You can add a new task by pressing on button '+' on the navigator bar.
You can select line in tableview to start editing current task.
Any task may be deleted by left swipe gesture on the table view line.
For fetching tasks are used two tab bar. Upper tab bar is used for filtering by category. Bottom tab bar is used for filetering by icons.
There are some predefined category: 'ToDo', 'Work', 'Life', 'Events'.
Icons are used for featching too. They are predefined too.
In future:
- add or remove icons and categories
- make login (at present default user and password are used for login to the backend (parse.com server)).
- will be able to add events to the Reminder app
- local database will be on the iCloud.
Requirements
- iOS 8
Tab bars use for filtering task. On the table presented data from local or remote databases. Switch type of a database can be done by settings, by press Activity button, by iCloud from other device, by Today Widget as well.
Today Widget. Current data from database presented on the table. Here you can change of the database type and select task. Application gets parameters from widget and makes appropriate actions.
Action may be done by using of the UIActivityViewController. As you can see were added some buttons in to the activity controller menu.
Sharing data in social networks by using activity controller:
All source code you can find on GitHub
Подписаться на:
Сообщения (Atom)




