To get an app on a phone for the purposes of debugging you first need to
go to (in Safari -- must use Safari not another browser): http://developer.apple.com/iphone/
and log in user your developer account or your university program account.
Once logged in you should see a bunch of links on the right-hand-side that look like:
Click on the iPhone Developer Portal link.
Getting your app on a Phone for Debugging - cont'd
As a first step I need to invite you to join the SJSU iOS Developer team. I will circulate a sheet to get who
is doing iPhone.
After I send an invite, you will get an invitation to join from Apple, you need to accept this, then you will get
an account and you can login.
In the center of the screen you should see:
Click on this link. Make sure you attach an iPhone to your computer with the usual USB sync cable.
This link guides you step by step through the process of creating a certificate signing request, adding it
to your keychain, and adding a provisioning profile to your phone.
Getting your app on a Phone for Debugging, the ScreenShots - cont'd
For the next step, I need to get the device ID for your device.
Getting your app on a Phone for Debugging - cont'd some more
Now to get an application actually on your iPhone, the Bundle Identifier in your project's
Info.plist file has to match the AppId and organization you set in your certificate:
Before you compile and run your project, you should set the Active SDK in the upper left corner of the XCode window to a setting that has the word Device in it:
At this point when you compile and run, it should put the app on your phone.
One potential reason why this won't work is if your phone has a more recent OS than your SDK, in which case you should update your SDK.
Image of a Program I Wrote on an iPhone
Getting your app on an Android Phone for Debugging
The most recent version of Android the G1 Dev phones support is Android 1.6. There are some tricky ways to get them to install 2.2,
but I won't discuss them in class.
In your AndroidManifest.xml file you can set the application tag to allow for debugging:
Select your project, right-click (CTRL-click on a Mac), and select Android Tools > Export Signed Application Package.
Follow your way through the wizard, if you haven't created a keystore yet, you need to create one (can do as part of the wizard). You also might need to create a key if you don't have one.
When you compile and run, your project should go to your phone.
Quiz
Which of the following is true?
In an AndroidManifest.xml file the application tag often has several activity tags nested within it.
In Android, to a class that handles button clicks typically implements the ActionListener interface.
On iPhone, if switchView was of type UIView, then [switchView setHidden:TRUE]; would be a way to make this
view not visible (presuming it had been visible).
Windows Phone 7
Windows Phone 7 is Microsoft's Phone OS replacement for Windows Mobile.
It is scheduled for release in October, 2010.
LG, Samsung and others will make phones for this OS.
To run Phone 7, devices need to have at least a 1Ghz ARM7 processor with 256MB and 8GB flash, DirectX9 capable GPU, support GPS, accelerometer, compass, light, and proximity sensors, have a 5MB camera, and support two screen resolutions: 480×800 WVGA, 480×320 HVGA.
They also need to support multi-touch with at least four simultaneous touches points.
Windows Phone 7 Development
Development for Phone 7 is done using Visual Studio. The developer SDK, actually comes with a fully functional Visual Studio express.
To start making projects in Visual Studio, click on New Project. You should get a screen like:
Once created, you will notice to the right of the screen there is a Solution Explorer:
Files in a Phone 7 Project
The Properties folder contains things similar to the AndroidManifest.xml file we had for Android.
In particular, the AppManifest.xml file is used to generate the app, the WMAppManifest.xml has meta-data for Microsoft's Silverlight, and AssemblyInfo.cs is a C# file with name and version info for the app
The References folder consists of library stuff used by our app.
App.xaml/App.xaml.cs is the main entry point into our application, it initializes application scope resources, and displays the user interface.
XAML is the Extensible Application Markup Language, an XML markup language used extensively in Windows Presentation Foundation (WPF).
MainPage.xaml/MainPage.xaml.cs defines a page with the user interface on it.
Other than that, we have a bunch of images associated with our app.
Compiling the Default Project
You can compile the default project by selecting Debug and Build solution, or by hitting F6.
To run the project, you either select Debug and then Start Debugging or by hitting F5.
There is a drop down on the tool bar that allows you to choose where to run the program: either in the emulator or on a device.
If you decide to run on a device, then you first need to install the Zune Software.