Saturday, March 21, 2015

How to symbolicate ios crash reports ?


Symbolication:
It is the process of  resolving(convert,translate) hexadecimal codes to apt function names and line numbers
 
Crash report:
It describes the condition of iOS which led to crashing of the app

Steps:
  1. Connect the device to a PC which has iTunes installed
  2. Then sync the device with iTunes(iPad should be unlocked)
  3. Navigate to the following path
          Windows 7 & vista:
           C:\Users\USER\AppData\Roaming\Apple computer\Logs\CrashReporter\MobileDevice\
          Windows XP:
          C:\Documents and Settings\USER\Application Data\Apple computer\Logs\CrashReporter\
          OSX:
          ~/Library/Logs/CrashReporter/MobileDevice/

     4.  Search for the appropriate device name, then look for the file by app name and time stamp 

     5.  Copy that then we can easily symbolicate the crash log which is in hexadecimal format using the .dysm file           with the iPad binary.we can find the .dysm file and iPA using organiser by making it to show in finder

    6. Launch xcode then open organiser click devices and then drop the crash log in that and it will get symbolicated.

Note:
The organiser should be once we used to create the build.

Apple IAP ( In-App Purchase ) Bundle Id

Bundle Id is case sensitive

If it is com.test.myapp in the iTunes Connect but com.test.Myapp in App-Info.plist — that is default Bundle ID set in your app if you named your Xcode project “Myapp” — IAP will not work.

Localhost location in OSX

There are actually two place where where OSx serves website by default:

/Library/WebServer/Documents --> http://localhost

Wednesday, March 18, 2015

Find routing table of android

  • Open the command prompt(windows) or terminal(mac & linux)
  • Do a cd(change directory) to platform-tools directory which is inside android sdk directory
  • Environment
         Windows
          adb shell cat /proc/net/route
         Mac & Linux
          .\adb shell cat /proc/net/route

error: more than one device and emulator

To Target a particular emulator
adb -s adbdeviceid shell 

adbdeviceid
you can find it using the following command 
./adb devices 

To Target an USB attached device
adb -d shell

To Target an emulator
adb -e shell

adb commad to find out if VPN tunnel is established in Android

If there is any VPN tunnel established the following command will show

Windows:
adb shell netcfg | grep tun0


Mac:
./adb shell netcfg | grep tun0


If VPN is established the result would be something like this

  tun0     UP                                  172.17.0.4/24  0x00000051 00:00:00:00:00:00

else the result would be something like this

  error: protocol fault (no status)

Tuesday, March 17, 2015

iOS ThirdParty frameworks:Why it is bad and disliked by many ?

The biggest reasons apple doesn’t like third party frameworks is because of they are slow and defame apple’s reputation. Apple want to see high quality and high performance apps on their store.

you might wonderding why they are slow?

well, if you have some kind of knowledge on multithreading and concurrent programming. You will get to the answers right away.

in real life, you go to grocery store and you often see lots of people wait in line for their turn. in a busy day, you have to wait much longer if there is only one line opened.

Same things to the iOS applications. if you use any third party’s framework. you load everything onto the main thread. if this is a large application and has many functions, images or pages to load, the wait time is much longer. 
if network access is required. it is even worse.Apple give you maximum 10 seconds to load your applications or terminate your app otherwise.

Apple provide cool features multithreading for developers to overcome this type of problems. main thread is really mean for UI. It is not suppose to be blocked in any way. all other contents should be loaded concurrently or under the backgrounds.  there is no ways you can achieve this without taking advantage of native iOS SDK by using Objective-C or Swift

I have tried a couple of most popular framework in the past. here are some of major problems I experienced.
  • very limited functionalities, way far from what apple has offered. for instance, won’t be able to access to the hardware.
  • very low performance compare to native apps. be realistic, javascript always few seconds delay for the touch event.
  • Too many bugs that beyond developers control. okay, you work on an exciting project, later on you found out there are some tough bugs either crash your app or provide very bad user experiences. you talk to their tech support, bug is confirmed but the cure won’t be available until another 3 months.
  • third party frameworks always 3-6 months late than current iOS SDK from Apple, sometime even longer. well, you know iOS 8 is cool, you want to make a cool app for that. you land on one of there third party framework, you find out they don’t support it until another 6 months. by the time, you finally see they have started offering iOS 8 support. however, there are already tons of similar apps fill the shelf of app store.

Sunday, March 15, 2015

A Google Search tip

The below template will get the results from the specified site only
site:sitename space search-keyword
Example:
site:http://stackoverflow.com iOS