Thursday, March 31, 2016

< Angular > & " Quotes " Import in iOS


Hey Folks,

I have seen many times people discussing on this matter so today i thought to write my own views on it.
  • Objective C has grasped this from C / CPP
  • Quotes" " indicates searching header in local / current working directories and if it doesn't find a match then moves on to check the system paths    whereas Angular's < > are used for searching in System Headers.

#import <something> : compiler looks in all include directories.
#import "something"  : compiler looks only in the directory of the file with the include in it.


Both ViewController & Analytics header exists within my local project directory so using Quotes to add them





UIKit is a System Header so accessing using Angular braces. However they can be accessed via Quotes as well :)




Hope i made it clear to some extent :)




Wednesday, March 30, 2016

Flurry Wonders for iOS


Hi @ll,

M back again with another Analytics Tool.
Please welcome Yahoo's "FLURRY"

Bit slow as compared to Google Analytics but has features that that can fulfill your app's requirements.

Things to do with Flurry : 
  • Analytics
  • Ads
  • Crash Reporting
  • integration for iPhone / iPad / iWatch

Working with Analytics :

To get a deep insight of the App's usage Flurry's Analytics service is provided

Step-1 : Get your API Key & SDK

  • Choose your platform



  • Provide App Name & category


  • Verify your account


  • Get your unique application key


  • Download required SDK and Unzip to get details


  • You can view all your apps in the dashboard

===================================================================

Step-2 : Integrate SDK in project

  • Now open your project which contains a single ViewController that captures events when user arrives on the screen or when user clicks YES or NO buttons


  • Right click on your project >> Add Files >> Choose Flurry >> Done 


  • Now lets start by importing FLURRY in AppDelegate 

  • Mention your Unique key in didFinishLaunchingWithOptions

  • Open you view controller and again import Flurry.h





  • Build and Run your project and you will see this.... "ERRORS"


  • Don't worry and add SystemConfiguration.framework from Target >> General >> Linked frameworks & libraries






  • Now run the project & it will work fine and start logging events. :)

===================================================================

Step-3 : Check Dashboard for Event Logs
  • You can check the dashboard for all info.Please wait for 1-2 hrs so that data gets reflected in Analytics


Hope it provides you basic idea of Flurry analytics and you dig in more for other features like crash reporting and Ads.
Enjoy and have fun with Flurry
:)

Monday, March 28, 2016

A Day with "Google Analytics"


Hey Folks,

Today got a chance to work on with Google Analytics.
Amazing...
Loved playing with it.

Presenting basic info so that you guys can start playing with it too within your iOS Apps :)

Let's Start..


A) Accounts & Guides

  • Sign up with an email id
  • Provide an Account name & App name that you want to work with
  • Agree with terms & conditions and you will be provided a TRACKING ID
  • Get your iOS Starting Guide that will help you in adding analytics to your app and screens : “https://developers.google.com/analytics/devguides/collection/ios/v3/"
  • You get a sample app to to start with





B) App Info

  • Analytics uses CocoaPods to install and manage dependencies.
  • Remember to Choose between Objective-C or Swift
  • Create / Choose App Name
  • Download googleServices-info.plist file and drag into your root folder

 
C) CocoaPods 
  • Create a text file named as podfile with following content :
platform :ios, ‘9.1’ 
use_frameworks! 

target ‘PullToRefresh’ 
   do  pod 'Google/Analytics' // you can mention all dependencies here
 end
  • Open Terminal and write pod install
  • If you prefer not to use CocoaPods to manage library dependencies, you can download and directly use the Google Analytics Services SDK.


D) Project

  • Add Analytics inside AppDelegate #import <Google/Analytics.h>
  • Then, override the didFinishLaunchingWithOptions method to configure GGLContext
  • Here you’ll send a named screen view to Analytics whenever the user opens or changes screens on your app. Open a View Controller that you'd like to track, or if this is a new application, open the default view controller.

- (void)viewWillAppear:(BOOL)animated
{
    id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
    [tracker set:kGAIScreenName value:@"MAIN SCREEN"];
    [tracker send:[[GAIDictionaryBuilder createScreenView] build]];
}


Note: You can add tracking code to every UIViewController that represents a screen, whether shown to your user imperatively (via code) or via storyboard. Set a name inside everyUIViewController if you want to differentiate between screen views for your app in Analytics. All activity recorded on the shared tracker sends the most recent screen name until replaced or cleared (set to nil).


E) View the Status in dashboard











Hope it helps :)





Tuesday, March 8, 2016

Error : "Cannot Connect to iTunes Store"


Hi All,


Many a times its seen that on iPod / iPhone / iPad users see an error
"Cannot Connect to iTunes Store".





Found some workarounds that may prove helpful in fixing this issue...

1) Check your internet connection : This may be the basic cause behind the issue

2) Firewall Security : Cross check your firewall security as this may also lead to this issue

3) Preference Changes :

   a) Connect your device with a MAC.
   b) Open Preferences from Top menu /  [cmd + ,]



   c) Click on Parental Control Preferences
   d) Disable iTunes Store [allow access to iTunes U]
   e) Click on OK



   f) Now Enable iTunes Store [allow access to iTunes U]
   g) Click on OK