Jump to content

Search the Community

Showing results for tags 'macos'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management


  • Community Calendar

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Found 15 results

  1. Nicolò Blunda

    Get copyright info from code in macOS

    Hello. With this code (working on macOS) I get application version info: VersionInfoString:= (TNSString.Wrap(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle, kCFBundleVersionKey))).UTF8String; I want to retreive the copyright info too. In info.plist the copyright string is the NSHumanReadableCopyright key value. It is possible to adapt code above to get it?
  2. Devart rolled out the new Delphi Data Access Components for just released RAD Studio 11 Alexandria with support for Firebird 4 and Apple M1 processors. Devart, a recognized vendor of world-class data connectivity solutions for various data connection technologies and frameworks, presented new versions of Delphi Data Access Components to keep assisting software engineers in developing fast native applications. The key feature of the recently updated products is support for the newly released RAD Studio 11 Alexandria. The release also includes such important enhancements: All Devart Delphi Data Access Components now support Apple M1 processors. Devart became the first vendor of Delphi components with Firebird 4 support. UniDAC now includes new data providers for HubSpot and BigQuery that allow users to connect to these data sources from Delphi or C ++ Builder applications. UniDAC supports the latest version of NexusDB 4.50.27. LiteDAC and UniDAC support a new option - IntegerAsLargeInt, which maps SQLite INTEGER columns to fields of type ftLargeInt. In addition, a new demo project for FastReport FMX is available in all DAC products. To learn more about the recent release, visit: https://blog.devart.com/delphi-data-access-components-for-rad-studio-alexandria.html Delphi Data Access Components are the libraries of components for Delphi developers that provide direct access to multiple databases, and allow developing multi-platform applications in Embarcadero RAD Studio, Delphi, C++Builder, Lazarus, and Free Pascal on Windows, Linux, macOS, iOS, and Android, for both 32-bit and 64-bit platforms. About Devart Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration, and backup solutions. The company also implements Web and Mobile development projects. For additional information about Devart, visit https://www.devart.com/.
  3. Running a Delphi 10.4.1 (latest patch) FMX 64bit application on: Catalina : runs fine. High Sierra: on startup an EObjectiveC raises "ObjectiveC-class UNUserNotificationCenter not found" Does anyone have any idea where to look? Here the call stack: :000000010001C000 @DbgExcNotify :000000010001C03E System::NotifyReRaise(System::TObject*, void*) :000000010001C0DA System::_RaiseAtExcept(System::TObject*, void*) :000000010001C1F5 System::_RaiseExcept(System::TObject*) :00000001007117F5 Macapi::Objectivec::TOCGenericImport__2<System::DelphiInterface<Macapi::Usernotifications::UNUserNotificationCenterClass>, System::DelphiInterface<Macapi::Usernotifications::UNUserNotificationCenter> >::GetOCClass() :0000000100713D88 System::Mac::Notification::UserNotificationCenter() :0000000100712472 System::Mac::Notification::TNotificationCenterCocoa::TNotificationCenterCocoa() :0000000100715087 System::Mac::Notification::TNotificationCenterCocoa::GetNotificationCenter() :0000000100711B6E System::Mac::Notification::TPlatformNotificationCenter::GetInstance() :00000001007173F8 System::Notification::TBaseNotificationCenter::InternalGetInstance() :0000000100716AEC System::Notification::TCustomNotificationCenter::TCustomNotificationCenter(System::Classes::TComponent*) :0000000100111B7B System::Classes::TReader::ReadComponent(System::Classes::TComponent*)::CreateComponent(void*) :00000001000DE01D System::Classes::TReader::ReadComponent(System::Classes::TComponent*) :0000000100112008 System::Classes::TReader::ReadDataInner(System::Classes::TComponent*) :0000000100111EEF System::Classes::TReader::ReadData(System::Classes::TComponent*) :00000001000E8ACF System::Classes::TComponent::ReadState(System::Classes::TReader*) :00000001000DEC07 System::Classes::TReader::ReadRootComponent(System::Classes::TComponent*) :00000001000D8F8F System::Classes::TStream::ReadComponent(System::Classes::TComponent*) :0000000100104900 System::Classes::InternalReadComponentRes(System::UnicodeString, NativeUInt, System::Classes::TComponent*&) :000000010010C237 System::Classes::InitInheritedComponent(System::Classes::TComponent*, System::TMetaClass*)::InitComponent(void*, System::TMetaClass*) :000000010010C2DD System::Classes::InitInheritedComponent(System::Classes::TComponent*, System::TMetaClass*) :000000010058E52D Fmx::Forms::TCommonCustomForm::TCommonCustomForm(System::Classes::TComponent*) :00000001005963E7 Fmx::Forms::TCustomForm::TCustomForm(System::Classes::TComponent*) :00000001005898B8 Fmx::Forms::TApplication::CreateForm(System::Classes::TComponentClass, void*) :0000000100589799 Fmx::Forms::TApplication::RealCreateForms() :0000000100522D3E Fmx::Platform::Mac::TPlatformCocoa::Run() :000000010058A195 Fmx::Forms::TApplication::Run() main(1,0x00007ffeefbffa38,0x00007ffeefbffa48,0x00007ffeefbffaf0) :00007FFF78D07015 start :00007FFF78D07015 start
  4. Firebird Embedded in a sandboxed MacOS App Friday, January 8, 2021 For those who might not be aware, Firebird on MacOS is now relocatable, in that you don't necessarily have to install it as a Framework, this also means that you can create an embedded version out of the current installer. And the firebird.conf file would then typically be amended for the following Providers = Engine12 ServerMode = Classic For the last few weeks Alex and I (along with a Firebird user) have been working on getting Firebird embedded to work properly in a sandboxed app that can then be deployed on the App Store... To do this we had to solve issues with temp files, the use of inter process communications by the Firebird lock manager and the location of the Firebird log file. Note: adding LSEnvironment to the plist file defining new locations for FIREBIRD_TEMP and FIREBIRD_LOCK does not work. <key>LSEnvironment</key> <dict> <key>ENV_VAR</key> <string>value</string> </dict> So the first issue to be addressed was the following macosx Wed Dec 2 15:33:57 2020 ConfigStorage: Cannot initialize the shared memory region Can not access lock files directory /tmp/firebird.tmp.YDzrhQ It seems thats sandboxed Apps cannot to write into /tmp at all, they have to use their own /tmp-folder. We can detect whether we are running in a sandboxed environment using the following calls to the Mac security subsystem task = SecTaskCreateFromSelf(nil), value = SecTaskCopyValueForEntitlement(task, "com.apple.security.app-sandbox" as CFString, nil), Now if we now know if we are sandboxed we can use NSTemporaryDirectory() for the location of the relevant Firebird temporary files. Having fixed that issue, it was time to move onto the lock manager. [FireDAC][Phys][FB]lock manager error.) macosx Thu Dec 17 17:37:00 2020 event_init() operating system directive semctl failed Operation not permitted According to the Apple sandbox guide restricting IPC (Inter Process Communication) is also part of MacOS sandbox implementation. After some serious head scratching we tried the following test #include <stdio.h> #include <pthread.h> #define ER(x) { int tmpState = (x); if (tmpState) { printf("Failed %s error %d\n", #x, tmpState); } } int main() { pthread_mutex_t mutex; pthread_mutexattr_t mutexattr; ER(pthread_mutexattr_init(&mutexattr)); ER(pthread_mutexattr_setpshared(&mutexattr, PTHREAD_PROCESS_SHARED)); ER(pthread_mutex_init(&mutex, &mutexattr)); ER(pthread_mutex_lock(&mutex)); ER(pthread_mutex_unlock(&mutex)); ER(pthread_mutex_destroy(&mutex)); c++ test.cpp -pthread In case of failure it will print error messages, on success we should get nothing. We got nothing. For many years Firebird worked with system V IPC on MacOS which is different to many other *nixes where mutexes and conditional variables in shared memory were used instead. The use of system V IPC was caused by a lack of for shared mutexes on MacOS when Firebird was originally ported to it. Currently (as was proved by test above) MacOS now supports such mutexes. Based on this it we decided to stop using system V IPC in Firebird and a perform a cleanup of the lock manager code as part of the effort to provide sandbox support. As a side effect Firebird should now run faster using shared mutexes. At the same time as we worked on the lock manager issue we also had an issue with the firebird log file, we were not allowed to write to its normal default location by the sandbox. Because we now know we are running in a sandbox we can relocate the placement of the log file within utils.cpp Supposedly using something like ~/Library/Application Support/Firebird/ should work case Firebird::IConfigManager::DIR_LOG: s = "~/Library/Application Support/Firebird/"; s += name; return s; Unfortunately it seems this workaround was removed relatively recently forcing us to resort to putting the log file within the App itself ~/LibraryContainers/Company.App/Data/Library/Application Support/Company/ Changing the location of the log file is relatively easy but although this allowed the App to run and resolved the issue, it was not an ideal solution since the location of the log file is now hard coded within Firebird and is App dependent and this would mean that every time somebody wanted an embedded Firebird for a sandboxed App they would have to change the path to the log file and recompile Firebird. The solution was to do away with the Firebird log file and use the OSLog framework instead, and use this to capture any messages from the database engine, so if you are running embedded Firebird in a sandboxed App you can access the Firebird log messages using the Console or a terminal command like the following log show --predicate 'eventMessage contains "macpro.home"' --start '2021-01-06 14:00:00' --end '2021-01-06 14:30:00' --info where macpro.home is the name of the computer. You don't need the start and end, but it does help reduce the number of messages. There is an added plus from using this. The OSLog framework is also supported on IOS 10+ and now that the App Store will accept dynamic libraries, this means that we should be able to compile an embedded version of Firebird for IOS that can also run sandboxed Apps. If anyone is interested in sponsoring this work please contact me. This work was sponsored by kiC Gesellschaft für Softwareentwicklung mbH. Posted by Paul Beach at 6:41 AM source: https://paulbeachsblog.blogspot.com/2021/01/firebird-embedded-in-sandboxed-macos-app.html
  5. Hans♫

    AV with InApp purchase on MacOS

    The FMX.InAppPurchase component already implements in-app purchase for iOS, and since OSX uses the same StoreKit library, I simply added an OSX copy of the iOS implementation and adjusted it to "work" on OSX. It works as far as it compiles and runs, and I can call "QueryProducts", which also initiates a Delegate callback. Once in a while I can even successfully read the product details from App Store that I receive in the callback, but most of the time the callback fails with an AV. It seems to be random where it fails. If I restart paserver before each run I can increase the chance that it works, but except from that I did not find any correlation between changes I have made and a successful request. The testprogram works fine on iOS. On OSX I have tried to target both Mojave and Cataline, and both 32 bit and 64 bit editions. They all fail. As the OSX code is the same as the iOS code, I guess that the problems are related to differences between the iOS and the OSX target in the Objective-C handling and wrapping. Any ideas what could be wrong, or what I should try? (or maybesomeone with more knowledge about Objective-C wrapping and the inner workings of Delphi could help me with this?) Below are some extracts from the code in my new unit "FMX.InAppPurchase.Mac". My test program creates TiOSInAppPurchaseService and call QueryProducts. It works without errors, and a few seconds later the TiOSProductsRequestDelegate.productsRequest callback is called. From here random AV's happens. Usually it fails on the first line FIAPService.FProductList.Clear, and sometimes it fails earlier in "DispatchToDelphi" or later in one of the following lines. TIAPProductList = class(TList<TProduct>) end; procedure TiOSInAppPurchaseService.QueryProducts(const ProductIDs: TStrings); var ProductIDsArray: NSMutableArray; ProductIDsSet: NSSet; ProductID: string; begin ProductIDsArray := TNSMutableArray.Create; for ProductID in ProductIDs do ProductIDsArray.addObject(PStrToNSStr(ProductID)); ProductIDsSet := TNSSet.Wrap(TNSSet.OCClass.setWithArray(ProductIDsArray)); FProductsRequest := TSKProductsRequest.Wrap(TSKProductsRequest.Alloc.initWithProductIdentifiers(ProductIDsSet)); ... FProductsRequest.setDelegate((FProductsRequestDelegate as ILocalObject).GetObjectID); FProductsRequest.start; end; constructor TiOSInAppPurchaseService.Create; begin ... FProductsRequestDelegate := TiOSProductsRequestDelegate.Create(Self); FProductList := TIAPProductList.Create; end; constructor TiOSProductsRequestDelegate.Create(const IAPService: TiOSInAppPurchaseService); begin inherited Create; FIAPService := IAPService; end; procedure TiOSProductsRequestDelegate.productsRequest(request: SKProductsRequest; didReceiveResponse: SKProductsResponse); begin FIAPService.FProductList.Clear; ... end;
  6. @Dave Nottage Hi Dave, thanks for your nice article about a major problem in the Apple environment. Yes, Apple always keeps us busy with such unnecessary work. Since I had fallen into such nasty boobie trap in some older version before, I changed my way howto deal with these updates. So I may provide another (pseudo)-solution to this topic: Solution 3: ( prerequisites before starting any update ) Use your XCode environment for development in a VM virtual machine, like VmWare Fusion Make a backup of your VM image, BEFORE any update of the VM (if you prefer snapshots, thats fine too, if you cleanup later, but I prefer to make complete, FULL clones of the whole VM) In the VM backup also the current SDK's are backed up of course, if you ever need them again later With these FULL clones you can switch fast and easy between older and newer XCode, SDK and PAServer setups That doesn't solve the basic problem, of course, but makes it much easier to handle different SDK environments, in case of any "crash" might happen wit the new version.
  7. Hi there, I'm looking for a scripting engine in my projects, and since I had last time contact with scripting this is some years ago. I would like to check out the pros and cons of the solutions, to find the best fitting match for me. Since paxCompiler seems gone by Apex, this is maybe out of sight now, but I'm not so sure about that. DwScript is not available on mobile, as far as I know. DwScript is somewhat available in different forks (so it seems), not sure which one is the right one to choose. Maybe the list of engines is nit final, please let me know if there is something missing. What I'm looking for is a script engine that has the following features (I've put the most important in bold) usage for some base analysis and event control lightweight very stable well supported and documented Pascal supporting multiple languages would perfect, but not a main criteria (JS, C++, C#, Basic) Multiple platforms Win, Macos, Linux, iOS, Android is a must have supporting full language support is nice to have, but not a must (I can skip the special stuff I would say). performance (not that critical, but should be able to process dynamic protocols behaviour reasonable well ) memory footprint good, active community Free to use in commercial products I hope you can bring some light in this dark forest of possibilities, and share some experiences.
  8. Devart, the leading provider of database management software, connectivity solutions and developer tools, rolled out new versions of Delphi Data Access Components to keep assisting software engineers in developing fast native applications. The key feature of the recently updated products is support for the newly released RAD Studio 10.4 Sydney. The release also includes such key enhancements as: support for macOS 64-bit in the latest version 2.0.8 of Lazarus; support for the Pipe, Secure Pipe, and Secure TCP protocols in NexusDB; support for the Line geometric type in PgDAC; a new option AllFieldsAsNullable in DBF. Devart Delphi Data Access Components are the libraries of components for Delphi developers that provide direct access to multiple databases, and allow developing multi-platform applications in Embarcadero RAD Studio, Delphi, C++Builder, Lazarus, and Free Pascal on Windows, Linux, macOS, iOS, and Android, for both 32-bit and 64-bit platforms. To read the news on the vendor’s official blog, please visit https://blog.devart.com/delphi-data-access-components-with-support-for-rad-studio-10-4.html About Devart Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects. For additional information about Devart, visit https://www.devart.com/.
  9. Hi there, usually VmWare provides install procedure very nicely: download Macos installer .app from AppStore, then create new VM and drop it into. This works on some Mac, but seems not to work on all Mac's, for some reasons only Apple knows. I had such case with an older MacBook Pro, and wanted to describe the procedure below. After some search in the Web I found a nice article about same issue with Mojave, so I took this as base. Since I'M on Catalina, I had to make some changes. Here are the steps in compressed form: Create VmWare Macos guest from ISO (Catalina) Web : Search "Update Macos Catalina" (or the OS you'll want), to find the right entry in the AppStore AppStore: Download "Install Macos Catalina.app" from AppStore. After download: Cancel the auto-start of installation on the host. Host : /Applications not always usable, as this is a special protected folder. Move "Install Macos Catalina.app" from /Applications to /Documents folder. VmWare : Select “Apple OS X” and then select “macOS 10.15” and Continue. VmWare : Choose “Create a new virtual disk” and continue. Either Finish or Customise Settings of the virtual machine. (e.g. 4 CPU, RAM 4GB, no 3D acceleration, Use full retina display, HD 60GB, etc.) The VM is prepared now, its needed to create a OSX Catalina ISO file. Host : Prepare a OSX Catalina ISO file from the installer. Terminal : Create a temporary virtual disk file in your tmp directory. hdiutil create -o /tmp/Catalina.cdr -size 12000m -layout SPUD -fs HFS+J Wait until finished created: /tmp/Catalina.cdr.dmg Terminal : When done, attach and mount the virtual disk hdiutil attach /tmp/Catalina.cdr.dmg -noverify -mountpoint /Volumes/install_build Wait until finished /dev/disk3 Apple_partition_scheme /dev/disk3s1 Apple_partition_map /dev/disk3s2 Apple_HFS /Volumes/install_build Terminal: [Optional] Check all available mountpoints diskutil list Host : Rename the installer, to be compatible with the following scripts, e.g. by Finder. ren "~/Documents/Install Macos Catalina.app" ~/Documents/MacosInstaller.app Installer is available now under the path: ~/Documents/macOsInstall.app Terminal : Extract and create an installable image from the download (with elevated rights). sudo ~/Documents/macOsInstall.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build Wait until finished Password: Ready to start. To continue we need to erase the volume at /Volumes/install_build. If you wish to continue type (Y) then press return: y Erasing disk: 0%... 10%... 20%... 30%... 100% Copying to disk: 0%... 10%... 20%... 30%... 40%... 50%... 60%... 70%... 80%... 90%... 100% Making disk bootable... Copying boot files... Install media now available at "/Volumes/Install macOS Catalina" Terminal : Move the contents of the virtual disk into a .dmg file on your desktop mv /tmp/Catalina.cdr.dmg ~/Documents/InstallSystem.dmg Terminal : Detach the virtual disk (installer) hdiutil detach /Volumes/Install\ macOS\ Catalina Wait until finished "disk2" ejected. Termnal : Convert the newly created “InstallSystem.dmg” into an .iso file. hdiutil convert ~/Documents/InstallSystem.dmg -format UDTO -o ~/Documents/InstallSystem.iso Wait until finished Driver Descriptor Map (DDM : 0) read … Apple (Apple_partition_map : 1) read … (Apple_Free : 2) read … disk image (Apple_HFS : 3) read … .............................................................................. Time: 1m 39.113s Speed: 121.1M Byte/s Reduction: 0.0 % created: /Users/Rollo/Documents/InstallSystem.iso.cdr Host : Change the filetype of the file “InstallSystem.iso.cdr” in your documents, e.g. with Finder. Select the file and hit enter, now rename the file to “InstallSystem.iso” (with prompt); Select “Use .iso” VMware : In virtual machine manager right click the newly created VM (see above). Choose settings. VMware : Choose “CD/DVD (SATA)” Next GoTO the pull-down menu and browse to the “InstallSystem.iso” file just created. Check “CD/DVD (SATA)” connect checkbox VMware : Boot the new machine and follow Apple installation instructions. These steps worked well for me, and are maybe useful for somebody else too. Maybe in the new VmWare installer provide the Drag'n'Drop for all images flawlessly, in the future, and this won't be necessary any more.
  10. There are 50 new cross platform samples for Delphi 10.3 Rio FireMonkey available over on Github. The demos heavily feature … http://www.fmxexpress.com/50-cross-platform-samples-for-android-ios-osx-windows-linux-and-html5-in-delphi/
  11. So...macOS 10.15 has been released, and with it the incapability of running 32Bit applications. Using this tool to https://www.stclairsoft.com/Go64/ check wether or not I have any crucial 32Bit applications before making the dive, I found out, that the PAServer 20.0 ( is at least in part 32Bit - which gives me a minor rash. What is the verdict on this? Should I stall Catalina installation, or is it OK to go ahead?
  12. Are you using 3rd party C libraries in your Mac app? Or maybe some custom assembly code? Then things will be different when you switch to 64-bit macOS. Maybe this post will give you a head start. It shows how you can use static libraries now, and how you can use an external assembler for your assembly code. https://blog.grijjy.com/2019/07/19/using-static-libraries-and-assembly-with-64-bit-macos/
  13. Hi, I tried all BlueTooth examples available with 10.3 Rio on my Mac (Xcode 10.1) but none of the them, compiled to Windows or macOS, work. Each time I click the scan button to list all available BlueTooth devices, I get a dialog box stating: Error BlueTooth device not found: disconnected or turned off. My BlueTooth card on my Mac is turned on and fully functional. Can anybody here use BlueTooth functionalities with Rio 10.3 on a Mojave macOS machine with Xcode 10.1? Or do you face the same problem? Thanks for any help. Steve
  14. I'm having difficulty saving a JPEG file in Firemonkey. Here's the code: procedure SaveImage(bmp:TBitmap; filename:string); var vOpt:TBitmapCodecSaveParams; begin vOpt.Quality:=20; //Quality setting ignored? :( bmp.SaveToFile(filename,@vOpt); end; On Windows everything seems OK, however when the program is compiled for MacOS the resulting JPEG file is not at the Quality specified. The image quality setting seems to be ignored. How do I set the JPEG output quality on MacOS? (Delphi Tokyo 10.2.3)
  15. Gnostice Document Studio Delphi version 2018 R2 Build 18.2.2831 released with C++Builder support, new SKUs and more. Highlights in this release: - Marketing name changed to Gnostice Document Studio Delphi. This has no impact on code. - SKUs have been reorganized to cater to popular demands. SKUs based on popular demand. - Essential [$250], Professional [$450], and Ultimate [$600] are the new SKUs. - Essential edition replaces ReportExport edition. Customers of ReportExport edition with an active subscription get a free upgrade to Essential. - Ultimate edition includes all features of Professional + 1 full license of Gnostice StarDocs Document Server Viewer edition. - Support for C++Builder. - PDF rendering enhancements and much more. For the full release notes, please have a look at the following page: https://bit.ly/2vRt2sq To know more about Gnostice Document Studio Delphi, please browse to:https://bit.ly/2nKIeDl https://bit.ly/2nKIeDl To download the trial version, please browse to: https://bit.ly/2zz06Xn Please mail us at support@gnostice.com, if you have any questions. Thank you, The Gnostice DevTools Team https://www.gnostice.com #PDF #Delphi #FireMonkey #DocumentStudio #Windows #macOS #iOS #Android