Thursday, February 26, 2015













Buy XE7 and get a free Next Major Release to keep you up to date with latest hotfixes, exclusive content, support and more. Purchase a qualifying RAD Studio, Delphi or C++Builder XE7 product by March 31, 2015 to get the Next Major Release free!

Wednesday, February 25, 2015

D.P.F Delphi iOS Native Components v9.4.5

D.P.F Delphi iOS Native Components

New version:

v9.4.5 - 2015/02/26
  + Added TDPFAVAudioRecorder (Microphone Component)
  + Added TDPFDatePicker.MinuteInterval property
  + Added TDPFImageView.ResizeImage
  * Improved: TDPFQRCodeScanner now uses FMX ScreenOrientation
  - Fixed TDPFAVPlayer.StartPlayList once play

more...
http://sourceforge.net/projects/dpfdelphiios/

Saturday, February 14, 2015

Happy Birthday Delphi!


Delphi 20-year anniversary!

Who remembers this image ?


One of the best moments I was waiting for...!
Just saying " Thank you delphi ! "

Friday, February 13, 2015

Code Monkey in Code is live on YouTube now !

Jim McKeeth made this awesome video (and the source behind it)

 "Welcome to the download page for my Special Musical Number based on Code Monkey by Jonathan Coulton. Thanks to JoCo for licensing his song under Creative Commons CC-NC. My video is licensed underCreative Commons CC-NC-SA. You can freely share the video and build on it, just keep the sharing going, and provide attribution. Same for the code."
Jim McKeeth

See more...
http://delphi.org/CodeMonkey/


 

Thursday, February 12, 2015

D.P.F Delphi iOS Native Components v9.4.1

D.P.F Delphi iOS Native Components

v9.4.1 - 2015/02/12
  + Added TDPFHttp.PutData function
  + Added TDPFUITableView.OnCellClick Event
  + Added TDPFUITableView.OnCellLongClick Event
  + Added EKRecurrenceRule in EventKit
  + Added TDPFSegmentedControl change title font
  + Added TDPFAddressBook add contact to AddressBook
  + Added Visible Property in TTDPFSegmentedControlItem
  - Fixed TDPFUIViewController set RootViewController
  - Fixed GetCarrierInfo crash when Carrier not found!
  - Fixed TDPFNavigationController crash on resize (Thanks Gordon Hamm)
  - Fixed Removing Shadow
  - Fixed TDPFQLPreviewController Hide Toolbar
  * Improved FacebookSlideMenu


Wednesday, February 11, 2015

Adding a contact to iOS AddressBook using your Delphi application

















Now, I want to learn how to add a contact to your iOS Phone AddressBook!
First download my last source code from :
https://sourceforge.net/p/dpfdelphiios/code/
and see AddressBookAdd demo,

I added AddAddressBook procedure to TDPFAddressBook component :

  

function TDPFAddressBook.AddAddressBook( FirstName: string; LatName: string; PhoneNumbers: array of TPhoneNumbers ): Boolean;
var
  Person               : ABRecordRef;
  error                : CFErrorRef;
  addressBook          : ABAddressBookRef;
  phoneNumberMultiValue: ABMutableMultiValueRef;
  venuePhoneNumbers    : NSMutableArray;
  I                    : Integer;
  s                    : string;
begin
  result      := false;
  addressBook := ABAddressBookCreateWithOptions( nil, &error );
  Person      := ABPersonCreate;
  if not Assigned( Person ) then
    exit;

  // FirsName & LastName
  result := ABRecordSetValue( Person, 0, PNSSTR( FirstName ), &error );
  if not result then
    exit;
  result := ABRecordSetValue( Person, 1, PNSSTR( LatName ), &error );
  if not result then
    exit;
  result := ABAddressBookAddRecord( addressBook, Person, &error );
  if not result then
    exit;

  // Phone
  phoneNumberMultiValue := ABMultiValueCreateMutable( kABMultiStringPropertyType );
  for I                 := low( PhoneNumbers ) to high( PhoneNumbers ) do
  begin
    if PhoneNumbers[I].PhoneLabel = '' then
      PhoneNumbers[I].PhoneLabel := kABPersonPhoneMainLabel;
    ABMultiValueAddValueAndLabel( phoneNumberMultiValue, PNSSTR( PhoneNumbers[I].PhoneNumber ), CFSTR( PhoneNumbers[I].PhoneLabel ), 0 );
  end;
  result := ABRecordSetValue( person, 3, phoneNumberMultiValue, nil );
  CFRelease( phoneNumberMultiValue );

  if not result then
    exit;

  // Save to AddressBook
  if ABAddressBookHasUnsavedChanges( addressBook ) then
    result := ABAddressBookSave( addressBook, &error );

  exit;
end;


for using this function, you can call like this:

procedure TFPeoplePicker.DPFAddressBook1RequestAccess( Sender: TObject; const Granted: Boolean );
var
  p: array [0 .. 2] of TPhoneNumbers;
begin
  P[0].PhoneNumber := '+98912xxxxx';
  P[0].PhoneLabel  := 'mobile';

  P[1].PhoneNumber := '+982188xxxxx';
  P[1].PhoneLabel  := 'work';

  P[2].PhoneNumber := '+982188xxxxx';
  P[2].PhoneLabel  := ''; // <-- contact’s primary number

  if Granted then
    DPFAddressBook1.AddAddressBook( 'Babak', 'Yaghoobi', p )
  else
    ShowMessage( 'Go to Setting->Privacy->Contacts and switch on this application' );
end;


Finally, see your phone contact list:



Enjoy Delphi iOS Native Programming !

Saturday, February 7, 2015

Making iOS Setting Bundle in Delphi !

Hi,

For making setting bundle in your Delphi iOS apps, you must be make a xml file named : Root.plist
and write some code like this:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">
<dict>
    <key>PreferenceSpecifiers</key>
    <array>
        <dict>
            <key>Title</key>
            <string>D.P.F iOS Native Components</string>
            <key>Type</key>
            <string>PSGroupSpecifier</string>
            <key>FooterText</key>
            <string>Copyright, 2013-2015 D.P.F.&#xA;All rights reserved.</string>
        </dict>

        <dict>
            <key>DefaultValue</key>
            <string>7.9.5</string>
            <key>Key</key>
            <string>version_preference</string>
            <key>Title</key>
            <string>Version</string>
            <key>Type</key>
            <string>PSTitleValueSpecifier</string>
        </dict>

        <dict>
            <key>DefaultValue</key>
            <string>Babak Yaghoobi</string>
            <key>Key</key>
            <string>developed_preference</string>
            <key>Title</key>
            <string>Developed by</string>
            <key>Type</key>
            <string>PSTitleValueSpecifier</string>
        </dict>

        <dict>
            <key>DefaultValue</key>
            <string>bayaghoobi@gmail.com</string>
            <key>Key</key>
            <string>developed_preference</string>
            <key>Title</key>
            <string>eMail : </string>
            <key>Type</key>
            <string>PSTitleValueSpecifier</string>
        </dict>

        <dict>
            <key>DefaultValue</key>
            <string>Babak Yaghoobi</string>
            <key>Key</key>
            <string>Enabled_preference</string>
            <key>Title</key>
            <string>Enabled</string>
            <key>Type</key>
            <string>PSToggleSwitchSpecifier</string>
        </dict>
    </array>

    <key>StringsTable</key>
    <string>Root</string>
</dict>
</plist>


Now open Deployment windows and add this file in your deploy list, then change remote path :
\Settings.bundle\



Deploy project into Device or Simulator and press home button for closing app,
Go Phone Setting icon and scroll down to bottom, you must be see your app there !





Tuesday, February 3, 2015

News Delphi Week 2015

Delphi Week 2015 is a global online celebration of everything Delphi. Live, online sessions will occur Monday thru Friday, February 9-13, 2015 from 8am to 10am Pacific Time and 2pm to 4pm Pacific Time. 
WRITTEN BY JIM M

See more....