1948
Try the search, it's linked to some great forums
Friday, July 29, 2011
Facebook API Installation
Facebooks instructions for getting hooked up to their git hub;
Github repository =
https://developers.facebook.com/docs/guides/mobile/
Github repository =
git clone git://github.com/facebook/facebook-ios-sdk.git
Thursday, July 28, 2011
Popover's & their delegate for iPads
The following code is a simple implementation of a popover using a separate view controller & xib file. First the instantiation & display code;
InfoViewController *popoverView = [[InfoViewController alloc] init];
popoverView.delegate = self;
// Creates the popoverController object
infoPopover = [[UIPopoverController alloc] initWithContentViewController:popoverView];
[infoPopover setDelegate:self];
[infoPopover presentPopoverFromRect:CGRectMake(512, 200, 10, -30) inView:self.view permittedArrowDirections:0 animated:NO];
[infoPopover setPopoverContentSize:CGSizeMake(400, 500)];
and then instructions;
in PopoverViewController
the .xib file
the .h file
InfoViewController *popoverView = [[InfoViewController alloc] init];
popoverView.delegate = self;
// Creates the popoverController object
infoPopover = [[UIPopoverController alloc] initWithContentViewController:popoverView];
[infoPopover setDelegate:self];
[infoPopover presentPopoverFromRect:CGRectMake(512, 200, 10, -30) inView:self.view permittedArrowDirections:0 animated:NO];
[infoPopover setPopoverContentSize:CGSizeMake(400, 500)];
and then instructions;
in PopoverViewController
the .xib file
- in the view change the status bar = None, so that you can resize the screen
- add controls as you like
- add IBOutlet IBActions to match the xib file
- connect them to the xib objects
- add delegate protocol & method definitions at the bottom of the file
- add the delegate property using assign & id
- synthesize & release the popover controls
the .h file
- add the conforms to
- add a UIPopoverController property use assign for the property
- Add an IBAction show button to display the popover
- Add the delegate's methods
This generally means that another instance of this process was already running or is hung in the debugger
Tuesday, July 26, 2011
Sunday, July 24, 2011
Friday, July 22, 2011
Codesign error
The following error appeared after working on my provisioning profile;
CodeSign error: Certificate identity 'iPhone Developer: CHRIS LAMB (W8LV24J2J6)' appears more than once in the keychain. The codesign tool requires there only be one.
Need to go back into Applications - Utilities - Keychain Access and delete the extra certificate in the Keychain program.
CodeSign error: Certificate identity 'iPhone Developer: CHRIS LAMB (W8LV24J2J6)' appears more than once in the keychain. The codesign tool requires there only be one.
Need to go back into Applications - Utilities - Keychain Access and delete the extra certificate in the Keychain program.
Provisioning Profiles
What they are and why - a direct Apple quote ;
A provisioning profile is a collection of digital entities that uniquely ties developers and devices to an authorized iPhone Development Team and enables a device to be used for testing. A Development Provisioning Profile must be installed on each device on which you wish to run your application code. Each Development Provisioning Profile will contain a set of iPhone Development Certificates, Unique Device Identifiers and an App ID. Devices specified within the provisioning profile can be used for testing only by those individuals whose iPhone Development Certificates are included in the profile. A single device can contain multiple provisioning profiles.
Simply though:
Check for the status on both your device (iPhone/iPad) and within Xcode
A provisioning profile is a collection of digital entities that uniquely ties developers and devices to an authorized iPhone Development Team and enables a device to be used for testing. A Development Provisioning Profile must be installed on each device on which you wish to run your application code. Each Development Provisioning Profile will contain a set of iPhone Development Certificates, Unique Device Identifiers and an App ID. Devices specified within the provisioning profile can be used for testing only by those individuals whose iPhone Development Certificates are included in the profile. A single device can contain multiple provisioning profiles.
Simply though:
Check for the status on both your device (iPhone/iPad) and within Xcode
Thursday, July 21, 2011
Provisional profiling errors
The following error will prevent you from connecting an iPad to your code for device testing;
Provisioning has gotten easier over the years, and I just generally blindly follow the assistant on the developer's page. A few thing to remember;
The provisioning profile is matched to your specific device, so make sure that you are building the profile for what your device is named. That can be found on the iPad/iPhone is Settings - General - Profiles
There are 4 components that must jibe;
"The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.."
Provisioning has gotten easier over the years, and I just generally blindly follow the assistant on the developer's page. A few thing to remember;
The provisioning profile is matched to your specific device, so make sure that you are building the profile for what your device is named. That can be found on the iPad/iPhone is Settings - General - Profiles
There are 4 components that must jibe;
- Apple Device
- App ID
- Development Certificate
- Profile Description
Tuesday, July 19, 2011
More stuff to learn?
-Experience with Unity3D (most important!)
-Experience with OpenFeint (achievements/leaderboards)
-Experience with GameCenter (achievements/leaderboards)
-Experience with Greystripe (ads)
-Experience with Facebook Connect
-Experience with OpenFeint (achievements/leaderboards)
-Experience with GameCenter (achievements/leaderboards)
-Experience with Greystripe (ads)
-Experience with Facebook Connect
Saturday, July 16, 2011
Create an UIButton programatically
Include this in viewDidLoad to setup the basic button;
[button addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchDown];
[button setTitle:@"Button" forState:UIControlStateNormal];
button.frame = CGRectMake(20, 108, 97, 37);
[self.view addSubview:button];
This button will do whatever is defined within the buttonPressed: method
[button addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchDown];
[button setTitle:@"Button" forState:UIControlStateNormal];
button.frame = CGRectMake(20, 108, 97, 37);
[self.view addSubview:button];
This button will do whatever is defined within the buttonPressed: method
Thursday, July 14, 2011
Three20 Framework
Try this python script cmd:
python three20/src/scripts/ttmodule.py -p Install320/Install320.xcodeproj Three20
And this link is where the info & tutorial are;
Use this method to add the Three20 framework to your project;
python three20/src/scripts/ttmodule.py -p Install320/Install320.xcodeproj Three20
And this link is where the info & tutorial are;
Use this method to add the Three20 framework to your project;
Manually add Three20 to your project
- Locate the "Three20.xcodeproj" file under "
three20/src/Three20/
". Drag Three20.xcodeproj and drop it onto the root of your Xcode project's "Groups and Files" sidebar. A dialog will appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project" before clicking "Add". - Open the Three20 Xcode Project that you just added to your app and expand the "Dependencies"
group. Select all of the projects listed there and drag them to your app as well. You should
now have the following list of Three20 projects added to your app:
- Three20Core
- Three20Network
- Three20Style
- Three20UICommon
- Three20UINavigator
- Three20UI
- Three20
- Link the Three20 static libraries to your project. Select all of the
project items that you just added to the sidebar.Under the "Details" table, you will see
a number of items, such as libThree20.a and libThree20Core.a. Check the checkbox on the
far right for each of the
lib
files (not the UnitTests). This will link each part of the Three20 framework to your app. - Add Three20 as a dependency of your project, so Xcode compiles it whenever
you compile your project. Expand the "Targets" section of the sidebar and double-click your
application's target. Under the "General" tab you will see a "Direct Dependencies" section.
Click the "+" button, select "Three20" and each of the other libs, and click "Add Target".
You do not need to add the
UnitTests
target for each lib. - Add the bundle of images and strings to your app. Locate "Three20.bundle" under "three20/src" and drag and drop it into your project. A dialog will appear -- make sure "Create Folder References" is selected, "Copy items" is unchecked, and "Reference Type" is "Relative to Project" before clicking "Add".
- Add the Core Animation framework to your project. Right click on the "Frameworks" group in your project (or equivalent) and select Add > Existing Frameworks. Then locate QuartzCore.framework and add it to the project.
- Finally, tell your project where to find the Three20 headers. Open your "Project Settings" and go to the "Build" tab. Look for "Header Search Paths" and double-click it. Add the relative path from your project's directory to the "three20/Build/Products/three20" directory.
- While you are in Project Settings, go to "Other Linker Flags" under the "Linker" section, and add "-ObjC" to the list of flags. WARNING: Make sure that you do this for all configuration settings, not just the active one.
- You're ready to go. Just #import "Three20/Three20.h" anywhere you want to use Three20 classes in your project. It's recommended that you do so in a precompiled header for faster build times.
Tuesday, July 12, 2011
Monday, July 11, 2011
Private methods
Use this coding in the top of your .m file to prevent compiler warnings - "undeclared selector" @interface HelloWorld (PrivateMethods)
-(void) initSprites;
-(void) performActionSequenceOnNode:(CCNode*)node;
@end
This tells the compiler that there are methods out there that will be defined
-(void) initSprites;
-(void) performActionSequenceOnNode:(CCNode*)node;
@end
This tells the compiler that there are methods out there that will be defined
Glossary
Singleton - is a regular class that is instantiated (created) only ONCE for the duration of the application. It can be used anywhere by any class at any time, much like global variables
CCDirector - singleton class that stores global configuration settings & manages cocos2d scenes
CCNode - defines a lot of common properties & methods. CCNodes are like views with addChild, getChildByTag etc.
CCAction - used to move, rotate, scale nodes or sprites.
@selector(anyMethod:) - Is a way of specifying a specific method (anyMethod).
CCLayer - is typically used to group nodes together & receive touch & accelerometer input if enabled.
CCScene - is always the first node in a scene graph.
CCTransitionScene - allows for many very cool transitions between scenes (page 52).
keeping a weak reference - Not retaining an object whose memory is managed by another class or object
CCDirector - singleton class that stores global configuration settings & manages cocos2d scenes
CCNode - defines a lot of common properties & methods. CCNodes are like views with addChild, getChildByTag etc.
CCAction - used to move, rotate, scale nodes or sprites.
@selector(anyMethod:) - Is a way of specifying a specific method (anyMethod).
CCLayer - is typically used to group nodes together & receive touch & accelerometer input if enabled.
CCScene - is always the first node in a scene graph.
CCTransitionScene - allows for many very cool transitions between scenes (page 52).
keeping a weak reference - Not retaining an object whose memory is managed by another class or object
Friday, July 8, 2011
Outstanding snippets to do
animation block
affineTransform
delegate
custom font installation
view hierarchy
(id)sender
popovers
affineTransform
delegate
custom font installation
view hierarchy
(id)sender
popovers
OldWeather.org - Citizen Science
Another way cool citizen science project. This one has you transcribe wind & weather data from old British ship logs. The data is then plugged into climate modeling programs.
http://www.oldweather.org/
Thursday, July 7, 2011
Animation block with completion code
This method allow you to string together animation features;
-(void)photoLoopAnimation
{
// FADE block animation method - THIS contains the basic animation features
[UIView animateWithDuration:1.2 delay:delaySeconds
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
viewTop.alpha = 0.0;
viewBottom.alpha = 1.0;
}
completion:^(BOOL finished) { // remove both views & loop to slideShowSwitch
[viewTop removeFromSuperview];
[viewBottom removeFromSuperview];
[viewTop release];
[viewBottom release];
[self photoLoop];
}];
}
The completion: parameter allows you to branch to other functions ONCE the animation is complete. The animation block runs on a background thread, and does NOT pause execution of the rest of the code
-(void)photoLoopAnimation
{
// FADE block animation method - THIS contains the basic animation features
[UIView animateWithDuration:1.2 delay:delaySeconds
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
viewTop.alpha = 0.0;
viewBottom.alpha = 1.0;
}
completion:^(BOOL finished) { // remove both views & loop to slideShowSwitch
[viewTop removeFromSuperview];
[viewBottom removeFromSuperview];
[viewTop release];
[viewBottom release];
[self photoLoop];
}];
}
The completion: parameter allows you to branch to other functions ONCE the animation is complete. The animation block runs on a background thread, and does NOT pause execution of the rest of the code
Tuesday, July 5, 2011
NSLog debugger statements - proper use of;
Use these # statements for NSLog debugger statements so that they DON'T execute on final apps;
#ifdef DEBUG
NSLog(@"Setup popover should display %@", anyObject);
#endif
The %@ displays the name (actually descriptor) of anyObject object. Good for troubleshooting!
#ifdef DEBUG
NSLog(@"Setup popover should display %@", anyObject);
#endif
The %@ displays the name (actually descriptor) of anyObject object. Good for troubleshooting!
Subscribe to:
Posts (Atom)