With iOS 8.0 Apple has provided app extensions that let developers extend custom functionality and content beyond a particular app and make it available for other apps.
Extensions available on iOS platform are listed as :
In this blog we will discuss basics of creating a Custom Keyboard using extension.
A custom keyboard can replace the system keyboard for users who want to use a novel text input method or want to use a language not supported in iOS by default.
The essential function of a custom keyboard is just to provide the capability to respond to taps, gestures, or other input events and provide text, in the form of an unattributed NSString object, at the text insertion point of the current text input object.
Note : Use a Custom Keyboard extension only if you want to provide a systemwide keyboard. To provide a fully custom keyboard or some custom keys in system keyboard limited just to a single app, iOS SDK provides other, better options as described in Custom Views for Data Input in Text Programming Guide for iOS.
On Mac OS X, Cocoa applications are not the only choice. You might need to create a application in a cross platform framework such as QT Framework. In this case there could be a need to encrypt or create hash of some data.
In this blog we will see how we can generate a key using PBKDF2 algorithm and then using that key, we will see how to generate HMAC hash for any data.
I have used OpenSSL library and some C++ code to accomplish this.
First, add libssl.dylib in your project. On Mac OS X OpenSSl is by default installed so no need to download from anywhere.
Let’s declare a class to accomplish our task at hand.
std::string calculateHMACHash(const char* password, const char* salt, const char* data, int iterations);
Quick tech tip for today, how to create HTML donut charts like the one below and use Apache Web Server on Mac OSX. Hats off to the BI Happy Blog and Coolest Guy on the Planet Tech blog. I wanted to quickly generate some mockup donut charts by using HTML – and being lazy, figured I would just borrow some code.
Although Cocoa has a class for parsing XML i.e NSXMLParser and if XML parsing is needed in a Cocoa application I would recommend to use NSXMLParser, But there could be a application which is not Cocoa based and needs XML parsing support through scripting.
For any such scenario we can use AppleScript to parse XML content. The following code will demonstrate the parsing of a sample XML. Continue reading →
On Mac OS X , Information such as “creation date” , “type” , “size” etc. about a file or folder can be easily seen by cmd+click and selecting “Get Info” for the selected file in a panel as shown in the figure.
Let’s see how can we get the information programmatically using AppleScript. Continue reading →
Using Distributed Objects (DO) enables a Cocoa application to call an object in a different Cocoa application (or a different thread in the same application). The applications can even be running on different computers on a network.
Distributed objects operates by having the server make public, an object to which other client processes can connect. Once a connection is made, the client process invokes one of the public object’s methods as if the object existed in the client process.
Distributed Objects normally runs over mach ports but can also be used with sockets, allowing it to work between computers as well.
For more information on Distributed Objects architecture see here.
Let’s look at some client-server code using Distributed Objects for IPC.