Atomic Vs Non-atomic

Atomic

  • is the default behavior
  • will ensure the present process is completed by the CPU, before another process accesses the variable
  • is not fast, as it ensures the process is completed entirely

Non-Atomic

  • is NOT the default behavior
  • faster (for synthesized code, that is, for variables created using @property and @synthesize)
  • not thread-safe
  • may result in unexpected behavior, when two different process access the same variable at the same time

Linking problem in Xcode when using a dependent subproject

Issue

Undefined symbols:
  "_AVCaptureSessionPresetMedium", referenced from:
      _AVCaptureSessionPresetMedium$non_lazy_ptr in libZXingWidget.a(ZXingWidgetController.o)
     (maybe you meant: _AVCaptureSessionPresetMedium$non_lazy_ptr)
  "_CVPixelBufferGetHeight", referenced from:
      -[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
  "_CVPixelBufferLockBaseAddress", referenced from:
      -[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
  "_AudioServicesPlaySystemSound", referenced from:
      -[ZXingWidgetController presentResultForString:] in libZXingWidget.a(ZXingWidgetController.o)
  "_AudioServicesCreateSystemSoundID", referenced from:
      -[ZXingWidgetController viewWillAppear:] in libZXingWidget.a(ZXingWidgetController.o)
  "_CVPixelBufferUnlockBaseAddress", referenced from:
      -[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
  "_CVPixelBufferGetBaseAddress", referenced from:
      -[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
  "_CVPixelBufferGetBytesPerRow", referenced from:
      -[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
  "_iconv_close", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned char const*, unsigned long, char const*)in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)
      zxing::qrcode::DecodedBitStreamParser::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned char const*, unsigned long, char const*)in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)
  "_OBJC_CLASS_$_AVCaptureVideoPreviewLayer", referenced from:
      objc-class-ref-to-AVCaptureVideoPreviewLayer in libZXingWidget.a(ZXingWidgetController.o)
  "_iconv", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned char const*, unsigned long, char const*)in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)
  "_OBJC_CLASS_$_AVCaptureSession", referenced from:
      objc-class-ref-to-AVCaptureSession in libZXingWidget.a(ZXingWidgetController.o)
  "_OBJC_CLASS_$_AVCaptureDevice", referenced from:
      objc-class-ref-to-AVCaptureDevice in libZXingWidget.a(ZXingWidgetController.o)
  "_kCVPixelBufferPixelFormatTypeKey", referenced from:
      _kCVPixelBufferPixelFormatTypeKey$non_lazy_ptr in libZXingWidget.a(ZXingWidgetController.o)
     (maybe you meant: _kCVPixelBufferPixelFormatTypeKey$non_lazy_ptr)
  "_OBJC_CLASS_$_AVCaptureVideoDataOutput", referenced from:
      objc-class-ref-to-AVCaptureVideoDataOutput in libZXingWidget.a(ZXingWidgetController.o)
  "_CVPixelBufferGetWidth", referenced from:
      -[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
  "_AudioServicesDisposeSystemSoundID", referenced from:
      -[ZXingWidgetController dealloc] in libZXingWidget.a(ZXingWidgetController.o)
  "_OBJC_CLASS_$_AVCaptureDeviceInput", referenced from:
      objc-class-ref-to-AVCaptureDeviceInput in libZXingWidget.a(ZXingWidgetController.o)
  "_AVLayerVideoGravityResizeAspectFill", referenced from:
      _AVLayerVideoGravityResizeAspectFill$non_lazy_ptr in libZXingWidget.a(ZXingWidgetController.o)
     (maybe you meant: _AVLayerVideoGravityResizeAspectFill$non_lazy_ptr)
  "_CMSampleBufferGetImageBuffer", referenced from:
      -[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
  "_iconv_open", referenced from:
      zxing::qrcode::DecodedBitStreamParser::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned char const*, unsigned long, char const*)in libZXingWidget.a(DecodedBitStreamParser-64E27B33E79CBC52.o)
  "_AVMediaTypeVideo", referenced from:
      _AVMediaTypeVideo$non_lazy_ptr in libZXingWidget.a(ZXingWidgetController.o)
     (maybe you meant: _AVMediaTypeVideo$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status

SOlutions:
make sure include "CoreMedia.framework","AudioToolbox.framework","CoreGraphics.framework","CoreVideo.framework","AVFoundation.framework","libiconv.dylib" frameworks in project in Build Phases

Comparison tools for two xcode files

You can compare two Xcode project using FileMerge tool available with Xcode.

Below are steps for comparison in Xcode 6.1

  1. Right click on Xcode icon -> Select ‘Open Developer Tool’ -> Select ‘FileMerge’ option

Screenshot 0

  1. This will open window as show below :

Screenshot 1

  1. Select two Xcode project which is to be compared by clicking Left and Right button
  2. Click on ‘Compare’ button. This will create list of file that are added, removed or altered by comparing two Xcode project.

Screenshot 2

Install IPA with iTunes 12

You can install IPA file using iTunes 12.x onto device using below steps :

  • Drag-and-drop IPA file into ‘Apps’ tab of iTunes
  • Connect your device
  • Select your device on iTunes
  • Select ‘Apps’ tab

install-ipa

  • Search app that you want to install

install-ipa2

  • Click on ‘Install’ button. This will change to ‘Will Install’

install-ipa3

  • Click on ‘Apply’ button on right corner. This will initiate process of app installation. You can see status on top of iTunes as well as app on device.
    install-ipa4

install-ipa5