Add Google analytics to iOS app

Add Google analytics to iOS app

This shows how to add Google Analytics to your iOS app and not having to use the Firebase Analytics. 1. Login to your Google Analytics Account and create a New Property On the New Property screen select Mobile app, Google Analytics Services SDK. Type your App Name as shown. Rest of the settings can be selected based on your requirement. Then click the button Get Tracking ID Once you get the tracking ID which would be in the format UA-XXXXXXXX-X, click the link for the iOS SDK Getting started guide As mentioned on the Getting Started guide page, create a pod file using terminal by navigating to your project and typing below command [crayon-59c7ec74d3c4a356532365/] Open the newly created pod file and add below code just below the line which says # Pods for My iOS App [crayon-59c7ec74d3c56796663748/] Run below command [crayon-59c7ec74d3c5b040480516/] Now open your project as workspace Click the button GET A CONFIGURATION FILE on the instructions page which will take you to your firebase console Login and create your Firebase Project if you haven't created by typing your App...
Read More
How to install Cocoapods

How to install Cocoapods

Start by typing below command in terminal [crayon-59c7ec74d42c0473756406/] In most cases just the second command would however sometimes you may get below error in case you have an older version of activesupport installed Error installing cocoapods: activesupport requires Ruby version >= 2.2.2 The first command will make sure you don't get the above error Once the above commands run successfully type below command to set up Cocoapods master repo [crayon-59c7ec74d42c8960530595/] This will download the master repo. The size of the repo is quite big around 380MB so it can take a while depending upon your internet download speed. Once the above is completed, navigate within terminal to your Xcode project and run below command to create the podfile [crayon-59c7ec74d42cc860468969/] Open the newly created podfile with text editor, and add the required libraries e.g. pod 'Google/Analytics' Then run below command to install the required libraries [crayon-59c7ec74d42d0586865883/]  ...
Read More
Configure and handle Apple Push Notifications (APN)

Configure and handle Apple Push Notifications (APN)

Configuring Apple Push Notifications (APN) Here are the steps to configure Apple Push Notifications on your IOS app 1. Open project settings, Capabilities Tab 2. Turn On Push Notifications as shown below   3. For security reasons Push Notifications require appropriate SSL Certificates which can be created through your Developer Portal. Here are the steps to create the required certificates. 3 A. Login to your Apple Developer portal 3 B. Click on App IDs under Identifiers 3 C. Click on your IOS App ID entry which shows the services enabled for your app 3 D. Click the Edit button at the bottom of the screen 3 E. Turn on Push Notifications (if not already enabled) 3 F. Click the Create Certificate button under the Development SSL Certificate  3 G. Open Keychain application and Request a Certificate from a Certificate Authority as shown below 3 H. On the Certificate information add your email address, Name (make sure there are no spaces) and Save to Disk 3 I. Double click the certificate to add it to your...
Read More

Customising Navigation Bar or Header in an IOS app

Customising Navigation Bar or Header in an IOS app would involve following things Changing Background Colour Adding a logo Changing Text Colour You would need to add below code mostly to your Initial View Controller [crayon-59c7ec74d4979114912612/] Just add the lines as per your requirement and change the colour values as per your needs. barTintColor method defines the Tint Color to apply to the navigation bar background The tintColor combines with the translucent part of the bar along with the content behind the bar and results in some different colour. To achieve full control over the colour displayed on the navigation bar you would need to set translucent option to false for the navigation bar appearance method [crayon-59c7ec74d4981486917241/] The other bit of code is self explanatory. It just applied a background colour and shows how to add a logo to your app header...
Read More