How to find your resources and how to generally find the directory layout

To find the main download directory for when you are receiving files, put this snippet of code in a test project or your main project at the point of opening:

 NSArray *pathsForDownloadedFiles = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
 NSString *pathMain = [pathsForDownloadedFiles objectAtIndex:0];
 NSLog(@"main download directory is [%s]", [pathMain UTF8String]);

The first line lets you allow Apple to put the application download directory anywhere it likes. It will also be able to change it at will, without breaking your program.
The second line means that there is only one directory you need to access and its the first one. Remember in C arrays are zero based which means the first element of the array is at index number zero not at index number one.
NSLog will let you run the app in the simulator OR on your device and send logging information back to the debug console in XCode. Nice and integrated.

An alternative method:

 NSString *mainPath = [self getDataPath];

Uhhhhh yeah a bit shorter. Its not deprecated from what I see so one can use this method also.

Finally lets see where our resource is. Again, if you use this method, then XCode will be able to re-layout the resource directory structure anyway it wants without breaking your program. You KNOW they’re going to do this someday and they won’t tell you until its been done. So lets Program Defensively. Just like you drive defensively.
To find a specific resource that was compiled into your application:

 NSString *resourcePath = [[NSBundle mainBundle] pathForResource:@"mission1" ofType:@"jmf"];
 NSLog(@"Path for mission file is [%s]", [resourcePath UTF8String]);

The AT (@) sign is the NSString constructor without declaring an NSString. In case you’re wondering.

Good Luck and God’s Speed to ya mates.

Droid will not assimilate you. Long live iOS.

TechCrunch is reporting that if you’re on iOS there is a 90% chance you have the latest OS version, but get this, if you are using droid, there is only four tenths of one percent chance (yes that’s correct) that you have the latest version of the Android Operating System.

We have talked about Droid fragmentation and holy smokes this underscores the mess that is called Droid. Continue reading

Free iPod Promo Codes!

Merry Christmas and Happy New Year everyone! To celebrate the holidays please enjoy the game Trisaic on us! Here are thirty, yes THIRTY promo codes for this iPod game. This game is appropriate for all ages. When you have used a code, please comment below and state the number of the code you used. (1…2…3…etc.) so that others do not try to use it.

1 ETR4JXW94WTX
2 X99WX6MHF3AN
3 433NN3P9PXYY
4 M3FT39NN9KA6
5 M4T4AT9LRYFE
6 9F66LRN43HM6
7 J3XJKLREAXWT
8 TWHKWMRPNFFN
9 X9P7K697HTEK
10 KEA4XT7PPXXK
11 RHH4K3646WX9
12 PFH6PJEMAE73
13 PHK4ARHXXLRE
14 FKRFYAMXYAK7
15 6647P3TPAPTK
16 F9FP93TRK4LY
17 WN9F7P37JHTK
18 7WKH9EHJT43K
19 FTK74X37JJ7W
20 T43PJL6REPMA
21 6YHPKLNFYLKN
22 WFRPKW4XF6TK
23 TK9HHJXJFWT3
24 YM9AX9LPKXWJ
25 M3ARTNKWNYX6
26 AMT4R6N4TE7K
27 X36YHP9X9X3M
28 X697JYR636KM
29 7369J9TJE7PE
30 PRXAA4JJX63F

Popping up the keyboard on the iPlatform

If you want the virtual keyboard to popup when you display a text field in a view do the following:

In your viewDidLoad or if you call any method to do “things” before displaying then the variable that points to the text field should have the becomeFirstResponder message sent to it.
Example:
In the .h of your viewcontroller or class
UITextField *tfJoroto;

In the .m of your viewcontroller or class
-(void)viewDidLoad {
[tfJoroto becomeFirstResponder];
} // viewDidLoad

This should also set the focus to the UITextField.

Good hunting.
-T-

iPad Universal App

This is for the uninitiated and for posterity.
Running XCode 3.2.3.
Please NOTE: I had forgotten this. If you update the OS of your iPlatform device (pod/phone/pad) then you MUST update the XCode SDK. Now this makes sense in a way, however last night’s (8/13/10) update of the device was NOT matched by and Upgrade notification of the XCode SDK platform. I had to go a lookin. Bottom line is, unless you NEED something from that update, don’t do it in the middle of a project. It waste Humungo time. That means ALOT for you marketing weasels.

1) Create a View Based app
2) Name it of course.
3) Drop down the targets folder in the project explorer. Continue reading

iPad – The Conqueror

I went to Best Buy and they had the requisite four iPads to touch and feel and play with. Lots of kids/teens/college age. They were all over everything, the macbooks, iPads, everything that was there. It was “an event” for them. The fun they were having, the giggling, “makes” the sale as much as the device. It was like watching one the “cool, hip” commercials. Continue reading

Flash on the iPlatform

Yeah yeah yeah, yet another “why Flash isn’t on the iPlatform” article points out some of the spurious points. The author points out “The facts remain, however, that the iPad will run HTML5 video inline today (and iPhone OS 4 this summer) without even getting warm to the touch while our laptops and multicore desktops turn into noisy miniature blast furnaces Continue reading

Gruber is not completely correct about Apple’s policy change

This post was sent to me about Gruber’s analysis of the new Apple policy (3.3.1) that stated that developers were not allowed to use third party development tools that could target multiple mobile phone platforms. We were looking into these currently and I have to say I’m quite miffed. Continue reading

iPad – uh yeah great name

Open letter to Mr. Steven Jobs:

Steve,
This isn’t a pile on session, I’ve seen the ignorant bashing you incessantly.   I’m too tired). I’m not here to do the same.  Well of course I am. Its fun, its the NEW new thing to bash Apple for not providing everyone their own personal spaceship to Mars (see previous blog post).
iPad: This name, sucks. Continue reading

NO JOY. An OS 3.0 upgrade story

Went to the iTunes store to upgrade one of my iPods to the OS 3.0 SDK to see if we can monetize the crap out of it. Hey, I’ve BEEN BUSY, so shutup.
Anyway, No joy. An UNKNOWN ERROR occurred on my transaction.
I will report back on this when I solve Apple’s problem (again).
Update and FIX:
The error was “An Unknown Error Occurred (1004)”. Continue reading

HOLY CRAP BATMAN SNOW LEOPARD’S GOT ME

Face (our undead President) close your eyes and skip this rant.
Ok folks, spent the whole $25 in cheeseballs on the OS X upgrade.
Those *beep* *beep* *BEEPITY* *beeps* (edited by Face) at Apple have completly wiped my XCode links to the SDKs. NOTHING BUILDS NOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
HOLY **** Batman!
I’ll update here about this crap. GREAT! Like we need MORE WORK. Of course WE’LL be blamed for this. Those BEEEEEEeeeeeeeeeeeeeeeeeeeeep (edited by Face).
-T-
Update:
Ok my fault, when I upgraded, I should have put XCode 3.2 into A NEW PLACE!!! otherwise it “upgrades” your existing install (assuming you used the defaults) by erasing all your SDKs! How intuitive. Yeah if I RTFM. Ok so the way out is to download the OS 3.0 SDK which “doesn’t have all the 2.x SDKs”. Hmmm Let’s see nope. No more ranting. By this time you want answers.
I’m doing that right now and its taking 20 minutes for 404MB.
The original solution is to install the new 3.2 Xcode into A NEW PLACE and DO NOT UPGRADE the existing installation. Well they at least got that part correct.

Create an iPhone app splash screen

1-Create a .png file with Adobe Fireworks, Adobe Photoshop, Gimp, or any of the graphic programs out there.

2-Name it Default.png.

3-Add it to the Resources tab of your Xcode project.

This will add this splash screen automatically to your program when it runs, and will place this graphic on the screen as your app loads into memory and runs.

Replacing graphics files in XCode

I wanted to replace some graphics files under my resources in the Xcode environment. They are currently symlinks. I wanted them to be actual files in order to zip up and send to other developers. I thought an inexperienced user may appreciate this content.

Select the graphics files with a click, Continue reading

aGauge now available for iPhone & iPod

aGauge is now available for the iPod and iPhone! Test your accelerometer with this utility. Super Cool!

aGauge WEB SITE

Or visit the Joroto iTunes Store:

iPod/iPhone “No provisioned device” error in XCode

In the Organizer in XCode you notice that your iPlatform device (iPod/iPhone) is not recognized as a provisioned device. The little “light” is not green. However iTunes can sync with it and give it a great big kiss.
Cause: I believe this is due to the iPlatform device being plugged in when the computer goes to sleep.
Solution:
1) Unplug the iPlatform device from the USB.
2) Hold down the top power off and the circle App Exit button at the same time, then release at the same time.
3) A slide switch appears saying “Power off”. Do so. This is a hard power down of the device.
4) Now you can just plug the device back into the USB cable. XCode will see it and use it now. This has happened many times to me and this is the exact solution to that.

Joroto, Inc Releases Trisaic for the iPod and iPhone

Today Joroto announced the release Trisaic, a puzzle game for Apple’s portable devices, the iPod and iPhone. The game board for Trisaic is full of pairs of adjacent triangles that the player must match. The player selects the objects and cycles through their various designs in order to match the design of an adjacent object. The game quickly becomes difficult, and a great memory teaser, as the number of possible designs for each triangle increase with each new level. A handful of objects will have no match, making the game even more challenging.

Find all Joroto products at the following web page:

PRODUCTS