Bar code reading in Delphi XE4 for iOS

July 3rd, 2013 by Anders Ohlsson

Fernando Rizzato has written a blog about how you can read bar codes using Delphi XE4 for iOS.

Enjoy!

Push Notifications and DataSnap

June 25th, 2013 by Anders Ohlsson

I was recently in a situation where I had access to only port 80.

This means that RDP (port 3389) doesn’t work… Amazon EC2 APNS demo was out.

Even local APNS was out, because it uses port 2195 from the sending server…

So, I decided to retrofit my APNS server and make it a DataSnap server responding to port 80 in addition to being a client I can click a button on using RDN to Amazon EC2.

I created a server method SendPushNotification. It takes the DeviceToken and the text message as parameters.

I call it from any browser anywhere on the following URL scheme:

http://MyEC2Instance/datasnap/rest/TServerMethods1/SendPushNotification/DeviceToken/Message

And it works! So next time I’m locked down to port 80 my demos will work just fine…

Sometimes I’m easily amused! :)

In-App Purchase: SKRequest.start bug?

June 25th, 2013 by Anders Ohlsson

Since I’m using a third party component for In-App Purchasing, I’m not sure where this bug is, but it seems that SKRequest.start crashes when there is no connectivity to the Internet in general (or to the AppStore in particular).

My solution is to check for reachability to the AppStore, because that’s what we really care about. I’m using Indy for a multi-platform solution (as opposed to iOS APIs).

I offer the following code up as a solution. Tear it apart… ;)

uses
  ..., IdComponent, IdTCPClient;

type
  TForm2 = class(TForm)
    ...
  public
    Conn : TIdTCPClient;
    procedure TCPClientStatus(ASender: TObject; const AStatus: TIdStatus; const AStatusText: string);
    procedure TCPClientConnected(Sender: TObject);
    procedure TCPClientDisconnected(Sender: TObject);
  end;

implementation

procedure TForm2.Button1Click(Sender: TObject);
begin
  // Attempt to connect to the AppStore
  Conn := TIdTCPClient.Create(nil);
  Conn.Host := 'itunes.apple.com';
  Conn.Port := 80;
  Conn.OnConnected := TCPClientConnected;
  Conn.OnDisconnected := TCPClientDisconnected;
  Conn.OnStatus := TCPClientStatus;

  try
    Conn.Connect;
  except
    ; // Failure - No Internet Connection
  end;
end;

procedure TForm2.TCPClientConnected(Sender: TObject);
begin
  // Disconnect gracefully
  Conn.Disconnect;
end;

procedure TForm2.TCPClientDisconnected(Sender: TObject);
begin
  // No need for this TCP client anymore
  Conn.DisposeOf;
end;

procedure TForm2.TCPClientStatus(ASender: TObject; const AStatus: TIdStatus; const AStatusText: string);
begin
  if Pos('Connecting to',AStatusText) > 0 then
    // We have reachability to the AppStore, so go ahead and call LoadProducts
    InAppPurchase1.LoadProducts;
end;

Come see us in person! Denver, Seattle, Salt Lake City, Washington DC and Boston!

June 7th, 2013 by Anders Ohlsson

Upcoming cities:

David I will be in Denver and Seattle. I will be in Salt Lake City and Boston. Al Mannarino will be in Washington, DC.

See ya!

CodeRage Mobile June 18-19, 2013

June 6th, 2013 by Anders Ohlsson

Yes, you read that right! In 12 days! It’s gonna ROCK! :)

CodeRage Mobile June 18-19

Press Release

Schedule

REGISTER NOW!

Enjoy!

In-App Purchasing update of Analog Clock just submitted!

June 3rd, 2013 by Anders Ohlsson

As soon as the newest update gets approved, you can get rid of the ads… ;)

Stay tuned to hear more about this topic… ;)

Enjoy!

Delphi XE4 FireMonkey app using iAd already approved!

May 31st, 2013 by Anders Ohlsson

Less than 48 hours from submission to approval is spectacular!

I’m feeling like a kid in a candy story when I get new stuff into the AppStore! :)

Nothing like a little Candy Crush Saga while watching the time fly away as you develope super cool FireMonkey apps for iOS using Delphi XE4!

Anders’ Analog Clock with iAds

/Enjoy!

iAd beta wrapper by Simon Choi

May 29th, 2013 by Anders Ohlsson

Simon Choi has a beta version of his iAd wrapper for Delphi XE4 for iOS.

Very cool. I decided to take it for a spin, and it works in development mode on my device.

As a final test, I submitted an update of my Analog Clock app. If you’re one of 1,900 people who have tried it, you should see the update (if approved) soon.

:)

Want to try RAD Studio XE4, Delphi XE4, or C++Builder XE4, but have no Mac! No problem! Check this free offer!

May 24th, 2013 by Anders Ohlsson

JT just blogged that we have partnered with MacInCloud. This is fantastic news for anyone that wants to play with the trial, but don’t have a Mac to deploy to.

JT’s post - read for details.

Enjoy!

More APNS info (in pictures)

May 24th, 2013 by Anders Ohlsson

A little bit of clarification on my APNS blog post(s) comment threads…

Deployment tab - notice IDE maintained file UNCHECKED - your file - CHECKED - remote name - Entitlements.plist:

Provisioning tab (specify the first two, hit Load ID):

Version Info tab:

Anders.entitlements file:

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
  <key>application-identifier</key>
  <string>XZ9AC2Q82Q.com.AndersOhlsson.FMX.01</string>
  <key>aps-environment</key>
  <string>development</string>
  <key>get-task-allow</key>
  <true/>
</dict>
</plist>

Enjoy!


Bad Behavior has blocked 512 access attempts in the last 7 days.

Close