Archive for the ‘iOS’ Category

MathViz for iOS updated and free for two days!

Tuesday, May 15th, 2012

MathViz 1.1 update has been approved. I added gesture support and a reset button.

Pardon me while I play around and get a feel for how pricing campaigns work… ;)

MathViz 1.1 is free for two days. I believe I exhausted the potential for new customers (without doing any marketing) so the party right now is up to just a couple of pizzas (if I do Papa Murphy’s Take’n'Bake)… ;)

Please feel free to download MathViz in the next couple of days while it’s free. Please consider reviewing it as well.

BTW, MathViz will be permanently free at some point, and the source code will be freed at some point as well.

Thanks for playing! Enjoy!

Playing sound on iOS? Anyone have a working Delphi XE2 FireMonkey sample?

Tuesday, May 8th, 2012

I wish I had time for everything… I’ve tried this one a couple of times, but have run into issues with parsing framework this and that… ;)

So, here it is… Anyone got a simple example that plays a single sound effect and/or plays a background track?

From files that you deploy with the app (resources).

Background track from existing music library on device would be a sweet bonus.

I’ll make sure you get credit if I use it in upcoming blogs, webinars, etc.

Thanks!

3 more iOS components added - Pinch/Zoom/Rotate gesture recognizers plus a custom switch

Monday, May 7th, 2012

I’ve uploaded three more components to CodeCentral. There are now 13 components and 8 demos in my submission.

The three components added:

PinchGestureRecognizer - zoom/pinch

RotationGestureRecognizer - rotation

Switch - custom labels for TSwitch - ON/OFF or YES/NO (or any 1-4 letter words you want)

Enjoy!

Modifying FMX_Platform_iOS.pas to support surface mainWindow and add device orientation support

Monday, May 7th, 2012

Here are the steps that I use in order to surface a couple of things that some of my custom iOS components and apps need.

These modifications are not supported by anyone. Except maybe me. You apply them entirely at your own risk.

Modify FMX_Platform_iOS.pas on your MAC as below. It’s typically located in the /Developer/Embarcadero/fmi directory.

CAUTION: Save a copy of FMX_Platform_iOS.pas FIRST!
CAUTION: Any update of XE2 will delete your changes, so keep this file around if you have to redo the changes.

unit FMX_Platform_iOS;

interface

// TUIViewController and TUIWindow declarations moved from implementation to interface section

type
{ TUIViewController }

TUIViewController = objcclass(UIViewController)
private
public
function shouldAutorotateToInterfaceOrientation(AinterfaceOrientation: UIInterfaceOrientation): Boolean; override;
procedure didReceiveMemoryWarning; override;
procedure didAnimateFirstHalfOfRotationToInterfaceOrientation(toInterfaceOrientation: UIInterfaceOrientation); override;
procedure didRotateFromInterfaceOrientation(fromInterfaceOrientation: UIInterfaceOrientation); override;
end;

{ TUIWindow }

TUIWindow = objcclass(UIWindow)
protected
public
Text: UITextField;
mainView: UIView;
mainController: TUIViewController;
end;

// mainWindow moved from implementation to interface section
// currentOrientation added to give current device orientation
// supportsPortrait etc added. You simply change these in your app code to False if not needed

var
mainWindow: TUIWindow;
currentOrientation : UIInterfaceOrientation;
supportsPortrait : Boolean = True;
supportsPortraitUpsideDown : Boolean = True;
supportsLandscapeRight : Boolean = True;
supportsLandscapeLeft : Boolean = True;

implementation

function TUIViewController.shouldAutorotateToInterfaceOrientation(
AinterfaceOrientation: UIInterfaceOrientation): Boolean;
begin
Result := ((AinterfaceOrientation = UIInterfaceOrientationLandscapeRight) and supportsLandscapeRight) or
((AinterfaceOrientation = UIInterfaceOrientationLandscapeLeft) and supportsLandscapeLeft) or
((AinterfaceOrientation = UIInterfaceOrientationPortrait) and supportsPortrait) or
((AinterfaceOrientation = UIInterfaceOrientationPortraitUpsideDown) and supportsPortraitUpsideDown);

if Result then
currentOrientation := AinterfaceOrientation;
end;


Enjoy!

iOS Formula Keyboard

Saturday, May 5th, 2012

Just a teaser. I’ll probably add this as an InAppPurchase for MathViz when I make MathViz free. ;)

Thanks to those who bought MathViz already! 25 copies sold for $0.99 each in 4 days! Enough for a couple of six packs for the office. ;)

PS: Source code for this one coming too. Mainly custom style work in this one.

May the Force be with you! (and MyEDN for iOS)

Friday, May 4th, 2012

Happy Star Wars Day!

MyEDN was originally submitted to the AppStore for review on April 9th.

My first mistake was not including, setting up and populating a test account for Apple to test MyEDN. DOH!

That cost me about a week, because the review process is clocking at about 6-7 days it seems.

They sent me a request to update the review notes with a test account and test instructions, and finally submit the new meta data. Unfortunately the reviewer had put MyEDN in the wrong state, and it took me a while to figure out that the only way to get it back into Waiting for Review was to submit a new binary (actually the same one).

About a week later it was rejected with some unspecific pointers about the UI. This was the login screen at this point:

I asked for clarification, and got another couple of messages back from the reviewer that weren’t specific enough for me to figure out what exactly they wanted instead.

I decided to use the Appeal option, and while waiting for that process I ripped the UI apart and recreated it from the ground up. I added info screens throughout as well as more functionality.

Yesterday I got a call back from a very nice person of the App Review Board, and it became clear that the issue wasn’t UI at all. I had a link to www.embarcadero.com in my description of MyEDN. This is considered disallowed marketing, even though my phrasing was specifically "PS: An EDN account is required to use this app. If you don’t have one, you can create one here…" - in retrospect a link to members.embarcadero.com would probably have worked better, but I opted to remove the link completely. I don’t foresee anyone that isn’t already an EDN member downloading MyEDN anyway. Finally, Apple had also found a crash bug, which is now addressed.

By this time I already had the new UI ready to go. My plan was to make it an update, but since MyEDN still wasn’t approved I simply uploaded it as a new binary and it’s now pending review in this form:

I’m much happier with this look and feel, and my hope is that the Force is with MyEDN this time. If the review cycle stays on it’s current 6-7 day schedule MyEDN should go into review by the end of next week, and hopefully I’ve knocked out all issues and it will be approved so that you guys can have at it. I can’t stand the fact that Cleggy teases me on a daily basis that EDN Mobile has been in Google Play for weeks and that he’s updated it multiple times in the last couple of days. I told him that in his case no review was required, and that his UI is still nowhere near mine. Apple is holding MyEDN to a much higher standard than that! So there, Cleggy… ;)

Enjoy!

PS: All this experience with App Review feedback, Appeal etc will be awesome fodder for upcoming webinars as well, so that all of you can create awesome iOS apps.

MathViz 1.0 for iOS approved and in the AppStore now!!!

Tuesday, May 1st, 2012

MathViz 1.0 AppStore link

Before you ask why it’s $0.99 and not free - I wanted to see if I could get a FireMonkey paid app approved, and I’m very happy to say that I could. And anyone can, of course!

I will leave it at $0.99 for the next couple of weeks, and anyone that wants to "donate" to a lunch, dinner, party or whatever it turns out to be, can do so in the next couple of weeks. After that it will become free for all.

The link above is live, but it will take up to 24 hours for MathViz to be searchable in the AppStores world wide.

Your purchases of MathViz will go to a couple of things - Apple, the IRS and finally some kind of FireMonkey party of some kind - total volume of paid sales and actual payouts from Apple will determine what will happen.

Now that MathViz is available I will use it for blog fodder, webinar fodder, and I will of course publish the source code.

Thanks everyone in advance for playing and giving feedback!

MathViz 1.0 is powered by TExpressionParser - a flexible and fast expression parser for logical and mathematical functions by Egbert van Nes, with contributions by John Bultena and Ralf Junker. Thanks for Egbert van Nes’ explicit permission to use it in a paid app. :)

Delphi Developer Days and Free Evening Events this week

Sunday, April 15th, 2012

I’m headed to Delphi Developer Days to do the Embarcadero keynote as well as a free evening event in each city - Washington DC (BWI area) and Chiacgo. Don’t miss free food, drink and potentially valuable discounts at these events!

See you there!

Solution: armv7 validation errors when submitting FireMonkey iOS apps to the AppStore

Thursday, April 12th, 2012

I was trying to record the process of submitting an app last Friday. My EDN app was ready for the AppStore. I ran into this:

iPhone/iPod Touch: application executable is missing a required architecture.
At least one of the following architecture(s) must be present: armv7

This happens on the validation step of submitting an app to the AppStore. The reason is that the validation step for AppStore submissions has changed. Support for *only* armv6 is no longer allowed. You have to support armv7, either by itself or have dual support (armv6 and armv7). This is a recent change, since I was able to submit my previous Analog Clock app in late October last year.

I’ve spent much of the last week trying to solve this problem. I did a bunch of research, but there was no single magic bullet anywhere. I finally cracked it. And here is the solution. I apologize in advance if some steps are missing. I tried to capture every single step I had to take.

STEP 1: Rebuilding iPhoneAll for armv7

Phil Hess has an excellent page that explains this process - http://web.me.com/macpgmr/ObjP/Xcode4/iOS_5_Parsing_Status.html

You don’t actually need to parse anything for this purpose. You can jump directly to Phil’s Step 4 and build iPhoneAll for armv6/armv7 as follows:

./compile-arm.sh iPhoneAll.pas

Then Phil’s Step 5 from the link above (this moves the compiled targets in place):
mv iPhoneAll.o /usr/local/lib/fpc/2.6.0/units/arm-darwin/cocoaint/
mv iPhoneAll.ppu /usr/local/lib/fpc/2.6.0/units/arm-darwin/cocoaint/
mv AnonClassDefinitionsUikit.o /usr/local/lib/fpc/2.6.0/units/arm-darwin/cocoaint/
mv AnonClassDefinitionsUikit.ppu /usr/local/lib/fpc/2.6.0/units/arm-darwin/cocoaint/

STEP 2: Rebuilding the FPC RTL for armv7

We’ll use the following link as a base line - http://wiki.freepascal.org/iPhone/iPod_development#Building_an_ARM_Cross-compiler

We need to modify the steps for iOS5.0 as follows:

Jump into Super User mode:

sudo bash

export IPHONEPLATFORMBASEDIR=/Developer/Platforms/iPhoneOS.platform/Developer

make clean

make FPC=/usr/local/lib/fpc/2.6.0/ppc386 CPU_TARGET=arm CROSSOPT="-FD${IPHONEPLATFORMBASEDIR}/usr/bin -XR${IPHONEPLATFORMBASEDIR}/SDKs/iPhoneOS5.0.sdk/ -ap -Cparmv7 -Cfvfpv3" all

sudo make FPC=`pwd`/compiler/ppcrossarm OPT="-ap" CPU_TARGET=arm CROSSOPT="-FD${IPHONEPLATFORMBASEDIR}/usr/bin -XR${IPHONEPLATFORMBASEDIR}/SDKs/iPhoneOS5.0.sdk/ -ap" install CROSSINSTALL=1

sudo ln -sf ../lib/fpc/2.5.1/ppcrossarm /usr/local/bin/ppcarm

STEP 3. Modify the Run Script for project under Build Phases for your Target in Xcode

Replace the -Cfvfpv2 flag with both of these flags -Cparmv7 -Cfvfpv3. A typical excerpt from the Run Script will now say:

/usr/local/lib/fpc/2.6.0/ppcrossarm -gw -g -godwarfsets -Xg -O1 -Cparmv7 -Cfvfpv3 -MDelphi -B -o$BUILT_PRODUCTS_DIR/$EXECUTABLE_PATH -Fu/usr/local/lib/fpc/2.6.0/units/arm-darwin/fmi -Fu/Developer/Embarcadero/fmi -Fu/Developer/Embarcadero/fmi/coretext -Fu/Developer/Embarcadero/fmi/fpclib -XR$SDKROOT -FD$PLATFORM_DEVELOPER_BIN_DIR "$PROJECT_DIR/../$PROJECT.pas"

Drop armv6 from Architectures under Build Settings for your Project if it’s set.

Good luck!

Who would pay $0.99 for my iOS app?

Thursday, March 29th, 2012

I’ve been hacking away at my EDN iOS app. Here are a few screen shots of what it looks like in development. I have a few things I need to polish and then I will submit it to the AppStore.

Technical details:

* Communicates with the EDN MemberShip Services DataSnap REST Server

* You can log in, view your details, edit your details and post changed details back

* You can get all your registered products and serial numbers

* You can choose to persist username/password or not

* Works on all iOS devices and all device rotations!

Maybe it’s worth more than $0.99? Especially if you get the full source code… ;)

This is what my app looks like when you launch it:

Just need a password

Just need a password...

This is what it looks like when you fail to login:

Access denied!

Access denied!

This is what my user details look like:

My user details

My user details


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

Close