Skip to main content


Xcode 8 automatic code signing problem with Jenkins

Xcode 8 automatic code signing is great. However if you try to use Jenkins to automate your app build with a specific provision profile, you would want to use manual code signing. What I wanted to do was use automatic code signing during development and use manual code signing with Ad-Hoc provision with Jenkins. To switch from automatic to manual code signing, you need to change the following setting in the project file ([project name].xcodeproj/project.pbxproj). Change "ProvisioningStyle = Automatic" to "ProvisioningStyle = Manual" By default "ProvisioningStyle = Automatic" is not in the project.pbxproj. You just need to uncheck and check "Automatically manage signing" in app Target -> General in Xcode to add that setting. Now in Jekins, you want to add this shell script before you run the Xcode build command to change "ProvisioningStyle = Automatic" to "ProvisioningStyle = Manual" sed -i '' 's/Provisio

Add tint to UIImage

I have been working on a SDK that allows user to customize colors for images. In many cases, I need to add an image to a button with different color at run time. So using just tintColor is not going to work. The following method will mask an image with the color you define. - (UIImage *)maskWithColor:(UIColor *)color { CGImageRef maskImage = self.CGImage; CGFloat width = self.size.width * self.scale; CGFloat height = self.size.height * self.scale; CGRect bounds = CGRectMake(0,0,width,height); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef bitmapContext = CGBitmapContextCreate(NULL, width, height, 8, 0, colorSpace, kCGBitmapAlphaInfoMask & kCGImageAlphaPremultipliedLast); CGContextClipToMask(bitmapContext, bounds, maskImage); CGContextSetFillColorWithColor(bitmapContext, color.CGColor); CGContextFillRect(bitmapContext, bounds); CGImageRef cImage = CGBitmapContextCreateImage(bitmapContext); UIImage *col

Using xcodebuild To Export a .ipa From an Archive

Found this helpful article.  source: Clean project xcodebuild clean -project $projectname.xcodeproj -configuration Release -alltargets Create project archive xcodebuild archive -project $projectname.xcodeproj -scheme $schemename -archivePath $projectname.xcarchive Create IPA xcodebuild -exportArchive -archivePath $projectname.xcarchive -exportPath $projectname -exportFormat ipa -exportProvisioningProfile “Provisioning Profile Name”

Weather for your business?

A beautiful iPhone app before the year end. It is a business analytics app. In App Store:

Directory with extra fun

Employee look up app with fun ideas.

VW Interactive Ad Unit

Built the API services for an Ad unit that is personalized for each CBS fantasy football team. Each team plays 10 unique questions each week and earn points.  Leader board for each league.  History for last week's score. 

How to install ImageMagick with MAMP

1. Install Homebrew ruby -e "$(curl -fsSL" 2. Install ImageMagick for the PHP version your MAMP is running. brew search imagick brew install php55-imagick After installation, the ImageMagick PHP extension is created in /usr/local/Cellar/php55-imagick/3.1.0RC2/ 3. Disable the DYLD_LIBRARY_PATH variable in Apache's environmental variables. vi /Applications/MAMP/Library/bin/envvars Comment out the following line: export DYLD_LIBRARY_PATH 4. Update php.ini to include vi /Applications/MAMP/bin/php/php5.5.3/conf/php.ini Add the following line. extension="/usr/local/Cellar/php55-imagick/3.1.0RC2/"; 5. Restart MAMP 6. Check if imagick is included in phpinfo()