Tuesday, July 14, 2015

PL Crash reporter and overview

PL crash reporter is a reliable, open source crash reporting framework for iOS and Mac OSX. This is the framework that powers most of the crash reporting frameworks such as Flurry, HockeyApp and Crittercism. 

Below are the feature list that could see from the website: 
- Uses only Public APIs/ABIs for crash reporting 
- First introduced in 2008. 
- Backtraces for all active threads are supported. 
- The most accurate stack unwinding available. using DWARF and Apple compact Unwind frame data. 
- Does not interfere with debugging lldb/gdb 
- Easy to integrate with existing or custom crash reporting services
- Provides full register state for crash thread. 

The source code is available at the link given in the references section 

Downloaded the code by following the git link  git clone https://opensource.plausible.coop/stash/scm/plcr/plcrashreporter.git 

references:

What is Meteor Framework - An Overview

Meteor is a javascript app platform, offering a complete full-stack framework for delivering web and mobile apps entirely in Javascript. Meteor radically simplifies development process for reactive app development. 

Below are the key features of Meteor 

1. Universal Javascript 
The same code runs from the client to the cloud, from packages to database APIS. The same code runs cross browsers and mobile devices via Meteors unified Isobuild system. 

2. Optimistic UI
Meteor presents ‘Data-on-the-wire’ with latency compensation and conflict resolution built-in When data changes, updates propagate reliably to affected clients and users screens update via LiveQuery, full stack DB drivers and mini database sources. 

3. Reactive rendering
Client GUI components provide the look, feel and response of thick app using meteors Blaze framework or integrating with Angular JS and React JS. 

4. WebSocket Micro services. 
Meteor’s distributed Data access protocol (DDP) provides ‘REST for web sockets’ a standard protocol for delivering micro service APIS over web sockets that push data from the cloud to live-updating clients.  



References:

Wednesday, July 8, 2015

HTML Image area maps

Here is a quick html that kind of shows HTML overlay with an image at the center and certain part of the image is clickable (such as X button and a launch button ). Below is the snippet that helped with this.

html, body, #wrapper {
   height:100%;
   width: 100%;
   margin: 0;
   padding: 0;
   border: 0;
   background-color:rgba(0,0,0,0.3)
}
#wrapper td {
   vertical-align: middle;
   text-align: center;
}



references:
http://www.position-relative.com/tutorials/tute1_css_bg_image.php

MQTT dissecting PINGREQ & PINGRESP

The PINGREQ message is an “are you alive“ message that is sent from a connected client to the server. 

Below is structure of PINGREQ 
Like other messages, this has a fixed header and the remaining length and the remaining data will be zero. The request type is 12. 
In the fixed header, the DUP, QoS level, RETAIN flags will be set to zero. 
Below is structure of PINGRESP
A PINGRESP is message sent by server to PINGREQ message to say “Yes am alive” 
Like PINGREQ message, this message is very simple and just contains the message type as 13 and no DUP, RETAIN and QoS flag set. 
There is no payload and there is no variable header for this message 

References:

Monday, July 6, 2015

App Thinning iOS 9.0 - Basics


App thinning is for iOS and watchOS. The Appstore and the Operating System minimize the installation of iOS and watchOS apps by tailoring app delivery to the capabilities of users particular device, with minimal footprint. The App thinning lets developers to create apps that use most of the features occupy minimum disk space and accommodate future updates that can be applied by Apple. There are mainly three parts involved in the app thinning process. 

1. Slicing (iOS)
2. Bitcode (iOS, watchOS)
3. On-Demand Resources(iOS) 

Slicing is the process of creating and delivering variants of the app bundle for different target devices. A variant contains only the executable architecture and resources that are needed for the target devices. A developer will continue to develop and upload full version of the app to iTunes connect. The app store will create and deliver different variants based on the device app supports Image resources are sliced according to their resolution and device family. GPU resources are sliced according to the device capabilities. When the user installs and app, a variant for the user’s device is downloaded and installed. 

For iOS app, sliced apps are supported on the latest iTunes version and device running on iOS 9.0 and later. Otherwise app store delivers universal app to the devices. 

Below are the steps to be followed for slicing

1. In Xcode, specify target devices and provide multiple resolutions of the image in the asset catalog. A developer must use asset catalog in order for the slicing to work.  
2. Build and run the app in simulator device 
3. Create an archive of the app and export a variant locally for target device. 
4. Upload to iTunes connect
5. In iTunes connect, distribute the pre-release version of the app to designated testers. 

Bitcode
Bitcode is an intermediate representation of a compiled program. Apps that a developer upload to iTunes connect that maintain the bitcode will be compiled and linked on the app store. Including bitcode will allow apple to re-optimize the app binary in the future without need to submit new version of the app to the store. 

On Demand Resources
On demand resources are resources an app can tag with keywords and request in groups by tag. The App store hosts the resources on Apple servers and manages the download for the app. On-Demand resources enable faster downloads and smaller app sizes. 

The OS purges the on demand resources whenever the diskspace is low. IF the deverloper is trying to test this concept outside the app store, then it needs to host the resources themselves. For users, on-demand resources work transparently in background supplying resources as needed while the user explores the feature of the app.  

References:

Saturday, July 4, 2015

Java Enumerations

An enum type is a special data type that enables for a variable to be a set of predefined constants. The variable must be equal to one of the values that have been predefined for it. Common examples include compass directions (values of NORTH, SOUTH, EAST and WEST) and the days of week. 

for e.g. public enum Day 
{
SUNDAY,
MONDAY,
TUESDAY.
WEDNESDAY.
THURSDAY.
FRIDAY,
SATURDAY
}

Java programming language enum types are more powerful than any other counter part languages. The enum declaration defines a class (called an enum type) The enum class body can include methods and other variables! . Example is like below 

public enum Planet
{
    MERCURY (3.303e+23, 2.4397e6),
    VENUS   (4.869e+24, 6.0518e6),
    EARTH   (5.976e+24, 6.37814e6),
    MARS    (6.421e+23, 3.3972e6),
    JUPITER (1.9e+27,   7.1492e7),
    SATURN  (5.688e+26, 6.0268e7),
    URANUS  (8.686e+25, 2.5559e7),
    NEPTUNE (1.024e+26, 2.4746e7);

private final double Mass;
private final double Radius;

Planet (double mass, double radius)
{
this.mass = mass;
this.radius = radius;
}

public double getMass()
{
return this.mass;
}
}

references:

Tuesday, June 30, 2015

Dissecting MQTT SUBACK message

references:
http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html#suback