Changes to app:
- Fixed bug in saving settings.
- Fixed error message display size issues.
- Added some cheeky animations for the about/disclaimer screens
- Fixed crash when there is a typhoon, but no typhoon track (shouldn’t happen!)
- App now displays Chinese warnings if you choose that setting.
Changes to middle tier:
- Now parses the Chinese version of the HK Observatory warnings pages.
The Chinese support and parsing is totally experimental. I’ve only been able to test against no warning and one warning. Not two warnings or when there is a typhoon. I expect issues!
The full interface and messages is not localised, just the warnings retrieved from the Observatory.
Not sure what’s going on with the app. It’s suddenly become very slow when retrieving the HK Observatory web page data.
The PHP script was timing out, meaning the app received 404 errors. I increased the timeout, so I’m no longer seeing 404s, but it’s all over the place time-wise.
Sometimes it takes 1.5 seconds, sometimes 35 seconds. I won’t use it at 35 seconds, so no one else will!
It has to be network related. The HK Observatorysite loads just fine and very fast at the moment, so it’s got to be due to the hops to my server, then to the HK Observatory site, back to the server, then back to the phone.
I’m going to investigate a host based in HK.
Other apps that seem to go directly to the HK Observatory site (HK Weather, iWeatherHK) are working just fine at the moment.
Changes to iPhone app:
- Better icons for the T warnings – can actually see them now! Got one T8 icon too.
- On the details page, instead of saying “Warning 1” in the title, it says the actual warning title.
- Changed app name to HKWarnings!
Changes to middle tier:
- Fixed bug in warning code extraction
- Observatory site has two different ways of saying “No warning”. Now handles both.
There is currently a T3 signal hoisted, so I think the Observatory website is experiencing some load. So the app is slow when first getting the deets. Am thinking about this …
UPDATE: set the timeout in the PHP page. Might help.
User settings – choose warning language (English/Chinese)
User settings – vibrate/sound on a ‘Go Home’ kind of warning
Add link to typhoon track page if there is a typhoon warning
Localise interface for Chinese language
Welcome to HKWarnings! It’s just a simple app to display the current HK Observatory weather warnings.
This is my first attempt at an iPhone app so expect some bugs.
Well, second really. I completely re-wrote this app after learning a lot about iPhone dev and Obj-C during the first attempt.
In addition to re-writing all the Obj-C code, the app now looks at a middle layer between the Observatory website and the iPhone.
This was done for a two reasons:
- The Observatory occasionally change the format of their page, so if they do, I can quickly react to the new format by changing my parsing PHP code rather than changing the iPhone app and having to re-submit to the iTunes App Store and wait for review. This happened recently and the iWeatherHK app didn’t work properly for two weeks!
- Parsing and formatting. Much easier to do in PHP than Obj-C!
It does however mean there are two network legs to the data retrieval. My testing shows that it takes around 2.5 seconds (min=1.32s, max=11.13s) for the app to get the data over 3G and WiFi. The amount of data retrieved is tiny (1KB) so 3G/WiFi should make little difference. The time is taken up by network transfer.
The app still isn’t totally finished though:
- Some warning icons are not complete yet (T8 is a big one missing!)
- The splash screen is a bit naff
- It will only ever display a max of two warnings. I’ve not seen three in force, but it could happen. I’ll decide about this later.
However, for version 1.0, I think I’m done and will start the app approval process once I have the T8. I still don’t know how to provision and build for the store yet. Lots of plist settings to tweak.
Anyway, there are a few moving parts that can go wrong, so I appreciate if you can test it now and then to see if the links and parsing is working in addition to general usability and crashes.
If the app does crash:
- Sync your phone to iTunes.
- Browse to the following folders. Note that Device_Name will be the name if your iPhone as shown in iTunes:
- Mac OS X : ~/Library/Logs/CrashReporter/MobileDevice/Device_Name/
- Windows XP: C:Documents and SettingsUsernameApplication DataApple computerLogsCrashReporterDeivce_Name
- Windows Vista: C:UsersUsernameAppDataRoamingApple computerLogsCrashReporterMobileDeviceDevice_Name
- Each log file will begin with “HKWarnings!”. Create a zip file from these applications (Mac: Right-click->Compress, Windows Right-Click->WinZip) and then email it to firstname.lastname@example.org
I also appreciate any ideas you might have for development. Please check my ‘roadmap‘ to see what I have planned.
How to use compiler statements to create specific simulator/device code:
//compiler specific code
// device specific code
Info coming soon…
I’ve still not decided on the name.
Or the display theme for this blog!