Archive

Archive for the ‘Programming’ Category

Xblaze for Adium 1.1.5

January 4th, 2012 Jasarien No comments

Hi guys,

I’m not dead. Yet.

A quick update for Xblaze for Adium. I just recompiled with the latest Adium source so it should work once more. Nothing else new, really.

Go grab it: https://xblaze.co.uk/blog/download/

Categories: Programming, Releases, XBlaze Tags:

Public Service Announcement: SEND ME YOUR CRASH REPORTS

December 21st, 2010 Jasarien No comments

The amount of reviews Xblaze gets on the App Store that say nothing more than “it crashes! 1 star!” is depressing.

By doing this you’re not helping anyone. Firstly, you’re deterring new users from giving the app a try. Secondly you’re not giving me anything to work with to fix the crashes.

How can I be expected to fix a crash I never see? It’s not as if I don’t test Xblaze. I use it daily and I put it through rigorous tests before I release it to the App Store. If I see a crash I fix it before releasing – so any crashes that do get through are not common and will require a detailed crash report and explanation of how the crash occurred or what you might have done to cause it.

iPhones, iPods and iTunes can help us all out here. When an app crashes, a crash log is generated. That crash log contains extremely important information about when, how and why the crash happened. The crash report is the single most important resource I can use when trying to fix a crash.

When you plug your iPhone or iPod into iTunes and sync it, you should be told that your device contains Diagnostic Data or Crash Report Data or something to that affect and will ask you if you’d like to send it to Apple. Say YES. If you say no to this question – your crashes will likely never get fixed and you’ll continue to be frustrated when using the application.

If you don’t see the message then one of two things is possible: The less likely reason is that Xblaze isn’t crashing. The more likely reason is that for whatever reason you’ve previously answered NO to sending crash reports to Apple and have told iTunes not to ask you again.

To fix this, you can right click on your iPhone or iPod in the iTunes sidebar and select “Reset Warnings”. Now when you sync if your iPod contains crash reports, you will be asked if you want to send them. Again – please say YES.

Finally, if you don’t sync your device, or haven’t updated it’s OS (regardless of whether its jailbroken or not) I can’t help you. This is a two way relationship. I give you Xblaze, you give me feedback. OK?

If you don’t send me these crash reports I will never know why the app is crashing. Think about it…

Categories: Programming, Support, Xblaze iPhone Tags:

A Compromise, Perhaps? (Updated)

June 19th, 2010 Jasarien No comments

Update 4/12/10

The behaviour described in this post, if implemented in an iOS app, would result in a rejection from Apple.

Even though the described behaviour occurrs, it is a rule of the review process that all apps exit and clean up their networking sockets when the user backgrounds the app if the app is not allowed to run in the background. This means that even though Xblaze supports fast app switching, it still needs to close it’s connection to Xfire and cease any background communication.

End Update

So, after my last post about iOS4 and multitasking, I have noticed some very surprising and interesting observations about iOS4.

I’m no expert, and I’m only describing what I’ve seen actually happening, so here goes.

In normal circumstances, I expected an app that didn’t explicitly request to run in the background to become suspended and as a result,its network connections closed.

It appears that this isn’t the whole truth. In my testing when I suspended Xblaze into the background, it’s socket was not immediately closed. At first, I thought this was because the suspension hadn’t triggered Xblaze’s disconnect function, and that it would simply be disconnected when Xfire closed the connection after not receiving the keep-alive heart beat. Again, this wasn’t the case. It seemed that the connection stayed open, even after the expected period of time after which Xfire would normally close the connection.

I waited for 10 mins with Xblaze suspended in the background, sending a message to the account every minute. Sure enough, after I opened Xblaze again, bringing it back into the foreground, sly of those messages were suddenly received.

There is one caveat to this test – I had “auto lock” disabled, so my iPhone would not lock itself and go to sleep. I did notice that if I suspended Xblaze and then locked the iPhone, the connection was immediately closed.

So what’s happening here!?

My theory is that regardless of what Apple and their documentation says, it seems that while the phone is still awake and not locked, the OS will look after the socket and the connection, effectively queuing the incoming data, ready to be received when the app is brought back into the foreground.

This sounds great, right? Isn’t this multitasking?

Well no. There are a few compromises.

1. The connection is only kept alive while the iPhone is awake. As soon as the phone sleeps or is locked manually, the connection gets closed.

2. There’s still no way to notify the user that messages have arrived while Xblaze is suspended. The messages are only queued until the app is brought back into focus. As far as Xblaze is concerned, all those messages have just arrived this very second when it’s woken up.

But hey! Its not the end of the world, its better than nothing, right? At least you now have SOME way of getting messages while the app is in the background. Its better than not getting those messages at all, even if you do have to go check for them…

Xblaze and iOS 4

June 15th, 2010 Jasarien No comments

The new iPhone 4 was announced last week, and alongside it, the release date of the newly renamed iOS.

Some of you may be fortunate enough to have access to the iOS 4 beta software and may have tried out Xblaze on iOS 4. Those that have will know that it’s not exactly what one would call “stable”.

I have been testing Xblaze on iOS 4 and its going to take some work, but I hope to get a compatible update out soon.

In other news some of you have been asking how much of the new APIs Xblaze will be taking advantage of with the new release. The answer to this question isn’t as exciting as you probably hope it will be.

Multitasking.

In April, at their unveiling of iOS4, Apple announced multitasking support for the iPhone. My initial reaction was one of relief, thinking I’d be able to escape the never ending requests for push notifications, and instead just allow Xblaze to run in the background. Unfortunately, the way Apple has implemented multitasking means that there are a number of restrictions surrounding what types of apps can use it and what those apps can do while in the background.

First of all, only VoIP, navigation and audio streaming type apps are allowed to actually run in the background. Any other type of app is ‘suspended’. Even those apps that can run in the background become very limited while there.

Suspension is when an app is literally ‘paused’ and sent to the background. The current state of the app is saved to memory. When the app is brought to the foreground it is “defrosted” and returns to the exact same state as you left it.

Apps that are allowed to run in the background will suspend most of their functionality but keep the core services that it requires running.

For instance, the popular VoIP app Skype will be able to receive calls while in the background, and close the app while a Skype call is in progress, because it keeps it’s socket connections to the Skype server open when it is sent to the background. But while its in the background all the Instant Messaging features of Skype are suspended and do not run meaning instant messaging does not work while Skype is in the background.

This was very bad news for Xblaze when I found out. I had some contacts at WWDC this year and they were able to confirm that instant messaging apps will *not* be allowed to run in the background. When you couple this with the fact that Xfire requires a constant connection to its server, kept alive by a ping of around 5 minutes, it means that Xblaze won’t even be able to take advantage of being suspended. This is because after those 5 minutes are up, Xfire closes the connection, effectively kicking you off the server, disconnecting you. When you return to the app after suspending it, you’ll find that you have been logged out and will have to reconnect, just like you do now.

The experience with Xblaze on iOS4 is likely going to be exactly the same as it is now – having to keep the app in the foreground in order to be able to send and receive messages to and from friends. And I’ll say it again – the way Xfire works just doesn’t allow a sensible way to support Push Notifications.

This saddens me in some respects and in and effort to change things I have raised a feature request with Apple and made my voice heard on the developer forums, but I fear that nothing is going to be done about it. It’s the way things are and that is that.

It puts a sour taste on something that could have been such a great feature…

To Clarify A Few Points About Jailbreaking iPhones

January 23rd, 2010 Jasarien No comments

I’ve received a few emails asking why apps crash more often on Jailbroken iPhones. So I’ve collected my thoughts and written down a number of reasons why Jailbreaking is a pretty bad idea.

  • Jailbreaking Allows Background Apps
    • Extra strain on the CPU
    • Extra drain on the battery
    • Heavy consumption of available RAM
    • Usage of your data connections (this might incur costs that you’re not aware of if you’re not on an unlimited data plan)
    • It’s impossible to know what the background apps are doing, if they request more resources and can’t get them because Xblaze is using the available RAM, maybe they’re written to kill other apps and take the memory for itself? No-one knows, except the developer of that app, and since Apple don’t approve these apps, they could be doing exactly that.

This reason alone is suspect enough to be a big cause of concern for people running Jailbroken iPhones. People forget that the iPhone is a mobile device, because it is so capable. It’s important to remember that the iPhone does have a very small amount of RAM compared to laptops and other computers. The iPhone was not designed to run many apps at the same time – this is why Apple restrict it to one 3rd part app at any time. They didn’t do it just to annoy people…

If there are several apps consuming vast amounts of RAM already running on the device (this include ssh servers, themes for springboard, notification apps, etc) then what hope does a legitimate app such as Xblaze have of surviving? Those not familiar with the iPhone SDK and how the iPhone works, may not know that the iPhone OS will kill an app if the device starts to run low on memory. Non official apps may be able to be coded in ways that ignore these warnings, forcing the OS to kill the legitimate apps that can’t ignore these warnings.

The result is that Xblaze will simply quit if there are low memory conditions on the iPhone it is running on, and since Xblaze only consumes a mere 4MB of RAM while running, the jailbroken iPhone would have to be using almost all the RAM before Xblaze is even started, which is actually quite likely considering some jailbroken apps such as themes that are rich in graphics and sounds.

  • Modified Frameworks
    • Changes the expected behaviour of the iPhone so that a legitimate app will crash while trying to access a function or class that has been modified by anyone but Apple.
    • May cause the app to not even launch if the required APIs aren’t available at launch time.

When writing an iPhone app, a developer is given a set of Frameworks which allow them to access the iPhone’s functionalities, user interfaces, etc. Think of them as hand grips on a climbing wall. You need them to hold onto to be able to reach the top. If you tried to grab as hand grip and it wasn’t there, you’d fall. This is exactly the kind of thing that can happen to an application that relies on a framework being in the state that it was originally in when released by Apple. Changing these frameworks simply breaks any app that requires them. And once again, since it’s impossible to know which frameworks have been changed or how they’ve been changed, developers simply can’t program their app to work in that environment.

  • Inter-Process Access
    • Jailbreaking an iPhone removes all restrictions. One app may be able to access the insides of another app.

If any malicious apps decide to snoop around the memory space of a legitimate app, anything could happen, ranging from the app crashing, due to memory corruption, to having something like your password and personal details stolen… Is that something you’re willing to risk? All restrictions are removed on a jailbroken iPhone – if you’re checking your online banking through Safari, what is stopping any malicious app from stealing your account details and forwarding them on to identity thieves? Are you happy with the possibility that your xfire password may not be safe when running Xblaze on a jailbroken iPhone, because there’s nothing I can do to protect it if it is. On a legitimate iPhone, Xblaze stores your password, encrypted using an SHA1 encryption algorithm, safely inside the iPhone’s Keychain (the same way passwords are stored safely on Mac OS X). The keychain can be accessed freely by any application when running on a jailbroken iPhone… Consider it carefully.

Unfortunately, due to the shady nature of jailbreaking iPhone devices, it is impossible to say whether any of this is 100% accurate, but I know I’d rather err on the side of safety, stability and security when it comes to my personal data, my entertainment and my overall mobile experience…

The truth to the question “Why does jailbreaking cause more crashes than normal?” is that I simply don’t know. If I knew, I’d be able to prevent it…

Categories: Programming, XBlaze Tags: , , , jailbreak, ,

An Unfortunate Truth About Jailbroken iPhones/iPod Touches

January 22nd, 2010 Jasarien 3 comments

So Xblaze has been in the App store since the 12th of January, almost 2 weeks.

I have been following the stats and feedback very closely, and so far the response to Xblaze for the iPhone has been great! Xblaze has over 20 reviews worldwide, most of which are 5 star ratings! I can’t thank the people who left these reviews enough, it’s these users that make Xblaze what it is, and without them, Xblaze would float away quietly…

However, there is always a downside. Unfortunately the downside here is that some people are running Xblaze on a Jailbroken iPhone, and leaving bad reviews when it crashes.

For those who may not know, Jailbreaking is the process of “hacking” the iPhone’s OS to allow open access to the entirety of the phone. It allows 3rd party developers to write applications that don’t need to be approved by Apple.

Since Apple aren’t approving these Applications, they could be doing anything from gathering your personal information, running in the background using up your battery and data connections, installing malicious software such as worms — literally anything is possible.

Jailbreaking also allows users to install pirated applications, and get apps for free when they would normally have to pay. It is important to note, however, that not all Jailbreakers are pirates. About 38% of the Jailbreaking community have used pirated Apps, which is approximately 1.5Million out of 4 Million.

But piracy is not a problem for free apps, and we all know that Xblaze is free. So what is the problem?

Jailbroken devices have had their software “tampered” with. The iPhone OS running on a jailbroken iPhone is not the same as that installed on regular iPhones. For this reason, it is impossible to know exactly what has been tampered with, or how it will affect how the phone works.

A study has been done, using data gathered via the Pinch Media Analytics framework that shows how jailbreaking an iPhone can negatively affect application performance.

Specifically, “all jailbroken phones (whether the application is pirated or not) suffer from increased application crash rates,”. ()

Jailbroken iPhones crash more often.

The very frustrating thing is that as a developer, I have no control over who runs Xblaze or what iPhone they run it on. And as a direct result, Xblaze will get run on Jailbroken iPhones, and the statistics show that it is likely to crash more often than if it was run on a normal, official iPhone OS.

It is impossible for me to code Xblaze to not crash on a jailbroken iPhone because it is written using the official iPhone SDK (software development kit), using the official APIs (application programming interfaces). In nearly ALL cases, jailbreaking an iPhone installs older APIs, or changes their behaviour to be more flexible and open, and in some cases, installs extra software at the system level that could affect how certain processes work.

Because of this fact, the application may expect an API to behave one way, but in fact comes up against an API that behaves completely differently to how it is programmed, and as a result, will crash. It is important to understand that this will not happen to every single application or on every single Jailbroken phone. It’s almost a “crash lottery”. You take your chances when you jailbreak and accept the risks.

It is also very important to understand that there is nothing I can do to fix it, because jailbreaking is not an officially supported development option.

At the end of all this, Xblaze suffers in the app store, receiving one star reviews for crashes that aren’t Xblaze’s fault.

You’re free to run Xblaze on any kind of iPhone you like – but please don’t leave a bad review if your device is jailbroken and the app crashes… If you want the most stable experience, don’t jailbreak your iPhone. If you don’t find that acceptable and you make the decision to jailbreak, please don’t make Xblaze suffer because of it.

Categories: Programming, Xblaze iPhone Tags: , , jailbreak, ,