Monday, 26 November 2012

Issues faced and Resolved while doing HotSpot app.


Issues faced from HotSpot:

 Third party API integration for iOS development

if you have source code(.m files) , no need to follow below steps. You just drag source code folder into your Xcode project.

-> If you want to integrate any third party API's and when you have only .a(binary) file,
- you just need to drag the .a file in to your frameworks folder.
- Make sure that it is added to build phases
(goto Build phases and check in link Binary with libraries option, there you should see .a file).
- You have to Set two paths for that API in to your xcode project:
- one is for .h files (header search path)
- one is for .a file  (Library search path)
Here you can't see the .m files when you download these type of API's
- Following are the examples for 2 paths.
../build/include
../build/lib/arm
- If you are not able to access the .m files from that API, and not able to read any c,c++ headers from that library,
- just rename the extensions of .m files of your project to .mm file extension(.mm is for Objective-C++ source file. if you are using c++ API's, you need to change the files form .m to .mm).
Thus you can access the headers from your downloaded APIs.

How to see the logs in device?

-> If you want to see the device logs,
- connect the device
- run the app
- open the organizer in xcode
- select the devices tab
- choose device logs from your selected devices.

Even though your device is not recognized by xcode, you can see the logs from device by using organizer in your xcode.


How to see/get the data from device?
Generally whenever we want to see the data(list of files or folders) in documents folder, we have to go through the document path like  /Users/systemname/Library/Application Support/iPhone Simulator/5.0/Applications/appID/Documents/filename.

but whenever you are going to debug the app on the device (iPhone or iPod or iPad), you can see all the device's data also.
The following are the steps to see the device's data:
- Connect the device.
- open the "organizer" in your xcode.
- choose "devices" tab in organizer window.
- select the connected device.
- select the option "applications" from your device, it will list out the applications that your device  contains.
- you can choose any one of them and see the data of your app in device.
- you can download the data from your device by clicking on download button below.

No comments:

Post a Comment