Coding Cluster - using asp.net, c#, mvc 4, iphone, php, ios, javascript, in asp.net mvc 3 & more
 

How To Develop iPhone Apps on Windows (Develop iPhone apps on Windows with Mac )

Thursday

Create iPhone Apps On Windows:
                                        In this article I'm going to explain how to develop iphone apps on windows OS?, normally to create  a iphone app you will need an Intel-based Mac as the iPhone SDK requires OS X to run applications such as Xcode and the iPhone Simulator. Unfortunately, there is no legal way to develop applications for iPhone on anything that isn't a Mac.


                 If you want develop iPhone app on Windows? Either you buy a Mac book or one of the other alternate way is,  you can install Mac OS on windows by using VMware. Make sure your system must  support Virtualization (check it in your BIOS)

Follow the steps below  to create iPhone / iPad apps using MAC on Windows.

 Downloads:

You can download the following items from the web,
  •  VMWare Workstation 7 or later.
  •  Mac OS X Lion 10.7 
  •  XCode 4.1.1 or later.

 Install and run Mac os on windows:
 Install the VMWare workstation on windows.

  •  Run the batch file from the Mac OS folder.
  •  Enable the Intel Virtualization in BIOS.
  •  Run the Mac OS X Lion on VMWare.
  •  Share the Xcode file from Windows to Mac in VM Ware. (This folder is an interface between MAC and Windows)
  •  Install the Xcode on Mac.
  • Create your app

Sharing Files Between Windows and Your Mac - VMware:

                                                                       You can set up shared folders in guest operating systems to share files between your Mac and your Windows and other virtual machines. To use shared folders, you must configure your virtual machine settings to enable shared folders and to specify which directories on your Mac are to be shared.

The shared folders can be in your Mac file system or can be in your Windows or  they can be network directories accessible from your Mac.

 Refer the following image to create shard folder between Widows and Mac.



I'm installed Mac OS X Lion and created my app by this way.

Please share this knowledge to your friends, They may don't have MAC but they want to create iphone app.

 Before going to implementation you must know about


Solution: 'release' is unavailable: not available in automatic reference counting mode - iphone

Saturday

iphone: 'retain , release' is unavailable: not available in automatic reference counting mode:
                                                                              When I working with iphone memory leak related issues in iOS 4 and building projects in XCode 4.2.x,  I've encounter the build error like "'release' is unavailable: not available in automatic reference counting mode". And I got the following solution from the net.
                                                                           The default setting for iOS projects have a build setting named "Objective-C Automatic Reference Counting" set to 'Yes'. Simply set this to 'No' and the reference counting error will go away.(see the image bellow).




You have another one option...

Remove all retain release  autorelease NSAutoReleasePools and retainCount calls, since ARC makes them for you. With the exception of NSAutoReleasePools They have been replaced by @autorelease{}.

The second option has been automated by apple.

ASP.NET : how to get ip address using csharp(c#)

Thursday

How to get a client's ip address with ASP.NET :
                                         Internet protocol is a communication between the nodes. Internet protocol, which is used to track a system host and used address the location. If we need to identify the user who are all accessing our website and store the Internet protocol address in our database.

                                Fetch a client's Internet protocol address as soon as he access our web site in asp.net. Some of them may use a proxy Internet protocol address. But we can get their Internet protocol address with this simple code.


Code:
//Add the Namespace
using System.Net;
//Get Visitor IP address method
public string GetVisitorIpAddress()
{
string stringIpAddress;
stringIpAddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (stringIpAddress == null) //may be the HTTP_X_FORWARDED_FOR is null
{
stringIpAddress = Request.ServerVariables["REMOTE_ADDR"];//we can use REMOTE_ADDR
}
return "Your ip is "+stringIpAddress;
}
//Get Lan Connected IP address method
public string GetLanIPAddress()
{
//Get the Host Name
string stringHostName = Dns.GetHostName();
//Get The Ip Host Entry
IPHostEntry ipHostEntries = Dns.GetHostEntry(stringHostName);
//Get The Ip Address From The Ip Host Entry Address List
IPAddress[] arrIpAddress = ipHostEntries.AddressList;
return arrIpAddress[arrIpAddress.Length - 1].ToString();
}
//Get The Visitor Ip Address
string strVisitorIpAddress = GetVisitorIpAddress();

//Get The Lan Ip Address
string strLanIpAddress = GetLanIPAddress();
Share this to your friends. Thanks!

 
 
 

RECENT POSTS

Boost

 
Blogger Widgets