Add Core Data to an Application in Xcode

Who should read this Blog: User must know about Basic Concept of CoreData. Those who want to convert their non-Core data Application to a Core Data Application. Those who have some experience working with iOS Application. You must have a Sample Project to which you can convert it to CoreData Project.

So Let’s get started with Step by Step Process.

  1. First and Foremost is to Add CoreData.framework to the application directory.
  2. Now you need to add data model to your Application.

How can you do this?

Go To File-> New File->iOS->Core data->Data Model
Select Next and Give appropriate Name to your Data Model

Continue reading

Detecting current postion of mobile devices using PhoneGap Geolocation API

Introduction: Geolocation is the property by which we can detect the current position of the device using latitude and longitude. We can get the location by invoking GPS(Global Positioning System) and the location obtain from network signals such as IP address, WiFi and mobile networks. PhoneGap provides the geolocation API which can be used to detect the device position by invoking the GPS. So with out using any native plugin, we can get the device geolocation simply using JavaScript.

Description: PhoneGap Geolocation API is basically based upon the W3C Geolocation API and it follows the same specification that W3C Geolocation does to detect the device latitude and longitude. So after integrating the Geolocation API, when we run the application in device it will ask for the user permission in iOS devices as per the privacy guidelines. If we cancel the permission then the app will not be able to obtain the geolocation.

Continue reading

Creating PhoneGap Android application using version 3.0.

Introduction: Previously PhoneGap was providing total package as a single version which contains all the necessary files for each platform. We are downloading the zip as a version and integrating the required files inside our Android application. It was working same till version 2.9 but from version 3.0 onwards the scenario is little different.

Description: From 3.0 onwards PhoneGap is not providing the zip file to download and integrate the same with our application. Now it is giving the install option, so we can directly install the PhoneGap into our system and use the same to create the application. Here we will focus on creating the Android application using version 3.0.

To install the PhoneGap we need some dependencies which will help PhoneGap to work properly. Continue reading

Hiding status bar while displaying splash screen in PhoneGap iOS application

Introduction: Most of the iOS application starts with the splash screen with the spinner which makes the sense that application is loading it’s required files and resources. But if you focus on the screen, you will find that while showing the splash screen, some part of the splash screen is hidden by the status bar.

Description: If we want to hide the status bar while showing the splash screen, it is very easy and we can view the splash screen completely by ignoring the staus bar above it.

Here is the the simple technique bellow.

1. Open Xcode and click on the project in Project Navigator.

2. In the target panel select the project and it will open the project details.

3. Choose the general tab form the list and we can find the Development Info panel in the list. And in Development Info there will be an option for Status Bar Style.

4. Then we need to tick the check box for “Hide during application launch”. Continue reading

Taking Photos Using PhoneGap Camera API

Introduction:
While working on a PhoneGap application , there was an requirement to take photo using device camera and upload in the sever. And PhoneGap provides an easy way to interact with the device camera and take photo using Camera API.

Description: Basically there are two ways to take photo from mobile device.

1. Taking photos using Camera
2. Taking photos from Library/Gallery

So here we will  focus on displaying the image in our application using both ways. PhoneGap provides the camera.getPicture method which can help us to invoke camera and take images from mobile devices.

Continue reading

Handling PhoneGap iOS Application Using Custom URL Scheme

Introduction:
Custom URL scheme is the mechanism through which third party applications can interact with each other. Suppose we want an interaction between our app and the default email application in the device. Apps that support custom URL schemes can use the schemes to communicate with other applications and also initiate specific tasks. For example, an app can open from default email app in IOS devices using custom URL.

Description:
To communicate with an app using a custom URL, we need to register the custom URL scheme in our appname-info.plist file. Apple by default supports for the http, mailto, tel, and SMS URL schemes. So if our URL scheme matches with the scheme mentioned by Apple then the Apple provided application will launch instead of our application. Therefore we need to be very careful before declaring the scheme.

Continue reading

Xcode 4.5 error – Timed out waiting for app to launch

Sometime we usually face the problems for launching the app directly from latest Xcode.
During the time of debugging we often encounter ‘Time Out ‘error. To fix the issue many people tried it in various ways. As an IOS developer I have also faced the same issue while launching app form Xcode box. Xcode shows me that message as “Could not launch “appname”. Timed out for the app to launch”.

I just figured out what exactly the problem with latest Xcode devises, and followed the following method to overcome it ……

Continue reading