Showing posts with label iOS. Show all posts
Showing posts with label iOS. Show all posts

Tuesday, December 23, 2014

Weather for your business?

A beautiful iPhone app before the year end. It is a business analytics app.
In App Store: https://itunes.apple.com/us/app/weathr-lite/id980422041?ls=1&mt=8

Wednesday, October 1, 2014

Directory with extra fun

Employee look up app with fun ideas.


Monday, November 18, 2013

How to get iDevice hardware model

size_t size = 100;
char *hw_machine = malloc(size);
int name[] = {CTL_HW,HW_MACHINE};
sysctl(name, 2, hw_machine, &size, NULL, 0);
NSString *hardware = [NSString stringWithUTF8String:hw_machine]; //e.g. iPhone4,1
free(hw_machine);

Wednesday, November 6, 2013

How to resign an IPA with new bundle Id, certificate and entitlements

  1. Create an Entitlements.plist using Xcode
    1. Include the following keys values in the plist file. 
      1. application-identifier (String) -> 3Q83MXXZGH.com.company.appname
      2. get-task-allow (Boolean) -> NO
  2. Put the Entitlements.plist in the same folder of the app.ipa file
  3. Unpackage the app
    1. unzip app.ipa
  4. Delete current code signature
    1. rm -rf Payload/MyApp.app/_CodeSignature/
  5. Open Payload/MyApp.app/Info.plist in Xcode and update the bundle ID(CFBundleIdentifier)
  6. Copy the new .mobileprovision file to Payload/MyApp.app/embedded.mobileprovision
  7. Run the codesign command
    1. codesign -f -s "iPhone Distribution: Company Certificate" --resource-rules Payload/MyApp.app/ResourceRules.plist --entitlements Entitlements.plist Payload/MyApp.app
  8. Repackage the app
    1. zip -qr app-resigned.ipa Payload/
Sample Entitlements.plist

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">


 application-identifier
 3Q83MXXZGH.com.company.appname
 get-task-allow
 


Tuesday, September 10, 2013

Experiencing Sencha Touch: VW Dealer app

Sencha Touch, a high-performance HTML5 mobile application framework. We used Sencha to build an iPad application that allows Volkswagen field managers and dealers to show customers everything about VW cars.
Application features:
  • Work offline.
  • Update application data without reinstalling the app.
  • Support multiple events.
  • Capture customer information locally and upload to server later on.
  • Vehicle gallery and videos slide show.
  • Vehicle trim specs, color specs, technical specs, pricing.
  • Vehicle comparison. 
Since this app needs to work with iPad 1st generation, memory management became very important. We spent good amount of time to tweak the app to have small memory footprint. 

The app is being used at places with no wifi. When the application is installed, it downloads all data from a server and stored on the iPad using HTML5 local file system feature. App uses high quality gallery images, so using manifest method would exceed the browser storage limit.

The app itself has a version control built-in so every update is an incremental update instead of re-download all data again.

Customer data are stored on the app using Sencha store data model.

2013 Sep updates: Redesign user interface!











Monday, June 3, 2013

iPhone app: real time video sharing

An native iPhone app prototype that steams camera video between two iPhones. Not very complex, but it took a good amount of research and learning. Major classes are NSOperation, AVFoundation and GameKit.
  • Multi-threading is necessary to prevent UI lockup, so NSOperation is used. 
  • AVFoundation - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer (CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection is the key element to capture video frames from camera. 
  • GameKit peer-to-peer communication via Bluetooth is used to send and receive data between two devices. 
Result was that I was able to reach about 4 frames per second. Did not get to try Game Center peer-to-peer via local WiFi. I believe that will increase the frame rate.