Tuesday, April 19, 2011
Void Google Chrome pointer spinning for long Ajax connection
Wednesday, March 2, 2011
how to create .ipa file for iPhone apps
Here is the process of creating ipa file from .app file.
Step 1: Create a folder named Payload anywhere in your computer.
Step 2: Build your app using AdHoc profile and then put .app file in this folder.
Step 3: Then compress the Payload folder in Zip format.
Step 4: Now you have to rename the .zip file into .ipa file.
Your .ipa file is ready. You can send the file along with AdHoc profile for testing.
Tuesday, March 1, 2011
Using xcconfig, abandoning the Build Panel in XCode
XCode provides a better solution called xcconfig files. Everything you can do in the build panel can be done in xcconfig files, and you can actually read them and make comments. So let’s make some.
- Create a new Window-Based iPhone Application. (Everything we do here works exactly the same for Mac.)
- Add a new group to your Groups & Files called “Build Configuration”.
- Add a new file to the group. Under “Other” select “Configuration Settings File.” Call it “Shared.xcconfig”.
- Create three more xcconfig files called Debug, Release and Application.
- Double-click the Project to open the Project Info panel, and select Build.
- Select Configuration: “Debug” and Show: “Settings Defined at This Level.”
- Select all the settings (you can use Cmd-A here).
- Copy them with Cmd-C.
- Go back to Debug.xcconfig and paste with Cmd-V. You now know how to find out the xcconfig syntax for any Build Panel setting you’re uncertain of.
- Go back to the Build Panel and hit Delete to set all settings to default. Select “Show: All Settings” so you can see your settings again.
- In the lower-right of the panel, for “Based On:” select “Debug.” You should see your old settings show back up, but not bold this time.
- Repeat for Configuration: “Release”. Copy them to Release.xcconfig and delete them from the Build Panel.
- Double-click on the Target, and repeat the process, moving both its Debug and Release settings to Application. Put in a comment to indicate which are the Debug settings and which are the Release settings. We’ll clean them up shortly. Select “Configuration: All Configurations” and “Based On: Application.”
We’ve now moved everything from the build panel to the xcconfig files, and the system should build. Debug and Release are slightly confused because we mixed the settings in Application, but we’ll fix that now.
Look in Application.xcconfig, and move anything that’s in Debug but not in Release to Debug.xcconfig, and anything in Release but not Debug to Release.xcconfig. Anything that’s in both, delete the second copy of.
Anything that is in both Release and Debug, move to Shared, and put #include "Shared.xcconfig" at the top of the Release and Debug configs.
If you’ve followed all the instructions, you should have four files that look like this (assuming your product’s name is “Test”):
Shared.xcconfig
ARCHS = $(ARCHS_STANDARD_32_BIT) SDKROOT = iphoneos2.2.1 CODE_SIGN_IDENTITY = CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer PREBINDING = NO GCC_C_LANGUAGE_STANDARD = c99 GCC_WARN_ABOUT_RETURN_TYPE = YES GCC_WARN_UNUSED_VARIABLE = YES
Release.xcconfig
include "Shared.xcconfig"
COPY_PHASE_STRIP = YES
Debug.xcconfig
include "Shared.xcconfig"
ONLY_ACTIVE_ARCH = YES COPY_PHASE_STRIP = NO GCC_DYNAMIC_NO_PIC = NO GCC_OPTIMIZATION_LEVEL = 0
Application.xcconfig
INFOPLIST_FILE = Info.plist PRODUCT_NAME = Test ALWAYS_SEARCH_USER_PATHS = NO GCC_PRECOMPILE_PREFIX_HEADER = YES GCC_PREFIX_HEADER = Test_Prefix.pch
If you Build&Run now, everything should work. It’s not a great build configuration, but it’s Apple’s default in a form that we can start understanding and improving.
http://robnapier.net/blog/build-system-1-build-panel-360#more-360
Sunday, February 27, 2011
How to Extend Mac OS X 10.x Partition in Vmware Workstation
Thursday, February 24, 2011
Add labels to Google blogger by API
http://gdatatips.blogspot.com/2008/07/labeling-blogger-posts.html
$label1 = new Zend_Gdata_App_Extension_Category(
'foo', 'http://www.blogger.com/atom/ns#');
$label2 = new Zend_Gdata_App_Extension_Category(
'bar', 'http://www.blogger.com/atom/ns#');
$entry->setCategory(array($label1, $label2));
Java:
http://www.one-minute-info.com/2010/06/add-label-to-posts-via-java-blogger-api.html
myEntry = new Entry();
myEntry.setTitle(new PlainTextConstruct("some title"));
myEntry.setContent(new HtmlTextConstruct("some HTML body"));
categories=myEntry.getCategories();
category= new Category();
category.setTerm("whatever label you like such as Google Blogger or Java API");
category.setLabel(null);
category.setScheme("http://www.blogger.com/atom/ns#");
category.setLabelLang(null);
categories.add(category);
URL postUrl = new URL("http://www.blogger.com/feeds/123456/posts/default");
myService.insert(postUrl, myEntry);
Wednesday, February 23, 2011
google data and blogger api
http://code.google.com/apis/blogger/docs/1.0/developers_guide_js.html
http://itcoding.blogspot.com/feeds/posts/default?alt=json-in-script&category=mobile
Wednesday, February 16, 2011
Build and Archive iOS apps by command line
#!/bin/sh
# build.sh
#
# Created by Vincent Daubry on 19/01/10.
# Copyright 2010 OCTO. All rights reserved.
PROJDIR=${WORKSPACE}/___PROJECT NAME___
PROJECT_NAME=___XCODE PROJECT NAME___
TARGET_SDK="iphonesimulator4.0"
PROJECT_BUILDDIR="${PROJDIR}/build/Release-iphoneos"
TARGET_TEST_NAME="UnitTests"
BUILD_HISTORY_DIR="/Users/barbu/Desktop"
DEVELOPPER_NAME="iPhone Developer: M VINCENT DAUBRY (J9TS3TJRYX)"
PROVISONNING_PROFILE = "/Users/barbu/Desktop/desire.mobileprovision"
# compile project
echo Building Project
cd "${PROJDIR}"
xcodebuild -target "${PROJECT_NAME}" -sdk "${TARGET_SDK}" -configuration Release
#Check if build succeeded
if [ $? != 0 ]
then
exit 1
fi
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${PROJECT_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPPER_NAME}" --embed "${PROVISONNING_PROFILE}"
codebuild -target MyApp -configuration AppStore BUNDLE_VERSION=`date "+%y%m%d"`