iOS 5 Beta Install | "activation server" problem
I experienced this issue, then among many attempts the steps below solved the issue.
When I first restored the phone to iOS 5 (it works only with Restore, Update won't work yet) it didn't promted for unlock SIM card.
To restore it again, I had to reset the device with DFU mode first. Turn off the device, then hold power and home button for 10 secons, then release the power button, and hold the home button for additional 10 seconds.
After that you can repeat the Restore process, but the device now will prompt you to unlock SIM. Now the activation server problem won't show up, so you have iOS 5 beta then.

After the restore there will be option to restore your user data from a previous backup, so seems there won't be any data loss (supposing you backed up your phone before the whole process).
Photoshop blending modes in OpenGL
I want to fully understand the issue mentioned in title. Premultiplied alpha, and all the stuff.
First of all, to acheive Screen blending mode, use the following glBlendFunc.
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_COLOR)
For Multiply blending you can use this glBlendFunc, but works only with images without alpha channel.
glBlendFunc(GL_ZERO, GL_SRC_COLOR)
To experiment with glBlendFunc I created a tiny little application - ©Labs | No1 (Blending) -, I'll submit to the store soon.
Linear dodge blending can be acheived with two GL_ONE.
glBlendFunc(GL_ONE, GL_ONE)
--
The actual post will expand here soon. This article - http://dunnbypaul.net/blends/ - will useful.
--
To desaturate an image, I came up with a really tricky workaround. I'll explain soon.
What is the keyboard shortcut for parent folder in OSX finder?
I was too lazy to look after it until today.
It is Option+Command+Up. Great. Option+Command+Down goes down a folder, or can say, it opens it, like Command+O.
Another big mistery was the Home/End functions (go to the end/begin of the current line) for me for a while. I use Command+Left, and Command+Right right now.
Too much for today.
What about NIB memory management?
Since february I work as a full time iOS developer (or can say over time), so bloggin' is something that I don't have time to. We're workin' hard to release a really promising iPad2 application, and among the last steps I have an item I named "memory management issues", or "remove leaks".
We created a really customized interface with tons of XIB files full of IBOutlets with huge leaks. So it is time to deal with NIB retain behaviour, and thing like this.
I created a simple ViewController based template, then I put a UISwitch into the middle. First I declared it as a simple IBOutlet instance variable named _slider.
I set up a NSTimer in AppDelegate that releases then alloc the viewController, so I can examine the UISlider instances in Allocations instrument.
A really good post (I can't find it now) pointed out that connecting a NIB retains all IBOutlet ivars, so we have to release them at dealloc. This is the first case I tested, and it really holds only one UISlider reference at a time.
In the second test I declared IBoutlet as a retained property, and released it at dealloc. Nothin' changes, we have still only one reference trough times (it is kinda' evidence of IBOutlet ivars are retained).
If I release the property with self.slider = nil; then it also behaves normal, though some people doesn't encourage calling setters in init/dealloc methods.
So the only problem is when I simply assign nil to the instance variable. In that case the UISlider allocations just don't get deallocated. But this is beyond the scope of this post actually.
Hmm, so what is this post about? Everything works as I expected. Why create @properties for IBOutlets then? I won't I think, then simply [outlet release], outlet = nil; out them (in dealloc and viewDidUnload).
It is all ok, but in the ViewController based template Apple made a retained property from the root viewController (and so the window). Why?
If I simply made an instance variable from viewController, and in the recreate function I release it, It just don't deallocates. Hey! It has 2 consistent allocated instances.
Only if I make assigned property from it, only that case will handle it's memory in the right way. I tried to experiment with retainCount, but it is a really bad approach, as it turned out (http://stackoverflow.com/questions/4636146/when-to-use-retaincount).
I found posts that encourages to synthesyze assigned properties for IBOutlets - http://weblog.bignerdranch.com/?p=95 - and to tell the truth, it seems far simplier than any other approach. You should care about IBOutlets only in the header file. In a way like this, they will be released as soon as the controller deallocates that holds them.
By the way, the best practice is to see your objects behave in the way you want them in Allocations instrument.
If you retain some object somewhy, you should release it. IBOutlets are retained when loaded from the NIB. You can avoid it with assigned properties. Thats all.
How to hack Photoshop's "Export Layers To Files" script
The plugin is a very useful one. But sometimes I need the exported filenames to be the same as the original layer name is. So some finetune in the script is needed. Let see.
As I make a spotlight search to the folder named Presets (where the scripts are), the first result is within the Photoshop application, so I open the Scripts folder within. There lies the file Export Layers To Files.jsx, let's open.
I make a search on the term filename, and I found that the fileNamePrefix variable occures often. After that I seek for the place where it is used to compose the final name. Got it, called fileNameBody. It is used a several times, but there is a particular place where it gets composed.
var fileNameBody = fileNamePrefix;
fileNameBody += "_" + zeroSuppress(i, 4);
fileNameBody += "_" + layerName;
fileNameBody = fileNameBody.replace(/[:\/\\*\?\"\<\>\|]/g, "_"); // '/\:*?"<>|' -> '_'
if (fileNameBody.length > 120) {
fileNameBody = fileNameBody.substring(0,120);
}
I'm happy with it, 'cos there is a variable called layerName, exactly what I wanted to search after next. Then really just modify the third row of this piece, simply fileNameBody sould be the layerName. The code goes like below.
fileNameBody = layerName; //fileNameBody += "_" + layerName;
And done (the original version could be saved via comment). The exported filenames are now the same as the source layer's name. I'm happy with it.
©Tally - another micro app
Since ©Tangram released I almost haven't coded any piece of line (except the 1.0.1 debug update). I missed xCode more and more, so I decided today to implement one of my "boxed" micro app idea called ©Tally.

It is nothin' more than a simple counter that counts. There are many exendable parts, but the root version involves only one screen with a hidden grid onwhich user can tap, then it strokes that small line (with a slight animation and some randomness). Maybe I can experiment with iAds/Retina display within this project, as the application is gonna be free of course.
But first let me get into the graphic/animations.

So this is the grid. For the tellies, I found that only three kind of groups is far enough to ensure that randomee diversity (as you can see the transparent groups). Now let see the slight animations - the heart of the tasty feel.
I made the animations, but a frame is now around 25 KB. I have to learn how to install/use the so called pngcrush tool. I've found some really helpful blog post (Compiling Pngcrush on Mac OS X Snow Leopard, Optimize PNG file (image) to Speed up WebSite), so the PNGs have shrinked now to 16%(!). Really a useful tool.
Launched ©ompactApps feedback site!
I found that the best way to hear from users and what they want to see in my Apps is the platform called UserVoice.
Whithout further explanations, please find the feedback site at compactapps.uservoice.com (for ©ompass360° for example).
©Tangram 1.0.0 - ©TapStack 1.0.5 - cross promotion
The backside of the ©TapStack application is intended to be some kind of self-advertising space in the beginning. So here is the big time to tell the news about ©Tangram to ©TapStack users.
Made some sketches, then the more easily "readable" won, so I made the final images after that.

I really like the photo from the splash screen, but it
seems too dense to be a simple but effective sticker.

A more simple (let say ©compact) layout can be more effective/consistent I think.

So the final sticker rearrangement above.
The update has been submitted for review, hope will be released soon, so another bulk of ©TapStack promo codes will be available for christmas time (maybe I should make a free period again during the holidays).
©Tangram 1.0.0 - Submitted
Celebrating the App Store submission of the ©Tangram project. It was started to develop a bit more than a year ago. At the time when I started to learn iPhone development. Magic moments. Hope Apple won't reject the binary, it should be released before christmas.
Stay tuned for promo codes @compactApps (free promo codes now can be redeemed worldwide).

All the things behind
©ompactGames
iPhone game development. Flash (ActionScript), iPhone (xCode, Objective-C, Cocoa-Touch), augmented reality, geometry, user-experience, tangram, sudoku, origami, whatever.
iPhone Apps
- compass3D©- compactTangram©
- TapStack©
All categories
- Archive from old times (hungarian) (10)- compactSudoku© (20)
- compactTangram© (48)
- compass3D© (24)
- Creativity (3)
- gotoandplay.freeblog.hu (2)
- Origami sessions (2)
- Sudoku technikák (3)
- TapStack© (7)
- xCode - augmented reality (28)
- xCode - hasznos linkek (1)
- xCode - iPhone app development (92)
- xCode - OpenGL ES 1.x for iPhone (27)

