2010-03-18

About iPhone

Optimizing Your Project
There are different people on your team list.
Create a list and register them on AppleDevSite as a developer, create your project list to upload (i.e. StarRD.txt) in your porta;
FirstName   LastName   Email
Joe    Doe    joe.doe@mail.com

There are developer certificates for each team member.
Once each of your team members has created a Certificate Signing Request (i.e. EnriqueEscobar.CertSigningRequest) you may submit uploading at AppleDevCenter.

There is an app ID to provide as com.domain.YourAppID.

There is a provisioning to set. You will need:
  • ProfileName
  • Certificate (a list of registered developers)
  • AppID
  • Device (list of device to register)

There is to validate the developer certificate once your portal admin has accepted you.
Retrieve and install in your own OSX machine the AppleDeveloperCertificate (AppleWWDRCA.cer) and your certificate (developer_identity.cer), you may download it at AppleDevSite.



There is a mobileprovision to deploy.

There are different configurations:

There is a configuration to manage in XCode for your your ProjectName:

  • Right click and choose GetInfo dialog ( or command I)
  • Select tab Configuration
  • On list of configurations choose Release and select the option Duplicate
  • Give a name to this configuration (i.e. Distribution)
  • Close window
There is a Target Information to set:
  • Right click and choose GetInfo dialog
  • Select Build tab
  • Choose Distribution from Configuration drop-down
  • In the Architectures section in the list of settings, choose a Base SDK (e.g. Device - iPhone OS 2.2.1)
  • From the Code Signing Section, under Code Signing Identity, choose the appropriate profile (e.g. Ad Hoc or Distribution Profile)
  • Select Properties tab
  • Set Executable name (e.g. theAstrologerFree). There is a default value here: ${EXECUTABLE_NAME} which will also work for most projects
  • Set Identifier to com.domain.application-name (e.g. com.3SixtySoftware.theAstrologerFree). There is a default value here: com.your company.${PRODUCT_NAME:identifier} which you may work for your project. If you run into errors or conflicts with other applications try replacing ${PRODUCT_NAME:identifier} with a unique string that represents your application name
  • Set Icon File to Icon.png
  • Make sure you have an icon that is 57x57 pixels, with the name Icon.png in the project
  • Set Version # (e.g. 1.1)
  • Close the window
For each active configuration you have to update your project:

There are an Active Configuration to set:
  • Select the Debug workspace button
  • From the drop-down (upper left) choose:
    • Choose the Device Setting you plan to target under Active SDK (e.g. Device - iPhone OS 2.2.1)
    • Choose Distribution as the Active Configuration
  • Select the Project workspace button (the button to the left of Debug)
  • If creating an Ad Hoc Distribution:
    • Create new file (Command N), select Code Signing, choose Entitlements, click Next
    • Name the file Entitlements.plist
    • Uncheck the get-task-allow button
    • Save file
    • Make sure the file is at the root of project hierarchy (e.g. drag the file just below the Project name)
    • Select the Target
    • Right click and choose Get Info dialog
    • Select Build tab
    • Fill in the Code Signing Entitlements with Entitlements.plist
There is a target settings verification to do:
  • Select the Target
  • Right click and choose Get Info dialog
  • Select Properties tab
  • Note the Executable name (e.g. theAstrologerFree)
  • Select Build tab
    • Scroll down to Packaging
    • Verify (or input) the Product Name to match the Executable name from above
  • Close the window

There are different *.plist foreach configuration to verify:


  • Check the Info.plist in the resources folder
  • Check the following:
    Bundle Display Name - this is the text that will appear on the iPhone Home screen under the icon
    Executable name - this should match what youʼve entered in the Properties settings
    Icon must be set to Icon.png
    Bundle Identifier - for example com.3SixtySoftware.theAstrologerFree
    Bundle version - for example 1.1

For each configuration you have a Certificate *.cer and an ID *.p12 (it starts with iPhone):



There are different certificates for different users:


There is a Clean and Build to do:
  • From the Build menu choose choose Clean All Targets
  • From the Build menu choose Build (Command B)

RtoCSharp

We always read the manual.
Set a environment variable ROOTDRIVE='C:'

2010-03-07

About Linux

Optimizing Hard Drive
There are good Drives to have:
  • /root folder with its environment variable export ROOT=/root
  • /Applications folder with its environment variable export APPS=/Applications
  • /home folder with no environment variable export
  • /Data folder with its environment variable export DATA=/Data
  • /Shar folder with its environment variable export SHAR=/Shar
  • /opt folder with its environment variable export OPTS=/opt

2010-03-03

About CSharp

CSharp Tools

There are nice tools to optimize your work:
  • ReSharper
  • .Net managed (plug-in for ReSharper) resources StyleCop
  • .Net managed assemblies FxCop
  • Reflector
  • GhostDoc
  • NDoc3 (for Mono)
  • NUnit (2.4.8 for mono)
  • xUnit and xUnitContrib for Resharper
  • SilverLight
  • IronPyhton 2.0.1 runtime
  • IronRuby 1.1.3 corresponding to Ruby 1.9
  • Trident Activities and workflow
  • SandCastle (for Mono DXROOT=D:\Sandcastle\;DX_PATH=%DXROOT%\ProductionTools) for help file from API (you need also HtmlHelper HTMLHELP_PATH=D:\HTML Help Workshop)
  • DPack
  • Javascript Parser
  • Jscript Brace Matching Extension
  • Jscript Editor Extensions 
  • Jscript IntelliSense Para Extension
  • Jscript Outlining Extension
  • Jscript Word Highlighter Extension 
  • Microsoft All-In-One Code Framework Sample Browser 
  • Productivity Power Tools 
  • Regex Editor 
  • Spell Checker 
  • VSColorOutput 
  • REP++
  • Web Essentials
  • Web Standards Update  

Set a CSharp class template

We always read the manual.

public class MyClass : IDisposable
{
#region AttributeMembers
#region PublicAttributes


#endregion

#region PrivateAttributes

/// Flag for disposed resources private bool _IsDisposed = false; #endregion

#region ProtectedAttributes
#endregion

#endregion

#region AttributeAccessors

#region Getters

#endregion

#region Setters

#endregion

#region Mutators

#endregion

#endregion

#region Constructors

/// Initializes a new instance of the class. public MyClass()

{ }

#endregion
#region Destructor
/// Releases unmanaged resources and performs other cleanup operations before the
/// is reclaimed by garbage collection.
/// This destructor will run only if the Dispose method does not get called.
/// It gives your base class the opportunity to finalize.
/// Do not provide destructors in types derived from this class.
~MyClass()
{
// Do not re-create Dispose clean-up code here.
// Calling Dispose(false) is optimal in terms of readability and maintainability.
Dispose(false);

}
#endregion
#region MethodMembers

#region PrivateMethods
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// true to release both managed and unmanaged resources; false to release only unmanaged resources.

private void Dispose(bool isDisposing)
{

//Check if Dispose has been called

if (!this._IsDisposed)

{//dispose managed and unmanaged resources

if (isDisposing)

{//managed resources clean

this._DestZip = this._Src2Zip = null;

this._FileZip = null;//~

}

//unmanaged resources clean


//confirm cleaning

this._IsDisposed = true;

}

}

#endregion

#region PublicMethods

/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// Do not make this method virtual, a derived class should not be able to override this method.
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
#region PublicAbstractMethods
#endregion
#region PublicOverrideMethods
#endregion
#region PublicVirtualMethods
#endregion
#endregion
#endregion
}


C# project file (.csproj)

Edit the .csproj in order to have your custom folder for your solution.
You can add them like :

<ItemGroup>
  <Folder Include="app\" />
  <Folder Include="bin\" />
  <Folder Include="data\" />
  <Folder Include="doc\" />
  <Folder Include="ext\" />
  <Folder Include="ico\" />
  <Folder Include="lib\" />
  <Folder Include="modules\" />
  <Folder Include="obj\" />
  <Folder Include="pkg\" />
  <Folder Include="script\" />
  <Folder Include="src\" />
  <Folder Include="sql\" />
  <Folder Include="temp\" />
  <Folder Include="test\" />
</ItemGroup>


RtoCSharp

We always read the manual.


After you installed R and RDCOM in windows, Add Reference to COM.
Check if you succeeded in the reference tab.
Now you can use it into code:
//use 4 COM:R(D)COM
using STATCONNECTORCLNTLib;
using StatConnectorCommonLib;
using STATCONNECTORSRVLib;

HTMLCode

HTMLCode Content