Thursday, December 31, 2015

iOS Hotspot Network SubSystem



The hotspot network subsystem allows a hotspot helper application to participate in the process of classifying and authenticating to Wi-Fi hotspots. A hotspot helper application can receive commands and provides a responses to a command once it has been processed. In most instances application command processing occurs while application is running in the background. 

The application receives command to process as part of two main functions: authentication and scan list filtering. 

References:


iOS Search API Best Practices



There are two categories of content. 

1. Private : Directly indexed using NSUserActivity and CoreSpotLight APIs. App can index content that user has created locally and this content remains in the user’s device and is searchable only locally. 

2. Public : Content that comes from the website. Apple uess a web crawler, called Applebot, to gather publicly available information that has been marked up using standard web markup techniques. This info is then presented to users when they use Search in iOS 9.0 or from Safari Suggestions. 

Which is the Right API to use? 

NSUserActivity : New methods and properties in the NSUserActivity class help one to index items from the app as the user does an activity in the app. This could include creating or visiting a piece of content, viewing a set of items such as visiting a navigation point. As the users do these activities in the app, the NSUSErActivity API can be used to indxed such actions. For e.g. Health app can add activities that let users search for “Steps” and be taken directly to that pane in the health app. 

Core Spotlight: The framework enables indexing of app content that is searchable privately on a persons device. One can add. delete , update and delete items in core spotlight index and that info will be searchable for easy access. Using a search extension, we can add content in the background even if app is not running. This allows the index to be up to date as the content changes even if the user activity isn’t actively using the app. This is for great things like messaging and conversations stored on the server but accessed through the app or locally generated content 

Web Markup: This is useful for apps that has mirrored content on the web. Applebot crawls the website and show its content on search results. By Implementing web markup we can make results look richer, increase engagement and seamless redirect users to specific content in the app. 

References:

A Few GIMP Tips



Bucket Fill Transparency

http://hamwaves.com/gimp.transparency/en/

Adding transparency to an Image

Below Steps can be followed for this:

- Open the Image with GIMP
- Windows -> Dockable Dialogs -> Layers
- Adjust the opacity here to slightly adjust the transparency (85% etc)

Another a large number of tutorials available here:



Chromcast How to Cast from a device



For Casting from a Youtube app, the steps are easy as below 

1. Download the latest youtube app on the phone (Android, iOS)
2. Connect the device to the same WiFi as the chrome cast 
3. Open the Youtube app on the device and press the Cast button 



references:

What is SIP MSRP (Message Session Relay Protocol)

MSRP is a text based connection oriented protocol for exchanging arbitrary MIME content, especially instant messages. 
MSRP sessions are typically arranged the same way a session of audio or video media is set up. One UA sends another UA invitation containing an offered session description that includes a session of MSRP. 


References: 


Crash reporting in iOS programmatically




The concept is useful to get some level of information after a crash, however, the stormy environment that exist soon after the crash occurs is not easy to capture all the details. Some of the framework such as Crittercism which uses the PLCrashreporter , https://www.plcrashreporter.org/ and other sites such as KSCrashReporter are very useful to get the details of crash that happens. 

https://github.com/kstenerud/KSCrash

References

iOS ABAddressbook concepts a few notes

Properties: There are two kind of properties single value and multi value. Multi value properties contains data that can have multiple values. 
Multi value properties can either be mutable or unmutable. 

Following is example to get the single value property 

ABRecordRef personRef = ABPersonCreate();
CFErrorRef anError = NULL;
bool didSet;

didSet = ABRecordSetValue(aRecord,kABPersonFirstNameProperty,CFSTR(“Katie”), &anErr);
CFStringRef firstName = ABRecordCopyValue(aRecord,kABPersonFirstNameProperty);
CFRelease(firstName); 

Multi Value Properties 

MultiValue properties consist of list of values. Each value has a text label and an identifier associated with it. There can be more than one value with the same label, but the identifier is always unique. There are constants defined for some commonly used text labels. For e.g. Phone number of a person can be many. 


REferences:


https://developer.apple.com/library/prerelease/ios/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/BasicObjects.html#//apple_ref/doc/uid/TP40007744-CH3-SW1