Archive for iPhone

Another fix of Delphi code – Click on the ListView

My customer found another but at Delphi application:

TListView Bug

 

If you click at TListView on the empty are, last item get automatically selected and events as  OnClick and OnItemClick are called.

Well it can be nice feature for someone, but it’s not really logical .. for example if you have open keyboard and you want to hide it, by clicking at the empty area.

There is no settings to tun this behavior off as it’s hard coded.

The problem is at FMX.ListView.pas unit at FindItemAbsoluteAt procedure, line 4060.

This code:

if ViewAt >= HeightSums[HeightSums.Count - 1] then
 Exit(HeightSums.Count - 1);

Replace with this code:

 if ViewAt >= HeightSums[HeightSums.Count - 1]+GetItemHeight(HeightSums.Count-1) then
 Exit(-1);

And the system will start to work logically.

You can download modified unit here, just include into your project.

Upgrading iPad/iPhone to 7.1 – ‘Unable to locate DeviceSupport directory matched with connected device info’

Recently Apple released new version of the iOS for iPhone and iPad.

If you start Delphi XE5 and you will try to compile the application you will get error:

‘Unable to locate DeviceSupport directory matched with connected device info’

What you need to do is:

Step 1) to import the new iOS SDK.

At the Delphi go to Tools -> Options and Under Enviroment Options is the SDK Manager.

updateios

 

The new iPhoneOS 7.1 should be listed.

Read more

Reading data from the MIDI keyboard at iOS (and probably also at the Mac)

I’m just implementing support for the MIDI keyboard under iOS – mean you can connect MIDI keyboards (I’m using MIDITECH GARAGEKEY Mini) connected via the Apple iPad Camera Connection Kit.

The keyboard works perfect, you just plug it into the iPhone or iPad and it works. As the keyboard doesn’t have any additional led diode it has really low power consumption.

From the free software I found only GarageBand from Apple to be working with the keys.

At my application the keyboards can be easily implemented via the CoreMIDI (here is link to download my implementation for Delphi).

Garagekey mini

 

Read more

Submitting application to the Apple store from Delphi.

Today I wanted to submit my app to the Apple Store for my customer.

This is generally the procedure: http://docwiki.embarcadero.com/RADStudio/XE5/en/Deploying, but I got some problems.

It’s done via Application Loader that can be downloaded after registration at the https://itunesconnect.apple.com .

Application-loader-2-5-1

Unfortunately I got few errors after first upload:

ERROR ITMS-9000: “The bundle identifier cannot be changed from the current value, ‘PianoWizard’. If you want to change your bundle identifier, you will need to create a new application in iTunes Connect.” at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)

ERROR ITMS-9000: “This bundle is invalid. The application-identifier entitlement is missing; it should contain your 10-character Apple Developer ID, followed by a dot, followed by your bundle identifier.” at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)

ERROR ITMS-9000: “Invalid Launch Image – Your app contains a launch image with a size modifier that is only supported for apps built with the iOS 6.0 SDK or later.” at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)

ERROR ITMS-9000: “This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK or Xcode.” at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)

Here is how I handled them:

Read more

Opening an URL at separated browser under Delphi XE5.

I was just recently handling quite simple task – to open an URL from the mobile application.

It’s simple under windows .. you will just call ShellExecute function.

But at Delphi that should unify access to all basic tasks for all different platforms is this function somehow missing… ops.

I found solution for the Android and solution for the iOS.

Read more

Implementing missing iOS frameworks

The challenge

As I mentioned in previous posts, I’m just writing a game for an iOS under Delphi XE-5.

Well on the begging it was looking really nice and easy, but there are some catches.

XcodeFirst Delphi doesn’t support multi-touch. This was handled thanks to support of Iztok Kacin.

Second catch was MIDI.

I found that iOS can play MIDI by this article, but from Delphi I couldn’t call it, because “god knows why” Embarcadero created support for some of the frameworks under Delphi.

So I was digging and digging and I found out that it’s actually relatively simple to add missing frameworks to Delphi.

The solution

Embarcadero did that for some of them and Xcode gives header files to each of the framework.

Read more

Game Development – Frames per Second

INTRO

At the games development if you paint animations at the screen or you are scrolling the scene, you want it to look smooth. To do that you need paint certain amount of pictures at the screen per second. This is called Frames per Second (FPS).

Eye

When you have a PC/Mac game you usually have to buy better hardware or decrease detail quality to raise the FPS to level that it will be nice.

But if you have the iPhone it’s up to the developer to create the game in such quality to look and works nicely. (if you have Android you have more choices to buy so you can still upgrade).

FPS

But what is the optimal FPS? Well let’s put little of the technical details.

Read more

Tool to easy setup deployment files for Delphi XE5

I’m using Delphi XE-5 for development and they are contradictory.

I think that person who is responsible for whole product is truly visionary and he actually saved future of whole product.

Delphi XE5

The fact that you can by one code develop under Windows (32 or 64bit), Mac, Android and iOS is just amazing.

And it’s really working.

Well the Android app take long time until it starts because the app is not a Java but it’s a native application. Benefit is that any component will work there. It’s really great.

But there are also bad things. There are some decisions that was made and that makes me crazy.

Read more

iPhone 3G – update to iOS 6 is not possible

As I wrote at my previous post, I was trying to update my iPhone 3G to iOS 6 by using whited00r.

iPhone 3G

Well I couldn’t leave it like that so I was playing with that today more and I managed to install the whited00r firmware, thanks to this detail description.

Unfortunately it’s not iOS 6. It’s iOS 3.1.3 with some of the features of iOS 6, but not compatible. Means you can’t download newer apps from the Apple store. Actually I tried about 5 apps (Google maps, etc..) and I didn’t found any that can be downloaded :(.

Read more

Publishing AddHoc application on the iPhone

I’m now working on my first commercial game for the iPhone at Delphi XE5. It’s called Piano Wizard .

Delphi XE5

I was just sending to the customer a version for testing (it’s called Ad hoc) and it doesn’t worked at his phone.

Read more