tag:blogger.com,1999:blog-58171096346090113742024-03-13T05:24:14.923+02:00iLessons iLearned...while iDeveloping iSoftware for iPhone and Other iThingsjouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.comBlogger187125tag:blogger.com,1999:blog-5817109634609011374.post-65138984213431344952012-10-21T13:01:00.000+03:002012-10-21T13:01:01.616+03:00Retrospective for Offline LibraryThing Book Catalog Browser<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbtD_21Of8ZF6I9Vr7K0qnRWjFxTPh4fGfHuiW16nsjOINHln0OTWotzTcMPH7HT04Va6rhN1_fuwomWNpuOI_hXWTH-YuUpTHokhaBNmFzdiuc2hPoDAuNYcph4NC4iDVIS5Oq9d2Z0k/s1600/myBooksRC1_200.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbtD_21Of8ZF6I9Vr7K0qnRWjFxTPh4fGfHuiW16nsjOINHln0OTWotzTcMPH7HT04Va6rhN1_fuwomWNpuOI_hXWTH-YuUpTHokhaBNmFzdiuc2hPoDAuNYcph4NC4iDVIS5Oq9d2Z0k/s1600/myBooksRC1_200.png"></a></div>
My latest <b>hobby application</b> (non-work, created on personal time) is now waiting for various approvals. Reached the exhaustion point, where it's more important to make a release than add new features - or even search for bugs.<br>
<br>
<div style="text-align: center;">
<span style="color: red;"><b>Idea without execution is worthless.</b></span></div>
<br>
There's <b>online development diary</b> "<a href="http://jomnius.tumblr.com/">While Developing</a>" started 22 August 2012, about 2 months ago. So what did I do and did I learn anything? At all? Would I do this again? Ever?<br>
<br>
<a href="http://jomnius.blogspot.com/2012/10/retrospective-for-offline-librarything.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-45061130161896072852012-10-18T09:45:00.002+03:002012-11-19T15:16:04.265+02:00 Dependency Graph Tool for iOS Updated<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Ox9x5vU4Em6JfDwXj3cWwiqz7eHgLATZnH1ZGtzPwkxH7GK8qcybQ0ClVwcOpd2RHMQc1vZGtxCTzJQ0CIBYvrFfN-Zqbzj0iwpu2Y6FMEJ9dc-LBtJtMLbIrJRuStUv1P-XQ8ILkfg/s1600/dep_chart.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Ox9x5vU4Em6JfDwXj3cWwiqz7eHgLATZnH1ZGtzPwkxH7GK8qcybQ0ClVwcOpd2RHMQc1vZGtxCTzJQ0CIBYvrFfN-Zqbzj0iwpu2Y6FMEJ9dc-LBtJtMLbIrJRuStUv1P-XQ8ILkfg/s1600/dep_chart.png"></a></div>
Recent iOS project was using <a href="https://github.com/ShareKit/ShareKit">ShareKit</a> via <b>"git submodule"</b> command, which added a LOT of items into <b>dependency chart</b> generated by <a href="https://github.com/nst/objc_dep">objc_dep utility</a>. Additionally I didn't have any control of those files, just used them as they were given.<br>
<br>
To make dependency chart usable again, I added a command line parameter to ignore a subdirectory.<br>
<a href="http://jomnius.blogspot.com/2012/10/dependency-graph-tool-for-ios-updated.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-87113824499105707322012-08-31T06:04:00.000+03:002012-11-19T15:16:46.530+02:00While Developing Elsewhere<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTahrR1jl4y0yE0ODd2ei_XCpLj-JiaInNWhzzo75JJ-rAdH76kfZvYEBvPpeOO7SwMpVeD2xWC-JjJAv6rgnmbOBAibb6C_K11mJm8TKx3j68jJb9vMsUvLCO583uzrriJWv9xZiMOzw/s1600/MyBooks.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTahrR1jl4y0yE0ODd2ei_XCpLj-JiaInNWhzzo75JJ-rAdH76kfZvYEBvPpeOO7SwMpVeD2xWC-JjJAv6rgnmbOBAibb6C_K11mJm8TKx3j68jJb9vMsUvLCO583uzrriJWv9xZiMOzw/s1600/MyBooks.png" /></a></div>
Just a quick note that <b>a)</b> I've been real busy with a <b>business iPhone app</b> development for a startup (subcontractor work) and <b>b)</b> started documenting one of my recently reactivated <b>hobby projects</b> at <a href="http://jomnius.tumblr.com/">jomnius.tumblr.com</a>.<br />
<br />
The startup project is scheduled to be released for App Store review later today (!!!) and my part of the project should be done. Ready for next project, whatever and whenever that might be.<br />
<br />
Hobby project on the other hand is an offline book catalog browser for <a href="http://www.librarything.com/">LibraryThing</a> website, truly a treasure trove for all book lovers. The app is work-in-progress and not released yet.jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-1392772198225344832012-06-05T11:53:00.000+03:002012-11-19T15:19:17.932+02:00CoreData and NSCocoaErrorDomain Code 1570<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinmdkkoBg2c9FrqUKKjGYRzsLphBoJPKMFTgP28QYV4rcz60uxWUf8qBaXKyig2YKTitHAx1aixmy1ZzNSOpjEvQq-ujWY-zEdmpU2GsA_CDVM1LSSPfmRhd4ghWJqVL792MUGJmBb3uQ/s1600/CoreData.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinmdkkoBg2c9FrqUKKjGYRzsLphBoJPKMFTgP28QYV4rcz60uxWUf8qBaXKyig2YKTitHAx1aixmy1ZzNSOpjEvQq-ujWY-zEdmpU2GsA_CDVM1LSSPfmRhd4ghWJqVL792MUGJmBb3uQ/s1600/CoreData.png"></a></div>
Seems like iOS <b>CoreData doesn't like non-existing values</b> i.e. "nil".<br>
<br>
Didn't realize at first that something was wrong, because a) I wasn't very familiar with Coredata, just inherited the code to be upgraded and b) I created my own caching on top of CoreData to compensate some issues with CoreData. Then found this error buried deep into console logs:<br>
<blockquote class="tr_bq" style="color: blue;">
CoreData Error Domain=NSCocoaErrorDomain Code=1570 "The operation couldn’t be completed. (Cocoa error 1570.)<br>
</blockquote><a href="http://jomnius.blogspot.com/2012/06/coredata-and-nscocoaerrordomain-code.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-89431551733348620812012-05-31T01:55:00.000+03:002012-11-19T16:45:22.146+02:00You do not have the required file permissions<div class="separator" style="clear: both; text-align: center;">
<span id="goog_927699803"></span><span id="goog_927699804"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG4fVz4lePeywpnhHF1ajQnq3VjdRwW5izDpgApPZCXqDPFEBR7BMyXkW4I0_ZCCGKSM2DwuuQWDHIzoZLcygYh43NgMG5hDYx0AQ-7OhojT5nQeIXl6DYBb9Me-qxRJizoTa-iiA0fAc/s1600/clock_late.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG4fVz4lePeywpnhHF1ajQnq3VjdRwW5izDpgApPZCXqDPFEBR7BMyXkW4I0_ZCCGKSM2DwuuQWDHIzoZLcygYh43NgMG5hDYx0AQ-7OhojT5nQeIXl6DYBb9Me-qxRJizoTa-iiA0fAc/s1600/clock_late.png"></a></div>
We exchange project files over a <a href="http://en.wikipedia.org/wiki/Git_%28software%29">shared git repo</a> on remote server and somehow I just <b>lost write access</b> to some files:<br>
<b><span style="color: blue;"><br></span></b>
<b><span style="color: blue;">Error cleaning build folder</span></b><br>
<blockquote class="tr_bq">
<span style="color: blue;">You do not have the required file permissions </span></blockquote>
<a href="http://jomnius.blogspot.com/2012/05/you-do-not-have-required-file.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com1tag:blogger.com,1999:blog-5817109634609011374.post-84990117287942801542012-05-24T09:30:00.000+03:002012-11-19T15:21:34.449+02:00Server API change from HTTP to HTTPS<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-hOHEfY4tw6-vU1frfGvZ3ULU54IRhYSsDU9ZPaKq34jslGGqIsaPBRPsTizKDEs-6Ae1YpTnHxdyjO1plfKvbdZFBeq1LoJ2P45owBzuHLfkUPWmwvZrMPdTmIqb7IgDaAx14Yy4iyo/s1600/http_s.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-hOHEfY4tw6-vU1frfGvZ3ULU54IRhYSsDU9ZPaKq34jslGGqIsaPBRPsTizKDEs-6Ae1YpTnHxdyjO1plfKvbdZFBeq1LoJ2P45owBzuHLfkUPWmwvZrMPdTmIqb7IgDaAx14Yy4iyo/s1600/http_s.png"></a></div>
Doing an <b>iOS client for business service</b>, where client communicates with server to read and update certain undisclosured business data. Current development API is using HTTP with dummy test data, but real service will use HTTPS once everything has been validated to be safe and secure.<br>
<br>
Client connectivity <b>change
from HTTP to HTTPS</b> was done basically by adding (only) this code:<br>
<a href="http://jomnius.blogspot.com/2012/05/server-api-change-from-http-to-https.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-60452523321666968032012-05-14T13:21:00.000+03:002012-11-19T15:22:32.838+02:00How to Remove Unused Parameter Warning - part 2<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgajhHX0RfQg6C4BNFOc227jOcjc1lE0m4bm78AjpHLHra5GOUAzHyaYXVJNeIODoPysi2vrs8Vl7sRNNOk3IxKdLXd54ZQERWXm9mm7R6c7livIFU5oL7paFn3Qp0DZQdOeOITCIr8uUo/s1600/unused_warning.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgajhHX0RfQg6C4BNFOc227jOcjc1lE0m4bm78AjpHLHra5GOUAzHyaYXVJNeIODoPysi2vrs8Vl7sRNNOk3IxKdLXd54ZQERWXm9mm7R6c7livIFU5oL7paFn3Qp0DZQdOeOITCIr8uUo/s1600/unused_warning.png"></a></div>
I still believe in <b>no-warnings coding</b> policy. Old problem, new solution.<br>
<br>
<b>Code warnings</b> are often <b>signs of real problems</b> and have to be checked each and all. Many times you can rewrite the code in a better way, but sometimes that's not possible. For example generic protocol API offers method parameters, which are not needed in certain cases. You get the "Unused Parameter" warning.<br>
<br>
What to do?<br>
<a href="http://jomnius.blogspot.com/2012/05/how-to-remove-unused-parameter-warning.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-85318547331019837922012-03-31T13:05:00.000+03:002012-11-19T15:23:23.725+02:00How to Create ZIP Archive with Password in Mac<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsWOEYLviQPwgu8kW8JUjA40YEzoB9OQR7eE1WQH3LMdYehl0Vs2lprOCLcL-DQ5nD4gQy1yrg_d4Lq8Yp-qeHMuCAkQhBJ7clPKmTQTGh67zeyd97xb4wbb0XdI2BvS5_W12ZnmRBoBI/s1600/zip.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsWOEYLviQPwgu8kW8JUjA40YEzoB9OQR7eE1WQH3LMdYehl0Vs2lprOCLcL-DQ5nD4gQy1yrg_d4Lq8Yp-qeHMuCAkQhBJ7clPKmTQTGh67zeyd97xb4wbb0XdI2BvS5_W12ZnmRBoBI/s1600/zip.png"></a></div>
Sending <b>source codes over email</b>, need to apply <b>basic security</b> measures. It's not a top secret project, software has already been released for another platform and the codes are basically just for a fully functional demo app.<br>
<br>
No need to send a secret agent carrying encrypted SSD disk embedded inside his skull.<br>
<a href="http://jomnius.blogspot.com/2012/03/how-to-create-zip-archive-with-password.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com1tag:blogger.com,1999:blog-5817109634609011374.post-12623089211044114962012-03-08T09:26:00.000+02:002012-03-29T22:30:46.092+03:00Font Changes in iOS 5.1 - AppleGothic<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfo0aLCGPKa9hIv7Uyw4wdaHcetCxdiegTaeA-2RgxZVxLi_OOY2hO02pL1o1C2hlRnOXCuSb_-eKA91Zl4YvOyKJ5ZCXhCfANqjEuFPCoxVZqf0p4kdrSb3C76IB-cvs0pEUJeMlaQwY/s1600/ios5.1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfo0aLCGPKa9hIv7Uyw4wdaHcetCxdiegTaeA-2RgxZVxLi_OOY2hO02pL1o1C2hlRnOXCuSb_-eKA91Zl4YvOyKJ5ZCXhCfANqjEuFPCoxVZqf0p4kdrSb3C76IB-cvs0pEUJeMlaQwY/s1600/ios5.1.png"></a></div>
Apple <b>iOS 5.1 was released</b> late last evening (local time in Finland), as part of the <a href="http://www.apple.com/pr/library/2012/03/07Apple-Launches-New-iPad.html">"new iPad" announcement</a>. Naturally I installed it right away and checked what <a href="http://itunes.apple.com/us/app/fonttype/id469522880?mt=8">FontType</a> utility app tells me.<br>
<br>
Apple has <b>removed AppleGothic</b> and <b>added two Apple SD Gothic Neo</b> fonts.<br>
<br>
<b style="color: blue;">Update</b>: I've been told these are Korean fonts, so I generated sample texts in Korean. I believe the text is supposed to mean "On this Day" or something like that.<br>
<br>
Other iOS fonts are still same as in iOS 5.0.1 (see also: "<a href="http://jomnius.blogspot.com/2011/10/new-fonts-in-ios-50-and-some-missing.html">New Fonts in iOS 5.0 - and Some Missing</a>"). <br>
<br>
AppleGothic screenshots below:<br>
<a href="http://jomnius.blogspot.com/2012/03/font-changes-in-ios-51-applegothic.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-47308570456874171812012-02-28T13:32:00.000+02:002012-02-28T13:33:35.060+02:00Could not load the image referenced from a nib in the bundle with identifier<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-vKmUBlXLKPm41GdQoSPvgkWxqyItefoIKDZF4blC3ZEzg70Yc810xl1XEfOLqEv9rxPv3ClsBCnYwdO9LDVLf1EO2ZOAmeXLVMnb1Smdfl5D8p04Le_avk_kdw_npWSPB5owfLt85nU/s1600/unknown_image.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-vKmUBlXLKPm41GdQoSPvgkWxqyItefoIKDZF4blC3ZEzg70Yc810xl1XEfOLqEv9rxPv3ClsBCnYwdO9LDVLf1EO2ZOAmeXLVMnb1Smdfl5D8p04Le_avk_kdw_npWSPB5owfLt85nU/s1600/unknown_image.png"></a></div>
Just make sure <b>your files</b> are where you (your project file) thinks they are.<br>
<div style="text-align: center;">
<blockquote style="color: blue; font-family: "Courier New",Courier,monospace;">
myApp[12345:678] Could not load the "image.png" image referenced from a nib in the bundle with identifier "com.company.app"</blockquote>
</div>
Check for <b style="color: red;">filenames in red</b> (at left), indicating that somehow some file became unknown. Maybe you were moving files around in Finder, were you? Of course you were, you silly bugger!<br>
<a href="http://jomnius.blogspot.com/2012/02/could-not-load-image-referenced-from.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-9977843447065161782012-02-24T21:51:00.000+02:002012-11-19T15:26:08.270+02:00Quality Icons for Your Quality App<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8qc7tQ6wL4VYQG3VdWhJW2Lk9p4Tr-iQ2X51jS73KwBafR2GyLDQu3vbY80dnJ0aOhqZAwzgU96V4qHCgUc1Ory7_4vjWJfpIQg6-Go7MewuAZAJxErWaIQpYP0dnqjl_daIgsQO7rvc/s1600/glyphish.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8qc7tQ6wL4VYQG3VdWhJW2Lk9p4Tr-iQ2X51jS73KwBafR2GyLDQu3vbY80dnJ0aOhqZAwzgU96V4qHCgUc1Ory7_4vjWJfpIQg6-Go7MewuAZAJxErWaIQpYP0dnqjl_daIgsQO7rvc/s200/glyphish.jpg" width="200"></a></div>
What is the best way to use your time right now? What is <b>the most profitable way to spend your time</b> right now?<br>
<br>
Would guess it's not something like <b>delaying the launch</b> of your latest greatest application just to finetune UITabBar icons by yourself. How much do you lose income in a day by doing that?<br>
<br>
<b>Seriously.</b> Some people are good at design, some good at coding, some at graphics. Most are not, but still keep trying to do everything by themselves.<br>
<br>
<a href="http://jomnius.blogspot.com/2012/02/quality-icons-for-your-quality-app.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-84541470579221066682012-02-14T08:14:00.000+02:002012-02-14T08:14:35.899+02:00FontType 1.1 Release Notes and Future Plans<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinb92j_Phq-mIntDLvicYHNtMRUO2pB5v6Mgu7cGMjxVewYHLzIu-FLM0xX7x1nMqhSvfn9lQYkUI8m2gslYW42aCdyQUArtgWZfuJ051LUR8_Qp5yFHkLGguymTKURmvlCs3r9dL1wLg/s1600/fonttype_1.0.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinb92j_Phq-mIntDLvicYHNtMRUO2pB5v6Mgu7cGMjxVewYHLzIu-FLM0xX7x1nMqhSvfn9lQYkUI8m2gslYW42aCdyQUArtgWZfuJ051LUR8_Qp5yFHkLGguymTKURmvlCs3r9dL1wLg/s1600/fonttype_1.0.png"></a></div><b>FontType version 1.1</b> was released on <a href="http://itunes.apple.com/us/app/fonttype/id469522880?mt=8">Apple AppStore</a> on Monday. Official release note contains iOS5 compatibility, font metrics view and undefined fixes under the hood. Apple used 4 hours for the review (according to push notifications via <a href="http://www.tuaw.com/2010/06/10/apple-releases-itunes-connect-mobile-for-app-store-developers/">iTC Mobile app</a>), wonder what they were doing.<br>
<br>
Biggest change is internal, out-of-sight, thanx to the <b>objc_dep dependency graph tool</b>. As you can see (<a href="http://jomnius.blogspot.com/2012/01/dependency-graph-tool-for-ios-projects.html">in this linked article</a>) the version 1.0 architecture was a bit dodgy, me coding at nights half asleep and during 15 minute breaks desperately trying to recall what the frak was I doing between constant context switches.<br>
<a href="http://jomnius.blogspot.com/2012/02/fonttype-11-release-notes-and-future.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-61281859210988044982012-02-06T12:26:00.000+02:002012-02-06T12:26:42.747+02:00Icon dimensions (0x0) don't meet the the size requirements<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi71X3wB5pZPsSaULiRdt4fqwQhiSoo2bht2643ZeB0O5F8PwldzXw5FS_to_Wy1BG3ZgmUnDUav29s3vqPrtT7Ra6R9R15CAYG8Y28bBBEx6SjWp_dxViK1Oum-X_BV2s2Goz3YaWlCtE/s1600/dim_0x0.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi71X3wB5pZPsSaULiRdt4fqwQhiSoo2bht2643ZeB0O5F8PwldzXw5FS_to_Wy1BG3ZgmUnDUav29s3vqPrtT7Ra6R9R15CAYG8Y28bBBEx6SjWp_dxViK1Oum-X_BV2s2Goz3YaWlCtE/s1600/dim_0x0.png"></a></div>Got a weird warning while <b>validating</b> my <a href="http://www.jomnius.com/fonttype/">FontType</a> 1.1 update at the weekend:<br>
<blockquote style="color: blue;">iPhone/iPod Touch: Icon dimensions (0x0) don't meet the the size requirements. The icon file must be 57x57 pixels, in .png format</blockquote>Icon was just fine, so it's unclear what this means. However there are <b>two theories</b>: a) latest Apple iOS update messed up something or b) Apple iTunes Connect server has some issues.<br>
<a href="http://jomnius.blogspot.com/2012/02/icon-dimensions-0x0-dont-meet-the-size.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com4tag:blogger.com,1999:blog-5817109634609011374.post-88816957872787845152012-02-03T09:19:00.000+02:002012-02-03T09:19:03.809+02:00How to Get Magnifying Glass into UITableView Index<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8SiFw2CYww-bN5W0AFgq500qzdT10Ol1UmbMWgrvCbNFIkeRHPNi-t0tn1GofZO1K9z-c2yLZxzdFYhG-WMzHRbaNqwyFdA4TtFi1ir2JvzTWTXyze9jzHA6AWmCUTBkrK7T_wDMnJyA/s1600/magnifying_glass.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8SiFw2CYww-bN5W0AFgq500qzdT10Ol1UmbMWgrvCbNFIkeRHPNi-t0tn1GofZO1K9z-c2yLZxzdFYhG-WMzHRbaNqwyFdA4TtFi1ir2JvzTWTXyze9jzHA6AWmCUTBkrK7T_wDMnJyA/s1600/magnifying_glass.png"></a></div>If your <b>app contains a list</b>, you might want to considere adding an <b>index bar</b> at right side of the screen. If your list supports search, you might want to add a <b>magnifying glass</b> at top of the index (similar to built-in Contacts application).<br>
<br>
Ok, so how do you do that?<br>
<br>
Good news is that it's <b>really simple</b> - as soon as you figure it out once. Check <a href="https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html">Apple iOS SDK for UITableView Class Rerefence</a> and you'll find:<br>
<a href="http://jomnius.blogspot.com/2012/02/how-to-get-magnifying-glass-into.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com2tag:blogger.com,1999:blog-5817109634609011374.post-41824661558786324842012-01-13T23:39:00.000+02:002012-11-19T15:28:29.025+02:00Find NSDictionary in NSArray with Certain Value<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbo_aqcd8IL9IOdU60dAnIbnjUxNi84cFthB7cB8JaMkErHflxof9Q-oPT3YvjuSxCsK0nk2OTyyaH7vo1Tefawh0p6_kNyk4zmCuJemJ46q8GcyMXcs1eDrbDiz7J-UQSywLwvp2oSsQ/s1600/hammer_nail.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbo_aqcd8IL9IOdU60dAnIbnjUxNi84cFthB7cB8JaMkErHflxof9Q-oPT3YvjuSxCsK0nk2OTyyaH7vo1Tefawh0p6_kNyk4zmCuJemJ46q8GcyMXcs1eDrbDiz7J-UQSywLwvp2oSsQ/s1600/hammer_nail.png"></a></div>
Current project got <b>lots of data in NSArrays and NSDictionaries</b>. Nothing against them, extremely useful data structures. Just got to finetune my hammer a bit (since hammer is what I got and thus <a href="http://en.wiktionary.org/wiki/if_all_you_have_is_a_hammer,_everything_looks_like_a_nail">everything looks like a nail</a>).<br>
<br>
So how do you find a certain NSDictionary from NSArray containing a <b>requested key</b>? Two easy ways here:<br>
<a href="http://jomnius.blogspot.com/2012/01/find-nsdictionary-in-nsarray-with.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com1tag:blogger.com,1999:blog-5817109634609011374.post-9211279492716744202012-01-07T15:30:00.000+02:002012-11-19T15:30:17.369+02:00Always Test in Real - Not Just Crappy - User Device<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqz6_3s_uyo2bxAId4Sgzy60bSXB6sS062AO2-rmtzZqftO8I4UF6mvxsoCph3BGbSN-yqJfzPCXlLY6XuEdJ-7QkkeRdrnbE9w1rLFkHYhRHu4MhWkTWsnyMXKVaVs0pgQkbew_SyzRE/s1600/oom_boom.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqz6_3s_uyo2bxAId4Sgzy60bSXB6sS062AO2-rmtzZqftO8I4UF6mvxsoCph3BGbSN-yqJfzPCXlLY6XuEdJ-7QkkeRdrnbE9w1rLFkHYhRHu4MhWkTWsnyMXKVaVs0pgQkbew_SyzRE/s1600/oom_boom.png"></a></div>
<b>Memory related defects</b> can be hard to debug, therefore I usually force automatic system "out of memory" notifications. That makes sure I have no other choice, but to handle potential <a href="http://en.wikipedia.org/wiki/Out_of_memory">OOM issues</a> from the start. Otherwise the app won't run. Clever, right?<br>
<br>
And that's the problem. <b>Potential OOM issues</b>. Did you notice that "potential" keyword?<br>
<a href="http://jomnius.blogspot.com/2012/01/always-test-in-real-not-just-crappy.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com8tag:blogger.com,1999:blog-5817109634609011374.post-70815581153248124242012-01-06T21:39:00.001+02:002012-11-19T15:32:29.848+02:00Dependency Graph Tool for iOS Projects<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Ox9x5vU4Em6JfDwXj3cWwiqz7eHgLATZnH1ZGtzPwkxH7GK8qcybQ0ClVwcOpd2RHMQc1vZGtxCTzJQ0CIBYvrFfN-Zqbzj0iwpu2Y6FMEJ9dc-LBtJtMLbIrJRuStUv1P-XQ8ILkfg/s1600/dep_chart.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Ox9x5vU4Em6JfDwXj3cWwiqz7eHgLATZnH1ZGtzPwkxH7GK8qcybQ0ClVwcOpd2RHMQc1vZGtxCTzJQ0CIBYvrFfN-Zqbzj0iwpu2Y6FMEJ9dc-LBtJtMLbIrJRuStUv1P-XQ8ILkfg/s1600/dep_chart.png"></a></div>
One of the tools, which I used to use with Symbian C++ projects, was an <b>automated dependency graph generator</b>. Can't recall the name, had totally forgotten anything like it ever existed. Totally happy in my ignorance. Blissful happy-go-lucky <a href="http://en.wikipedia.org/wiki/Cowboy_coding">cowboy coding</a>.<br>
<br>
Until I found this tool: <a href="https://github.com/nst/objc_dep">objc_dep.py at GitHub by nst</a>, which does <i>"Graph the import dependancies in an Objective-C project"</i>.<br>
<br>
Oh the memories! Oh the horrow, when I checked my current projects...<br>
<a href="http://jomnius.blogspot.com/2012/01/dependency-graph-tool-for-ios-projects.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com2tag:blogger.com,1999:blog-5817109634609011374.post-55777134522324314022011-12-27T11:12:00.000+02:002011-12-27T11:12:50.197+02:00How to Autogenerate App Version Number from GIT<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-QlORHDG4uSQ/TvmJEZMTDCI/AAAAAAAAArA/eOWWjPGmlJM/s1600/autoversion.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-QlORHDG4uSQ/TvmJEZMTDCI/AAAAAAAAArA/eOWWjPGmlJM/s1600/autoversion.png"></a></div><b>Application needs a version number</b>, naturally. It's publicly used to identify, which version customer is using (and reporting bugs about).<br>
<br>
However there is a very important <b>technical reason</b> to take good care of version number: if you want to update application, the new version number must be bigger than the old one. Sounds easy, yet again...<br>
<br>
Let's check the documentation:<br>
<a href="http://jomnius.blogspot.com/2011/12/how-to-autogenerate-app-version-number.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-84458728731702478232011-12-08T14:24:00.000+02:002011-12-08T14:24:45.223+02:00How to Sort NSDictionary<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNPE-mNfCYLrUDRJmbQaWK0TfnUwevAdsZHlZeDdtqX_xIXcr-_-DJ0YzVfWBwUwIVMYbhSUq321wy2j47-zTVzPejku-z1-ByuW6CZNR-q1-NgbnfF9qdVDIv2pJ65NC8qNdyNBie8WU/s1600/date.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNPE-mNfCYLrUDRJmbQaWK0TfnUwevAdsZHlZeDdtqX_xIXcr-_-DJ0YzVfWBwUwIVMYbhSUq321wy2j47-zTVzPejku-z1-ByuW6CZNR-q1-NgbnfF9qdVDIv2pJ65NC8qNdyNBie8WU/s1600/date.png"></a></div>Let's get this straight: <b>you cannot sort NSDictionary</b>.<br>
<br>
Dictionary is a <b>collection</b> of keys and their objects without an order, therefore you cannot change that non-existing order. You can sort only array data types, since they are basically ordered lists.<br>
<br>
There are <b>still good news</b>. You can get all keys from any dictionary as an array and sort them. Usually this is enough.<br>
<a href="http://jomnius.blogspot.com/2011/12/how-to-sort-nsdictionary.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-39470696394419547622011-11-29T21:43:00.000+02:002011-11-29T21:43:54.588+02:00When NOT to Release Your Application<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhvmG8kfa3tVXtTLOniWJ6_EWDVknangxBM24XqUeuD6r3VRUrQz3YZeRJttoIzsR2hz_ir4D03vCAAs9aNsq4r4npGrUQgVAjJk1X7JsjAHuAY5ygWcVvuo5H0XwuXzRxmBLQApJ8LQo/s1600/thanksgiving.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhvmG8kfa3tVXtTLOniWJ6_EWDVknangxBM24XqUeuD6r3VRUrQz3YZeRJttoIzsR2hz_ir4D03vCAAs9aNsq4r4npGrUQgVAjJk1X7JsjAHuAY5ygWcVvuo5H0XwuXzRxmBLQApJ8LQo/s1600/thanksgiving.png"></a></div>Regardless of all "<a href="http://en.wikipedia.org/wiki/Release_early,_release_often">release early, release often</a>" and "fail early, fail often" talk, <b>there really are moments</b>, when you SHOULD NOT RELEASE your new application.<br>
<br>
This could be a trick question, but it's not. Just another hard lessons learned, another strike by <b>faceless market powers</b>. The answer is Thanksgiving, of course.<br>
<a href="http://jomnius.blogspot.com/2011/11/when-not-to-release-your-application.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-57287833320272446392011-11-24T11:25:00.000+02:002011-11-24T11:25:51.722+02:00Console On Device 1.0 Now Available in App Store<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLwEYzivPxTfUbFlZvmFuhsh4iCIAp6FIfiYNLwwkrKDPs9PvoWIrSTmQWeyjRIdGrKYU-8veOvi9_bfpMz4FnOlIpEg6bc1A5pzGuhNxS_8Fao6RctYCWR8gwT48AhE55rzjGCXm50uY/s1600/ConsoleOD.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLwEYzivPxTfUbFlZvmFuhsh4iCIAp6FIfiYNLwwkrKDPs9PvoWIrSTmQWeyjRIdGrKYU-8veOvi9_bfpMz4FnOlIpEg6bc1A5pzGuhNxS_8Fao6RctYCWR8gwT48AhE55rzjGCXm50uY/s1600/ConsoleOD.png"></a></div>I am happy to tell that <a href="http://jomnius.blogspot.com/2011/05/three-applications-to-be-released.html">second of my old three apps</a> is finally available in App Store:<br>
<br>
<div style="text-align: center;"><a href="http://www.jomnius.com/consoleondevice/">Console On Device 1.0</a></div><br>
It's mainly a <b>developer utility</b> to check iOS console output within your device, without a computer. However many released apps write debug data into console, so <b>occasional users</b> can use it to check what's going on under the iOS hood - even whether some app really crashed or not (check "ReportCrash").<br>
<br>
So <b>why did I write it</b>? Because I needed something like that in a real customer project, but couldn't find. Here's the story, without any names:<br>
<a href="http://jomnius.blogspot.com/2011/11/console-on-device-10-now-available-in.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-54012921502074216682011-11-16T08:37:00.000+02:002011-11-29T09:45:06.342+02:00Releasing Console On Device - Lessons Learned<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLwEYzivPxTfUbFlZvmFuhsh4iCIAp6FIfiYNLwwkrKDPs9PvoWIrSTmQWeyjRIdGrKYU-8veOvi9_bfpMz4FnOlIpEg6bc1A5pzGuhNxS_8Fao6RctYCWR8gwT48AhE55rzjGCXm50uY/s1600/ConsoleOD.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLwEYzivPxTfUbFlZvmFuhsh4iCIAp6FIfiYNLwwkrKDPs9PvoWIrSTmQWeyjRIdGrKYU-8veOvi9_bfpMz4FnOlIpEg6bc1A5pzGuhNxS_8Fao6RctYCWR8gwT48AhE55rzjGCXm50uY/s1600/ConsoleOD.png"></a></div>
Trying to make my third release, an <b>application called "Console On Device"</b>. Learned some new things - and old ones, too.<br>
<br>
First of all, application <b>name was already reserved</b>. I did extensive research and tough name planning, when starting to design this app - in February 2011. Surprisingly at November 2011 someone else had already released an app with "my" name!<br>
<br>
Lesson learned: I could have created <b>iTunes Connect app record</b> right away to reserve the name. However in this case luck was on my side: I found a new better name!<br>
<a href="http://jomnius.blogspot.com/2011/11/releasing-console-on-device-lessons.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-768524734015235232011-11-01T22:05:00.004+02:002012-11-19T15:40:35.158+02:00Rise and Fall of FontType in App Store<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE14tNCHq3Q08NnIhSBpEzi8CWbUUNy-GMWYBnncuCDp5hwswHH82tVv4Khu07fH1jtHQ7HIz3PkhoDISQnlAxUkmh9vDHAn6EUyShyphenhyphens526OCTyVi30wJExJobiqgtsPx4IL8iE2wiPhs/s1600/fonttype_sales.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE14tNCHq3Q08NnIhSBpEzi8CWbUUNy-GMWYBnncuCDp5hwswHH82tVv4Khu07fH1jtHQ7HIz3PkhoDISQnlAxUkmh9vDHAn6EUyShyphenhyphens526OCTyVi30wJExJobiqgtsPx4IL8iE2wiPhs/s1600/fonttype_sales.png"></a></div>
It's <b>three weeks since release</b> of <a href="http://itunes.com/app/fonttype">FontType</a>, my first app under my own name (actually Jomnius). It's been ... interesting times. Didn't expect big sales, but hoped to get at least a few users. Nope.<br>
<br>
Some comments and suggestions for update. None. Bug reports. Nada. Hello, anyone there?<br>
<a href="http://jomnius.blogspot.com/2011/11/rise-and-fall-of-fonttype-in-app-store.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com2tag:blogger.com,1999:blog-5817109634609011374.post-42286343064877009852011-10-27T10:46:00.000+03:002011-10-27T10:46:43.686+03:00How to Handle HTTP Headers in iOS4 and iOS5<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlpNeoEmFoV4tuV1o4Z0Z8FcFQnIcug3V9i9vsR5WvBCoSQTfNJIbDk3ePtuydMpyfouvC4xjZBWD-htrAb1ITdhzYaeX_JWtjuBm9sYKy3HTv_78-PonrXXJmjDVX6X6Kp9OsLeHrmH0/s1600/http.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlpNeoEmFoV4tuV1o4Z0Z8FcFQnIcug3V9i9vsR5WvBCoSQTfNJIbDk3ePtuydMpyfouvC4xjZBWD-htrAb1ITdhzYaeX_JWtjuBm9sYKy3HTv_78-PonrXXJmjDVX6X6Kp9OsLeHrmH0/s1600/http.png"></a></div>One of several <b>minor incompatibilities between iOS4 and iOS5</b> is the way how HTTP headers are reported. The difference is in the capitalization and white-space handling:<br>
<blockquote class="tr_bq" style="color: blue;">iOS4: @"Myapp-Sampleheader ";<br>
iOS5: @"MyApp-SampleHeader";</blockquote>Once you figure out this is the problem, the fix is quite easy. Here is a generic routine to handle both cases at the same time:<br>
<a href="http://jomnius.blogspot.com/2011/10/how-to-handle-http-headers-in-ios4-and.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0tag:blogger.com,1999:blog-5817109634609011374.post-32500582053084498832011-10-24T07:41:00.001+03:002011-10-24T10:19:52.578+03:00Invalid attempt to access ALAssetPrivate past the lifetime of its owning ALAssetsLibrary<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrAgOL2yYvrwx6QBzj5vV1Xmgh2iOvUntKnCFUJ_qc1LJ1_YoNHdWhOUGSB3baPyTyWFga2eKM_4pmh8SA7MCOkZdzcR8xKk9kcSLNCuvECyovfJceAoKVkw5V8nwK52Vt8lZQiWsuLyM/s1600/images.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrAgOL2yYvrwx6QBzj5vV1Xmgh2iOvUntKnCFUJ_qc1LJ1_YoNHdWhOUGSB3baPyTyWFga2eKM_4pmh8SA7MCOkZdzcR8xKk9kcSLNCuvECyovfJceAoKVkw5V8nwK52Vt8lZQiWsuLyM/s1600/images.png"></a></div>Trying to <b>upload hundreds of images</b> from device, but application occasionally crashes with this error note:<br>
<blockquote style="color: blue;">invalid attempt to access ALAssetPrivate past the lifetime of its owning ALAssetsLibrary</blockquote>Basically it means what it says. Library was <b>closed before reading</b> the image data was completed. As result upload failed due missing or too short data. <a href="http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAssetsLibrary_Class/Reference/Reference.html">ALAssetsLibrary Class Reference</a> says:<br>
<a href="http://jomnius.blogspot.com/2011/10/invalid-attempt-to-access.html#more">Read more »</a>jouni miettunenhttp://www.blogger.com/profile/07233375549382114547noreply@blogger.com0