Showing posts with label iPhone. Show all posts
Showing posts with label iPhone. Show all posts

Tuesday, 8 January 2019

Solution to iOS Delphi build failure

Some Delphi users building iOS applications have been thwarted by a…, well let’s be polite and call it a bit of an annoyance, when building their applications. What should just be an informational message about a warning from the ld linker ends up becoming a build breaker. The failure message looks something like this example (taken from RSP-19759, reported in January 2018):

[DCC Error] E2597 ld: warning: unknown dwarf DW_FORM_strp (offset=0xFFFFCEE7) is
too big in FBSDKShareKit.a(FBSDKAppInviteContent.o) ld: warning: unknown dwarf DW_FORM_strp (offset=0xFFFF6E38) is too big
in C:\Dev\lib\ios\facebook\FBSDKShareKit.framework\FBSDKShareKit.a
(FBSDKAppInviteContent.o)

The fact that ld is emitting a warning about something is neither here not there. Or rather it *should* be neither here nor there. Unfortunately when Delphi receives this warning it turns it into a fatal error.

Oh dear… (・_・、)

Delphi 10.3 Rio contains a change to address this issue…. ˚◡˚

Unfortunately, however, Embarcadero forgot to mention it to anyone ¯\_(ツ)_/¯

This post tries to fix that communications oversight by covering the details of the change, which is an important step as you do need to add in a new compiler / linker switch.

The iOS ld linker now supports a new option –bequiet, which stops Delphi being able to wrongly interpret the ld warnings (by silencing them).

To use the new option choose Project | Options…  (Shift+Ctrl+F11) and do one of these two things:

  • select Building | Delphi Compiler | Compiling | Other Options and add --linker-option:-bequiet to Additional options to pass to the compiler, or
  • select Building | Delphi Compiler | Linking and add -bequiet to Options passed to the LD linker

You should now be able to build your project successfully without this little hindrance.

Good luck!

Tuesday, 22 November 2016

Debug logging in FireMonkey – CodeRage XI Lightning Talks

During CodeRage XI I had a couple of Lightning Talks broadcast on a subject I’ve been intending to write up for quite a long time, but haven’t quite managed to achieve: how to emit debug log messages on the various FireMonkey platforms.

I made a 10 minute video for Delphi and one for C++ looking at all the target platforms, Win32/Win64, OS X/macOS, Android and iOS, showing the logging options and then looking at how to view log output.

Unfortunately I got a bit caught up in some work and didn’t publicise this ahead of the conference, so I think not many people were aware of them.

Tuesday, 31 December 2013

Catching up on happenings in the Delphi world

When I’m head-down in a ‘long hours’ contract I tend to miss quite a bit of Delphi-oriented news. Once in a while I look up and I find a whole host of interesting posts around the blog-world and this has been the case over this seasonal break.

I’ve been browsing around seeing what’s new and have collated the following list of stuff I found interesting. Anyone else who hasn’t been keeping up-to-date on news of late might possibly also find some stuff of interest in the list.

Happy New Year!

Tuesday, 12 November 2013

CodeRage 8 video replays are up

For anyone that’s been waiting for the replay videos from CodeRage to go up and has been getting impatient as the suggested 2 week window has come and gone, relief is now available as the replay videos are all there.

You can find them on YouTube on the Embarcadero TechNet page, or on the original CodeRage 8 session page.

Well, ok, maybe as I type one or two are still slowly dribbling onto the Internet and maybe the sessions page hasn’t quite got all the video links on board, but the majority are accessible in one way or another on YouTube at last.

I’ve updated my CodeRage 8 session files post to include the video links to my talks in case anyone wants to check them out. Enjoy!

Thursday, 17 October 2013

My CodeRage session files

At the time of writing my two sessions for CodeRage 8 are being broadcast around the Arpanet.

I’ve got two session this year, both related to Delphi mobile development, and both concerning how to reach out from the island that is the FM Application Framework (aka FMX aka FireMonkey) and gain access to the underlying mobile OS platform APIs.

The first session is Accessing the iOS API and looks at how Delphi-written iOS apps can talk to the CocoaTouch APIs and access additional iOS frameworks. We look at the Objective-C bridge and see how it is used to import iOS APIs, namely classes and protocols (Apple’s term for what we call interfaces), and how you can implement iOS interfaces and inherit from iOS classes. We also briefly look at how to pull in APIs that are not already imported by Delphi’s RTL. As a proof of concept we briefly see a Delphi iOS app that has no FMX code or units in it whatsoever, operating purely through the iOS APIs using the standard CocoaTouch model.



Files from the Accessing the iOS API session can be downloaded from here.

The second session is Accessing the Android API and looks at how Delphi-written Android apps can talk to the Android SDK classes. We look at the Java bridge and see how it is used to import Android APIs. We’ll also look at how to pull in APIs that are not already imported by Delphi’s RTL. We also look at how to add a splash screen to an Android app to cover up the startup time on anything other than the fastest devices, how to add Android menus to an app and how to launch external activities and get results back from them.



Files from the Accessing the Android API session can be downloaded from here. Take note that since several of the samples involve various required preliminary steps in order to function, as they step outside the comfort zone of Delphi XE5 RTM’s Android support, you should check the ReadMe.txt files supplied in the project directories of those projects.

[Update]

I plan to write up some of the subjects covered by these demos in further posts or articles as time and work schedules permit. However in the mean time I’ll respond to comments by expanding this post as necessary.

It appears that when the small Java source files get compiled, the Android dx tool expects them to be compiled by the JDK 1.6.x compiler as opposed to the JDK 1.7.x compiler. If you have JDK 1.7.x installed, you hit a problem with dx reporting:

bad class file magic (cafebabe) or version (0033.0000)

However, to avoid forcing a reinstall of JDK 1.6 you might like to modify my build.bat batch files and add in extra command line switches to the javac.exe command-lines. You need to insert this after the javac.exe command to force Java 1.6 byte code output, which is digestible by the Android dx command:

-source 1.6 -target 1.6

[Update 2]

Current write-ups:
  • Splash screens are written up here for Delphi XE5 and Delphi XE6.
  • Launching activities and getting results back is written up here for Delphi XE5 and Delphi XE6.

Thursday, 19 September 2013

Delphi supports iOS 7

Good to see prompt Delphi support for iOS 7, as reported by Embo’s Sarina DuPont. It’s out and available for download from the registered users site a mere 1 day after iOS 7 was released.

Documentation for the new support is on the docwiki.

I can’t help noticing, though, that it appears to be an XE5-only update. This is not good news for those still beavering away with iOS code in XE4.

I’m sure I remember hearing talk of support for iOS 7 shortly after iOS 7’s release for XE4 iOS programmers.

Let’s hope there’s an XE4 update to follow real soon, otherwise this will throw another bone of contention into the mix, and the blogosphere will once again be alight…..

Thursday, 30 May 2013

Delphi for iOS - some notes

The typical current requirements of the customers I work with, so they tell me, are to stick with Windows + VCL thanks to the long-term projects they have ongoing. Because of this I’ve not really spent too much time getting to know FireMonkey in excruciating detail since it was introduced. However, given that the quintessence of the XE4 release has been iOS support and this typically revolves around using FireMonkey, I figured maybe it was about time to roll the sleeves up and get stuck in.

This post is a summary run-though of the things I bumped into, how I got on, what I figured out, what problems I encountered and how I achieved a few things whilst checking out the latest platform-targeting in the Delphi product line.

Oxygene 6 now includes Oxygene for Cocoa

Ah, it’s been released… The May 2013 release of Oxygene, released on 27th May 2013, brings us Oxygene 6.0, and Oxygene 6.0 brings us the official release of Oxygene for Cocoa.

The Oxygene language now gives ways of coding for all the currently interesting platforms using the three available editions of Oxygene:

  • Oxygene for .NET (formerly also known as Delphi Prism) – targets the .NET platform, allowing you to build Windows applications, Windows phone applications, Silverlight applications and so on, using the relevant .NET frameworks. Also targets the Mono platform, allowing applications to go to the many places where Mono goes, such as Mac and Linux and also Android and iPhone/iPad using Xamarin.Android (aka Mono for Android) and Xamarin.iOS (aka MonoTouch) using those frameworks.
  • Oxygene for Java – targets the Java runtime, allowing you to build Java apps, Java servlets, Java applets and also, perhaps most interestingly, Android apps. Java apps will use your chosen Java frameworks and Android apps use the Android SDK framework.
  • Oxygene for Cocoa – targets iOS and OS X allowing native ARM applications to be built for iPhone and iPad as well as 64-bit native OS X applications. Applications are built against the native OS X Cocoa and iOS CocoaTouch frameworks.

Oxygene is hosted in Visual Studio 2012 (support for Visual Studio 2010 has now been phased out in Oxygene 6.0). If you don;t have a copy of Visual Studio 2012 the Oxygene installer can set up the Visual Studio 2012 shell first.

For existing users of Oxygene for .NET and/or Oxygene for Java there are some new features added to Oxygene 6.0, including a spate of new conditional defines to help distinguish which compiler built your code or which platform you are targeting:

Oxygene 6.0 edition Edition define Platform define GC/ARC define
.NET ECHOES DOTNET GC
Java COOPER JAVA GC
Cocoa NOUGAT COCOA ARC

However the main thrust of the release is Oxygene for Cocoa, which works in conjunction (if you want) with Apple’s UI designer to support visual UI design via nib (.xib) files or storyboard files. It also understands and fully supports multi-part method names so that it fits in directly with the Objective-C naming system and can represent and refer to any existing methods. It support the iOS Simulator, supports debugging there and on-device and offers all the options needed to sign and provision your apps. It supports ARC (automatic reference counting), understands bridging and uses an LLVM back-end to generate good ARM and 64-bit Intel code.

It ships with all the standard frameworks imported and has a tool that allows you to import any additional libraries you need to work with. Because Oxygene always uses the frameworks that natively exist on the target platforms, there is not an awful lot to learn specific to Oxygene when building Mac or iOS apps. Anything you learn on the Internet about how to build aspects of Mac/iOS apps applies directly – it’s just a case of expressing the various local API calls in the Oxygene syntax, which is a very familiar Object Pascal based syntax.

During pre-release development Oxygene for Cocoa was called Project “Nougat” and I worked with it a lot to keep tabs on how it progressed. I’ve built a whole bundle of test apps to keep on top of (mostly) iOS application development techniques by simply following various online Objective-C tutorials, and just entering the code in Pascal instead of in Objective-C.

I’m delighted Oxygene for Cocoa is now released as I’ve been productive with the tool for quite a long time now. I’ve wanted to make blog posts about how I do thing with it, but given it’s just a syntax shift there hasn’t really been much of a need for it. I guess maybe I’ll do one at some point to show the basics of building up an iOS app in the Visual Studio IDE and getting it launching in iOS Simulator, but after that it’s just writing code in the same way any other iOS developer does; just in Pascal.

On June 17th I’ll be demonstrating the product with a talk at a Developers Group meeting in Maidenhead, UK.

You can find more information about Oxygene for Cocoa at these links:

Buying Oxygene is reasonably pocket-friendly. If you’re new to it then $699 gets you all three versions. Otherwise there is a $499 renewal price for existing Oxygene for Java or Prism customers, a $599 cross-grade price for any users of Embarcadero Delphi or of older Embarcadero Prism versions (XE2 and below) and also a $99 academic price.

If you want to see how you get on with Oxygene 6.0 without committing you can always pull down a trial version first.

Monday, 22 April 2013

Delphi for iOS (aka Delphi XE4 aka RAD Studio XE4) has appeared

We’ve heard lots of noises about Embo’s pending Delphi support for iOS over the last 6 months or more and now the wait is over.

RAD Studio XE4 Installer

The iOS support has arrived, but not as the largely expected add-on to XE3, but instead as a new version: XE4 (available with or without iOS support). Delphi XE4 has arrived (along with C++Builder XE4 and RAD Studio XE4) and now targets:

  • 32-bit Windows
  • 64-bit Windows
  • 32-bit OS X
  • iOS Simulator (Intel)
  • iOS (ARM)

There is a flurry of activity about this new release over the blogosphere and here’s a summary of the key points regarding information about the product and regarding the product itself.

Information

Product details

The main thrust of this release is the Delphi support for iOS, specifically two new cross-compilers that support targeting the iOS simulator (Intel) and native iOS (ARM) called dccios32.exe and dcciosarm.exe.

As you might expect there have been a raft of changes in FireMonkey to support this wider platform range and improve the existing platform support. Indeed FireMonkey has now changed from being known as FM2 to now being FM3. The online help has much information on the changes to FireMonkey.

The IDE has new mobile form designers (no longer floatable although see François’ post here if you really want a floating designer for VCL development) and new target platforms to get your app on the simulator or iOS device. Of course FireDAC is in the box too.

InterBase ToGo is now supplied as an option for an embedded database in your application, including iOS applications. Note that InterBase ToGo requires a license to be bought, whereas IBLite does not (and also does not support encryption, more than 1 core, more than 1 connection, etc.). More info on InterBase ToGo is available in this quick-start guide.

iOS support has been added for SQLite, IBExpress and the MIDAS client components (notably TClientDataSet).

The iOS compilers introduce the Next Generation Delphi language, which some of you will have seen hints of in the Delphi XE3 source code via the NEXTGEN conditional compilation symbol that is checked for in many places. This Next Generation Delphi support is currently only available in the iOS compilers, though it’s a safe bet we’ll also see it in the Android compiler, whenever that appears.

The Next Generation Delphi compiler takes the opportunity to off-load some aspects of the Delphi language that are a little archaic and at the same time bring in some new helpful features.

Things that have gone/changed include:

  • Some of the many string types have gone (AnsiString, UTF8String, RawByteString, WideString, AnsiChar, PAnsiChar, PWideChar, OpenString, ShortString) leaving just the basic type string , an alias for UnicodeString.
  • Pointer support is gone. For interfacing with external library APIs there is a new TMarshaller record, which works with the TPtrWrapper record.
  • Strings are 0-indexed instead of 1-indexed by default. It is recommended you employ TStringHelper (introduced in XE3) to work with strings as it knows about the string indexing on the different platforms.
  • Strings are to be considered immutable. Currently you can change string contents but will get a warning for your trouble. This is to encourage you to change the code to use a TStringBuilder to build a new string. Future versions may change the warning to an error.
  • Inline assembler support is gone.
  • You are advised to rewrite code that uses with as this is likely to be removed in future versions. I can see the benefit in enforcing this, as I have bumped into so many scope errors caused by over-zealous with usage over the years…

New things include:

  • Automatic Reference Counting (ARC) for objects.
  • Weak references
  • Atomic intrinsic functions:
  • New predefined conditional symbols (* the content of this table is subject to change based on proper testing - the corresponding documentation page is incomplete/incorrect, so some educated guesswork has gone on thus far):
    Symbol:

    Defined:

    For compilers:
    AUTOREFCOUNT if ARC is available dcciosarm, dccios32
    CPUARM if the CPU is ARM-based dcciosarm
    EXTERNAL_LINKER for compilers with an external linker dcciosarm, dccios32
    IOS target platform is iOS dcciosarm, dccios32
    NEXTGEN for Next Generation Delphi compiler dcciosarm, dccios32
    UNDERSCOREIMPORTNAME for compilers that add leading underscores when importing libs dcc32, dccosx, dccios32
    WEAKREF for compilers that can use weak references dcciosarm, dccios32
    WEAKINSTREF when weak references are defined for instances dcciosarm, dccios32
    WEAKINTFREF when weak references are defined for interfaces dcciosarm, dccios32
  • New compiler directives:
    • {$ZEROBASEDSTRINGS ON/OFF} controls whether 0-based or 1-based string indexing is active. You can, for example, use this to force 1-based indexing in mobile code that you haven’t yet updated
    • {$EXTENDEDCOMPATIBILITY ON/OFF} allows use of Extended data type on platforms that do not normally support it (Win64 and iOS). The given support offers the expected 10 bytes storage but doesn’t offer the higher floating-point support that Win32 Extended gives.
  • New compiler attributes:
    • [volatile] to indicate the field may be changed by other threads (it’s a hint to the code optimiser).
    • [weak] to mark a weak reference.
    • [Ref] to ensure constant parameters are passed by reference rather than by value.

Given these changes there is a page that talks about how to migrate code from the desktop to iOS.

Taking all the above onboard, it looks currently like Embo offer a common component framework (also, slightly confusingly, referred to as a platform) to program against for different target platforms (Win32, Win64, OS X, iOS) in FireMonkey (aka FMX aka FM3). As for your Delphi code, however, it would currently appear that desktop code and mobile code will look a bit different, thanks to the string changes (1-indexing to 0-indexing and the push towards immutability) and of course the specific form factors of the UI on the respective platforms.

So, you build a mobile UI and you build a desktop UI. With the desktop UI you take great care to ensure the app looks like a Windows app when compiled for and running on Windows (menu layout, button order and placement on dialogs), and looks like a Mac app when compiled for and running on OS X.

Then when you come to build the code base, you write it once for the desktop using all the standard Delphi-desktop paradigms of creating objects and ensuring they are destroyed with try/finally/free/end. On the mobile side you skip all that and let objects be cleaned up by ARC, and ensure weak references are specified where appropriate.

I’m sure the desktop compiler will catch up with these changes at some point, but in the interim there is a requirement for quite a bit of conditional compilation, or making use of no-op calls in the mobile code. And if/when the desktop compiler catches up, that will potentially force a big hit in massaging desktop code into the new realm of Next Generation Delphi.

It’s all a bit up in the air as to how things will pan out, but to my eyes currently, the only common thing is the FireMonkey framework. Other than that, the coding and design looks to require dedication per platform targeted. Which is no bad thing. In my opinion, when targeting a given platform you should put some effort into making sure the application works gracefully and looks in keeping with its peers.

With that mindset in place, the iOS support looks pretty neat and the changes to the language make Delphi behave a little more like many of the other popular languages in existence. I’ve certainly got no issues with kicking out with and dropping to a single string type. Let’s just be careful to not play the “write once run anywhere” card too frequently, eh?

[Updates]

I added a link to François Piette’s article about re-enabling the floating form designer (only advisable if you develop solely for VCL).

I added a link to the QC fix list for XE4.

Friday, 8 June 2012

FireMonkey iPhone/iPad links and info

This week’s instalment of the UK-based Developer Direct webinar series is called iPhone/iPad Development with RAD Studio XE2. The following is a set of links and general information picked up during that broadcast and also during a US webinar by Anders Ohlsson (broadcast during the week and presumably to be available as an on-demand webinar after the fact) entitled Create Mobile iOS Apps using Delphi XE2 with FireMonkey.

Links:

Info:

  • iPhone and iPad run an operating system called iOS, the current version of which (at the time of writing) is 5.1.1.
  • RAD Studio runs on Windows. iOS development requires use of a Mac and also Apple’s Xcode development suite (this gives you the iPhone/iPad simulator and various tools to sign and package the app correctly).
  • Additionally, the current toolset requires an intermediate step involving the FreePascal Compiler (FPC) inside Xcode to build (and debug) the iOS app. This is a temporary initial situation while waiting for Delphi to be able to target ARM processors.
  • Caution: FPC is case-sensitive in terms of the uses clause!
  • To target latest iOS and have all the bits you need, you need:
    • a Mac with OS X 10.7.x (known as Lion) running.
    • Xcode 4.2 (a slightly older version of Xcode that installs appropriate required command-line tools) installed on the Mac. You can get this from Apple’s Developer Downloads page (requires an Apple ID)
    • Install on the Mac the packages from FireMonkey-iOS.dmg (installed by RAD Studio / Delphi on your Windows machine into a FireMonkey-iOS folder) to get:
      • FreePascal Compiler (FPC), required to build your iOS app from within Xcode
      • FireMonkey iOS Libraries – required files that FPC needs to build the iOS app on the Mac
    • Xcode 4.3 – most recent update of Xcode, which supports the more recent iOS releases (5.x). Also worth noting that 4.3.x does not install some required command-line tools by default. One benefit of having installed 4.2 first is that you will have these tools installed. That said, you can download them in isolation from Apple’s Developer Downloads page (requires an Apple ID)
    • Modify one of the iOS FMX support files, as per Anders’ post
    • Install Anders’ iOS components into RAD Studio
  • To get Xcode you need to join the Apple Developer Program (free). To deploy apps to a real device (iPad or iPhone) as opposed to the simulator, you need to join Apple’s iOS Developer Program ($99 per year to Apple) and create a Development Provisioning Profile. To deploy an app to the Apple App Store you need to create a Distribution Provisioning Profile. Plenty of information can be found in the RAD Studio documentation.
  • When writing iOS code in Delphi XE2 these directives instruct the Free Pascal Compiler to support Delphi and Objective-C language features:
      {$ifdef FPC}
        {$mode delphi}
        {$modeswitch objectivec1}
      {$endif}
  • When Delphi targets ARM, the FreePascal dependency will be removed, as will the need to use the Xcode IDE. However some Xcode command-line tools will still be required on the Mac for signing, packaging etc. since Apple does not license these tools to third party tool vendors.
  • iOS development from RAD Studio XE2 with FireMonkey is currently Delphi-only. C++ iOS support is pending, as per the recently published C++ roadmap. As soon as the C++ compiler targets ARM, then C++ will also directly generate iOS applications.
  • When Delphi and C++ target ARM7, FireMonkey applications will support both iOS and Android directly from the IDE via new Target Platform options.
  • Simplistic way of ensuring a screen full of controls laid out for an iPhone screen will fill up an iPad screen is to place all the controls on a TScaledLayout, perhaps with Align set to alFit as opposed to alClient.
  • iOS apps should not proactively exit – they should only exit in response to the Home button. If you force an exit your app will likely not be approved by the Apple app review board.
  • After creating an iOS app in Delphi XE2 you must also export it for Xcode consumption using dpr2xcode. This exported Xcode project needs to be available to Xcode on the Mac, so some shared drive is a sensible location to save the project to in the first place. A common way of working is to have Windows (and the RAD Studio/Delphi IDE) running as a guest OS in some VM software on the Mac (where OS X is the host OS), and storing the project in a directory that is shared between the host OS and guest OS. You could use commercial VM software such as VMWare Fusion or Parallels or even the Open Source VirtualBox.

Thursday, 17 May 2012

DataSnap information links/info

Last Friday’s instalment in the Developer Direct webinar series was entitled Multi-tier, Scalable Development with DataSnap. During the session I collated the links and references together so i could post them here for reference (I’ll doubtless need some of them at some point).

Random information picked up during the webinar:

  • in Delphi 2006, MIDAS (Multitier Distributed Application Services Suite) was renamed to DataSnap
  • Delphi 2007 re-architected DataSnap to be entirely written in Delphi and had all previous COM-dependencies removed. It was extended to support COM/DCOM, TCP/IP, HTTP & HTTPS
  • Delphi 2007 introduced a DBX (dbExpress) database driver to access data from remote DataSnap servers
  • DataSnap proxy classes can be regenerated (e.g. if the server has been extended to add functionality) using the context menu on the TSQLConnection component
  • Delphi XE DataSnap demos on Code Central can be made to work in Delphi XE2 by adding IndyPeerImpl into the project file uses clause
  • DataSnap servers are written using VCL so can be Win32 or Win64
  • DataSnap clients can be written on many platforms thanks to the wide range of mobile DataSnap connectors:
    • Delphi (VCL or FMX)
    • C++ (VCL or FMX)
    • C#
    • Delphi Prism
    • FreePascal (Delphi XE2 Update 4)
    • Objective-C
    • JavaScript
    • PHP
    • Java (inc. Android & Blackberry)
  • DataSnap server development requires the Enterprise or Architect version of Delphi, C++Builder or RAD Studio.

Most of these notes I scrawled down as they came up so there is every chance the odd detail may be errant….

Friday, 4 May 2012

FireMonkey information links/info

I checked out today’s webinar on FireMonkey and collated a bunch of links and facts that came up during the presentation. Anyone looking at FireMonkey and wanting to get some background and foundation on the subject should check these out:

Random information picked up during the webinar:

  • Delphi’s library delay loading is available on Windows but currently not on Mac.
  • C++Builder can readily consume a Delphi unit. Add the Delphi unit to the C++Builder project, then right-click on the file in the project manager and choose Make to produce a suitable C++ .hpp header file for inclusion elsewhere in the project.
  • Unlike the old Kylix project, Delphi & C++Builder in RAD Studio XE2 are both solely Windows applications. However Mac apps can be run and debugged across a network link using PAServer, which ships in the box. PAServer works on a specific port (64211 by default) so should be easy to configure in the context of a firewall.
  • Android support being looked at. When it is ready, your FireMonkey code will pay off and be usable on the Android platform.
  • Older toolbox code with assembly code needs work before it can be used with FireMonkey for cross-platform. Realistically it would be best re-written in high level Pascal code. Alternatively you would need to conditionalise and re-write for the various architectures (Mac, Windows 64-bit, Windows 32-bit), which presumably would involve a lot more work.
  • In FireMonkey control parents do not constrain the view of their children. A button on one side of a form can be a child of a control on the other side of the form, no intersection at all is required.
  • Frames. Create a form with all required controls, which in VCL might be done as a frame. At run-time add a layout on the form and set the parent of the would-be frame form to be the layout. The Biz Flow demo shows this in use.
  • David I is a big fan of the TMesh FireMonkey component.

Thursday, 3 May 2012

Embarcadero Developer Webinar series

I'm not sure why I didn't notice this series of free webinars starting, but i found out eventually, so that’s the main thing.
Embarcadero have started a weekly series of 2 hour webinars on developing using their current RAD Studio toolset, RAD Studio XE2, primarily targeting a European audience, based on the broadcast times.
You can see the list of webinars and their times and also register to take part using their sign-up link. The list of webinars is also shown in the table below.
Episode Date Topic
1 27 April 2012 Convince Your Boss To Upgrade You To RAD Studio XE2
2 04 May 2012 FireMonkey : From Basics into Practice
3 11 May 2012 Multi-tier, Scalable Development with DataSnap
4 18 May 2012 Delphi Language Focus (Object development, RTTI, 64 Bit)
5 25 May 2012 From Data to Business Information with RAD Studio XE2
6 01 June 2012 Mac Development for Windows Developers
7 08 June 2012 iPhone/iPad Development with RAD Studio XE2
8 15 June 2012 RAD Cloud
9 22 June 2012 Be Agile Today!
10 29 June 2012 FireMonkey in Action...3D and Beyond! ….Plus! Season One Summary

Thursday, 9 February 2012

Updated MonoTouch articles available

Last year I made available an intro article and an in-depth tutorial on using MonoTouch, which was at version 3 at the time, and sold by Novell.

Since then lots has changed. MonoTouch is now sold by Xamarin and is at version 5. Also, Apple’s Xcode kit, which is used to design MonoTouch UIs has bounced from version 3.x to version 4.2 with huge changes therein.

Because of all this, those articles have been horribly out of date for some time.

However I’ve now updated them both. Use these links to access my updated MonoTouch introductory article and MonoTouch extensive tutorial, the latter of which covers navigation controllers, SQLite, location-detection, some sensors, web services, splash screens and more.

Wednesday, 11 January 2012

Android Market app built in Oxygene for Java

In Autumn 2011 I was approached by Nail Soup Ltd. about an Android development opportunity. Nail Soup had a client, a charitable organisation called Amber Foundation, who wanted some mobile applications built. Primarily they wanted to offer a free iPhone and Android app that would allow people to search for various types of resources to help homeless people in the UK. This was to be called the Amber Homeless Helper and was set to be released shortly before Christmas 2011.

AmberApp_Splash

The idea was to have a web-resident database sat behind a web service that could be queried with various different search criteria to get resources around a specified location. Nail Soup were happily building the web service, a web front end and also the iPhone app, and they asked me to build the equivalent Android application. Since at the time it was very close to the release of Oxygene for Java I chose that as the development tool for the job.

The app was completed and published for the target release date of 19th December 2011 and the iPhone and Android versions are in the Apple App Store and the Android Market respectively, though they are only visible to people in the UK since they are providing UK-specific resources.

Market_1  Market_1b  Market_2

Amber Homeless Helper is the first published app built with Oxygene for Java and was fun to do. It’s not the most complex application, primarily being a search tool with some additional information and the ability to contact Amber and donate to the charity, as well as look at previous archived search results but involved a number of technically interesting aspects of Android development. Additionally it acted as a good test of the initial 1.0 release of Oxygene for Java finding a couple of rough edges that were quickly addressed by the developers at RemObjects.

This post is intended to give an overview of what areas of Android programming were involved in getting the Amber Homeless Helper to its finished state, operating as the design dictated.

Thursday, 29 September 2011

Delphi and OS X

There are more posts and articles coming out illustrating how to work with cross-platform native aspects (OS X and iOS).

Accessing special folders both on Windows and on OS X are looked at by Malcolm Groves in ‘Cross-platform special folders in FireMonkey

Looking at how to convert from an NSString to a Delphi String is examined by Chris Rolliston in ‘Converting from a Cocoa string to a Delphi string.’ Chris is also sharing some general Mac tips for Delphi programmers in ‘A few Mac tips.’

Rudy Velthuis has looked into how to build an OS X application in Delphi without FireMonkey. Details of his progress are in this thread on the Embarcadero Discussion Forums.

There are more articles out there and more will be forthcoming. I’ll post more links as I find interesting write-ups.

Delphi Roadmap

Whilst Delphi and RAD Studio users await the next release of the official roadmap, JT (aka John-Ray Thomas) has posted a list of technology areas where work is actively on-going in the Embarcadero labs.

  • Frequent and regular FireMonkey updates
  • A Next Generation Delphi Compiler with multiple hardware/OS targets
  • Next Generation RAD C++ Compiler with multiple hardware/OS targets
  • 64bit RAD C++
  • Delphi and C++ iOS support
  • Expanded Mobile UI and Device support like Location, Camera, Accelerometers etc.
  • Delphi and C++ ARM Support
  • Extended iOS Support
  • Android Support
  • Win8/Metro Support - Intel and ARM

Saturday, 3 September 2011

Oxygene 5

RemObjects Oxygene product line has now reached version 5 and is now written in itself to ensure continued quality as the product develops further.

Oxygene is a Delphi-like modern Object Pascal language, designed to work well with managed systems such as .NET, Mono and the Java runtime, and not worry too much about out-dated constructs that do not sit well with them. The language supports many up-to-date constructs and concepts, such as sequences, class contracts, nullable types, asynchronous methods, parallelised loops, future types and more besides.

Friday, 2 September 2011

Delphi XE2 and RAD Studio XE2 have arrived

There’s been quite a bit of noise about it of late, and if you have any interest in Delphi you will almost certainly have heard that the new version has come along and has a lot to offer. RAD Studio XE2 is the product that includes Delphi, C++Builder, Delphi Prism (Oxygene for .NET) and RadPHP, Targeting 32-bit and 64-bit Windows and also targeting Apple’s Mac OS X and iOS (i.e. iPhone/iPad/iPod Touch) using the new cross-platform FireMonkey library.
I haven’t yet had much of a chance to explore the new additions to this product so I thought I’d collate a bunch of blog posts and articles/resources on the new release that cover a lot of the major new aspects and so help you know what’s been cooking in the Embarcadero labs over the last year and more.

Wednesday, 27 July 2011

MonoTouch and Mono for Android are back

This post is a little tardy in relation to the news it brings. But in case you missed it, Xamarin have now taken over the MonoTouch and Mono for Android products from Novell/Attachmate and have them available from their site store – so this changes the questionable status over the products that the Attachmate acquisition of Novell brought about.
I guess I’ll have to update my MonoTouch intro tutorial and in-depth tutorial and my Mono for Android intro tutorial, to correct all the links etc.
But it’s great to see Mono development available again for the mobile platforms.
[Edit]
I did indeed update the MonoTouch articles and also update the Mono for Android article.