Sunday, July 7, 2013

How to get apple developer provision profile id

When each time the provision profile is updated in apple developer portal website, downloading the profile will get a new id. If the id does not match, the build will fail because of the signing error saying "the provision profile XXXXXX cannot be found".
However, it seems xcode organizer does not show the profile id for available profiles for identitying the signing error. Neither the Apple developer portal will show this profile id when downloading the profile.
Fortunately, the provision profile id is shown on the iphone configuration tool. So it can be used to find out which profile has which id required by signing.

xcode build settings for debug symbol

Generate debug symbol 
The debug symbol for xcode project is controlled by project settings of "Apple LLVD compiler 4.2"/"generate debug symbol". The recommendation is setting it to YES for both debug and release build. So that it can be used for crash report symbolization.
For application, this will generate a separate dsym file in build output folder. For static library, this will only increase the size of the generated a file

Deployment postprocessing
This is a generic control to decide whether other deployment operation should be performed, particular, Strip Linked Product is executed or not. 
For static library, the recommended setting is NO for both release and debug build, to not remove symbols.
For application build, the recommended setting is Yes for release build and No for debug build. So that release build can have a smaller size.

Strip Debug Symbols During copy
This flag decides when copying the dependent library for building the project, should the library's symbol be removed. It does not affect the build output binary. 
The recommended setting is set to NO for both release and debug build, as the build output needs to include the dependent libraries' symbol to debug or symbolize the library code. 
(It seems for ios project, this setting does not have any effect.)

Strip linked product
This flag will reduce the size of the executable by removing the symbol from it. But it will cause the crash dump not have any symbol, and it will need a separate symbol file to symbolize the crash report.
The flag will not change sym file size.
For library, the recommended setting is NO, so it includes the debug symbol in the .a file
For application, if the app size matters, set it to YES. otherwise, set it to NO.








Friday, July 5, 2013

"Build active architecture only" setting for ios xcode projecgt

When building ios static library, "build active architecture only" does not affect simulator build, it only builds i386 architecture without any armv7 or armv7s build. However, for device build, if it is set to NO. Then all available architecture will be built (armv7 and armv7s); if it is set to YES, then only the active architecture will be built. But how it decide what is the current active architecture? actually, xcode decides it based on build destination, that is, the connected device or simulator type selectedfrom the build type dropdown listbox.
If the current device is armv7s, then it will build armv7s output. If no real device is connected, then it will build armv7 output, which will also support older device types.

Create executable bash script file in mac

Make a txt file to executable script file
1. Use text editor to create the script file
2. right click the file and select "get info"
3. change open with to terminal app
4. run sudo chmod 755 scriptfilename to make it executable by click

Scroll pages in terminal app

To view page up: shift+fn+upArraw or fn+U
To view next down: shift+fn+downArraw or fn+D
to exit, press Q

Tuesday, July 2, 2013

Cordova android create error: "SDK does not have any Build Tools installed."

When running create command on mac to create android cordova project, an error may happen when executing "ant jar". The reason is when updating the Android SDK Tool to  22, somehow the Android SDK build tool was not installed. This can be found from Android SDK Manager, if Android SDK build tool item is not shown under tools item.

Somehow even if running check for update from eclipse does not install it.

To fix the issue run the following command from terminal app.

android update sdk -u

In addition, it is easy to check or change Android SDK manager proxy setting by just running "android" command from terminal.

If you run "create" from phonegap download, then this will not be an issue, as phonegap download already pre-build and install the cordova.jar within the downloaded zip file.