Dave Horner's Website - Yet another perspective on things...
Home Tech Talk Programming Notes on Xcode, mac and iphone development.
168 guests
Rough Hits : 3068660
moon and stars
how did u find my site?





 
morning or night person?


 
I never forget a face, but in your case I'll be glad to make an exception.
--Groucho Marx (1890 - 1977)
appreciate the information? drop me a line, share, or +1.

Notes on Xcode, mac and iphone development.

Sunday, 01 July 2007 20:44
Coding in mac is overall, a very nice environment to program. You've got a BSD flavor with which you can autoconf, gcc, make, and bash you're heart out.

Xcode is a nice IDE for programming. Here are my notes as I continue to learn a new platform build system.

You might want to checkout some of the free headstarts.
Apple Developer Connection - Coding Headstart

amdev - nice blog with iphone related activities...
CocoaDevCentral: Cocoa Style for Objective-C: Part I
CocoaDevCentral: Cocoa Style for Objective-C: Part II
Mark Ivey's weblog - Archive for the 'XCode' Category
iPhone and iPod touch: About backups - talks about backups in itunes...whats in it and whats not in syncing.

Killer Xcode Tips and Tricks – Tips 1 to 10

Cool open source iphone projects

mobileterminal - Project Hosting on Google Code
cocos2d-iphone - Project Hosting on Google Code
Colloquy: IRC, SILC & ICB Client - of course you knew about the great macosx IRC client, but did you know they also include xcode projects for Colloquy on the iphone!


Xcode from the command line

Did you know that you can cd into a directory with an xcodeproj and run "xcodebuild" to build the xcode project from the command line?
You can also clean using "xcodebuild clean".
I do not know how to automate the running of a target easily from the command line....that would be useful.

Where do frameworks go?

~/Library/Frameworks and /Library/Frameworks are your friends. If the Frameworks folder doesn't exist, create it.

More recent projects in xcode

I like to have a lot of recent projects in my IDEs for quick access to things I've been working on. Xcode does not include a way to graphically change the default recent document list. By default it only holds the last 10 projects opened. Run the following in your shell to increase that number.
defaults write com.apple.Xcode NSRecentDocumentsLimit 25


Xcode debugging parameters

The Xcode IDE is new to me, I find myself looking for how to set parameters I know I need to set. For example, I wanted to set the debug argument parameters on the active executable. It is on "Project->Edit active executable 'yourname'", you can't get to this from context clicking on the active executable...

Technical Note TN2124: Mac OS X Debugging Magic
Technical Q&A QA1067: Setting environment variables for user processes


Apple Developer Connection - iPhone SDK

iPhone Apps

Intua BeatMaker - The mobile music creation studio for the iPhone and iPod Touch (costs 20) (I haven't used it but looks cool..)


Quick way to delete photos from iphone.

Use ImageCapture! How to: Delete all photos off an iPhone | That's what I thought.

Misc. references

Quickies for NSString and really all of Borkware Quickies, lots of goodness there.
Fifty Outs: Perl Compatible Regular Expressions with Cocoa
iPhone Development: Using 3D Models from Blender in OpenGL ES
Hex Fiend, a fast and clever hex editor for Mac OS X - BSD licensed and supposed to be easy to integrate...

Mac Developer Network » Code

iphone backgrounding

By default apps suspend, if you want to disable automatic suspension of your iphone app, UIApplicationExitsOnSuspend should be defined and checked within your Info.plist.
CODE Magazine - Article: Sams Teach Yourself iPhone Application Development in 24 Hours, 2nd Edition HOUR 21 - Building Background-Aware Applications

iphone development

iPhone Development - nice blog on iphone development.
Using the Apple SDK with low-level APIs ("tool chain" APIs) [iPhone Dev Team]
[iPhone developer:tips]; - Inside information from experienced iPhone developers...

iphone screencap

To take a screencap on the iphone (capture the screen image or take a screenshot) press the Home button and Sleep/Wake (On/Off) key at the top of the mobile device simultaneously at the same time.

Objective-C

Messages sent to nil do nothing, they don't crash or segfault...
The id data type is used to store an object of any type.
int x =5;
NSLog(@"x is %@",x); //crash!
ctrl-click drag from ui elements to the connection panels.
The @ sign in front of a static string indicates it is a constant character string (NSConstantString)
%@ is a format specifier for NSString to print information about the (id) class given. It can also be used to print entire arrays,dicts and sets.
If a line starts with a -, its an instance method.
If a line starts with a +, its a static method.
Beginners Guide to Objective-C Programming
Bits about Bytes: NSMutableArray makes awesome Cocoa stacks and queues
gdata-objectivec-client - Google Code - google data in objc.
CGRect, CGSize and CGPoint Functions
The Death of Global Variables @ Dr. Touch - implement a single instance of the class (aka “singleton”) in ObjC.


Networking with the iphone

Publishing an NSNetService item for Bonjour networking | BYU CocoaHeads


quick sound

Playing sound samples on the iPhone - Stack Overflow
Playing Short Sounds - Audio Session Services
Silent Mode Switch and Playing Sounds


Cocoa

F-Script Home - Interactive introspection, manipulation and scripting of Cocoa objects. Open source tools that complement Xcode and Interface Builder.
CocoaDev: CocoaDev
Cocoa Dev Central


Sqlite on iphone

sqlitepersistentobjects - Google Code - Persistent Objects for Cocoa & Cocoa Touch that use SQLite3

FMDB - cocoa sqlite wrappers
New Home for FMDB
SQLite for iPhone SDK - describes the process of setting up xcode to use FMDB real quick.
mocra's fmdb-migration-manager at master - GitHub - migration support for FMDB.

The Omni Group - Developer - Source Code - another sqlite persistence framework OmniDataObjects.


Safari - mobile webkit

WebKit Nightly Builds - get yer nightly webkit!
Safari Data Management Coding How-To's - Safari support javascript SQL datastore with sqlite backend.
iPhone SDK Tip: Firing custom events when a link is clicked in a UIWebView | dBlog.com.au
iPhone Samples - iphone html samples.
PhantomJS: Headless WebKit with JavaScript API
detro/ghostdriver · GitHub - Ghost Driver is an implementation of the Remote WebDriver Wire protocol, using PhantomJS as back-end


Remote data, xmlrpc, wsdl, json

Todd Ditchendorf’s Blog. » Blog Archive » Example Code : WebServices Core + CFNetwork for SOAP + HTTP auth on OS X
TouchJSONHowTo - touchcode - Google Code - TouchJSON is parser and generator for JSON implemented in Objective C.


Cross platform development of iphone apps

I like this idea of programming to the abstraction. Why can't I write my code once and have it run everywhere...
cross platform dev for phone....open
PhoneGap | Projects - MIT licensed code for writing apps that work on the iphone, android, and blackberry.


iphone game engines

Oolong Engine


iphone accelerometer

Context Logger for iPhone OS - Embedded Systems
iFiddling: Use the Mac's accelerometer in the iPhone Simulator
Home - accelerometer-simulator - Home of Accelerometer Simulator - Google Code


InformIT: iPhone Developer’s Cookbook, The: Building Applications with the iPhone SDK - recipes book, includes source.
iPhone SDK Examples - for the relatively new iPhone Developer who just wants simple examples to common tasks.

Facebook Connect

Heres to making the iphone more open and social.
http://svn.facebook.com/svnroot/platform/clients/packages/
How To: Implement Facebook Connect on the iPhone in 5 minutes on Vimeo
RaddOnline: iPhone SDK: Using Facebook Connect for iPhone Part 1 of 2
RaddOnline: iPhone SDK: Testing Network Reachability


Organizer says "Could not support development.

Ummm. I dunno why, but disconnect and reboot your phone.
Organizer says "Could not support development." - iPhone Dev SDK Forum


Core data

Cocoa Bindings Examples and Hints


Notes on UIWebView

7 tips for using UIWebView | Coding Ventures

Initializing a View

By default when you create a view you get initWithFrame. However, when you create your view from a xib file, you don't get called on initWithFrame. (load from a nib, the NSCoding protocol is used.) Instead, you get called on awakeFromNib. I usually just implement another initViews function which gets called from both awakeFromNib and initWithFrame. Remember, for subviews, you should be doing (void)layoutSubviews.


Working with NSDate

Get an NSDate 30 seconds in the future: [[NSDate date] addTimeInterval:30]
NSString *year = [myDate descriptionWithCalendarFormat:@"%Y" timeZone:nil locale:nil];
Convert NSDate to NSString - Stack Overflow


Speech Synth

NSSpeechSynthesizer Class Reference
SayIt
NSSpeechSynthesizer *speechSynth;
speechSynth=[[NSSpeechSynthesizer alloc] initWithVoice:nil];
[speechSynth setDelegate:self];
[speechSynth startSpeakingString:string];
[speechSynth stopSpeaking];


Turn off iphone status bar

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];


iphone ad networks

Mobile Advertising | Buy Ads | Monetize Traffic | AdMob
AdWhirl: Mobile Advertising | iPhone | Monetize Traffic | AdRollo


OpenGL on the iphone

iPhone Development: OpenGL ES from the Ground Up: Table of Contents

iphone zoomed in, iphone zoom mode, iphone magnifier

One of the iphone's accessibility features is it's magnifier. When you double-tap using three fingers you will zoom in. You can then translate the zoom'd in viewport by dragging three fingers. If Zoom is on and you want to zoom out or in, double-tap using three fingers. (This can be really really annoying if you don't know the way out!)
iPhone 3GS: About Accessibility (including VoiceOver and Zoom)


Get rid of MainView.xib, remove MainView.xib, remove xibs

I'm not sure that I always want an xib file. Many times, I'd rather create the view myself in code. The following link details how to remove the need for the xib.
(remove NSMainNibFile from you info.plist, pass your custom appdelegate class name into the 4th param of UIApplicationMain, create window and subviews)
Xcode starting point for iPhone hand-coders on Mcilvena/Blog


Notifications and delegates

Cocoa Fundamentals Guide: Communicating With Objects
Example of communicating between parts of a Cocoa program using NSNotification notifications using Xcode and Interface Builder


STOMP in ObjC

Stomp is a wire protocol for pub/sub. People are nice, so there are multiple implementations in ObjC....
juretta's objc-stomp at master - GitHub
stompframework - Project Hosting on Google Code


iphone adhoc testing distribution

iPhone Distribution Cheat Sheet (pdf)
Sending your iphone app to another developer device « Web Builders
Building Zip file for iphone Distribution « Web Builders


NSTimer timer not fired while scrolling

I'm not sure of all the technical details, but I found that my timers would not fire when scrolling my ScrollView. I searched around a bit and found the following solution:
[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
Seems to have resolved my issues!

UI updates from background threads in iphone

Suppose you want to update the text of a label from a background thread. You can't update the label like:
[aLabel setText:@"hello world"];
Instead, you should use the performSelectorOnMainThread method to perform the update on the main thread. Like so:
[aLabel performSelectorOnMainThread : @ selector(setText: ) withObject:@"hello world" waitUntilDone:YES];

Carrier configs

Some people download custom carrier setting to get things like internet tethering....
HOW TO: Install Official MMS on iPhone 3G/3GS (3.0-3.0.1) (Jailbroken or Not) - Mac Forums


HTML/CSS for iphone like webapps

iui - Project Hosting on Google Code - User Interface (UI) Framework for Safari development on iPhone
iWebKit the Best free framework for creating iPhone, iPod Touch and iPad web applications with ease! - native looking iphone HTML apps
How-To: Create an iPhone Web App - using iwebkit


MonoTouch

MonoTouch Examples :: RemoteInfo


ffmpeg on the iphone

did you know that you can compile ffmpeg on the iphone now?
[FFmpeg-devel] [HOWTO] Building FFmpeg for iPhone
yuvi's gas-preprocessor at master - GitHub


Objective-C and Mac Testing related

Mulle kybernetiK -- OCMock - OCMock is an Objective-C implementation of mock objects.
Test Driving Your Code with OCUnit
coverstory - Project Hosting on Google Code - CoverStory allows you to easily view the code coverage of your unit tests.

Cocos2d

haqu/tweejump - GitHub - jumping arcade game for iPhone (powered by cocos2d-iphone)


Javascript and ObjC

Steamclock Software - Apple’s new Objective-C to Javascript Bridge

Java and ObjC

rules say you can't have an interpreted runtime...so...
The RoboVM Blog - RoboVM open-source project is to bring Java and other JVM languages to iOS. RoboVM's ahead-of-time compiler translates Java bytecode into native ARM or x86 machine code that runs directly on the target CPU without being interpreted. The runtime is based on Android's runtime classes and includes a Java to Objective-C bridge which makes it easy to use native Cocoa Touch APIs from Java.

< Prev  Next >
Last Updated on Friday, 20 June 2014 14:40