

Chris Pim
Members-
Content Count
72 -
Joined
-
Last visited
-
Days Won
1
Chris Pim last won the day on July 15 2024
Chris Pim had the most liked content!
Community Reputation
35 ExcellentRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
In App Purchase (consumable and subscription)
Chris Pim replied to Joe Sansalone's topic in Cross-platform
Fair enough. I did say it wasn't tested đ Thanks for the feedback though. I may have enough run through this when I have time and see if I can provide a better workaround, but won't be until next week. I'll post here if I come up with anything that works. -
In App Purchase (consumable and subscription)
Chris Pim replied to Joe Sansalone's topic in Cross-platform
I believe the following should do what you need, but I've been unable to test this at the moment so can you please try and let me know if it works. Note: I've checked and it's only the Android version of the iAP components that cache the purchases, so the iOS version shouldn't be affected. FMX.InAppPurchase.Android.pas: 1. In TInventory, add: procedure ClearPurchases; And the implementation: procedure TInventory.ClearPurchases; begin FPurchaseMap.Clear; end; 2. In TAndroidInAppPurchaseService.QueryProducts, replace: procedure TAndroidInAppPurchaseService.QueryProducts(const ProductIDs: TStrings); begin FInventory.ClearPurchases; FProductDetailsResponseListener.QueryProducts(TProductKind.InApp, ProductIds.ToStringArray); end; 3. The component won't automatically re-query the products when a purchase changes (the billing API doesn't have this facility as far as I can tell) so you'll need to call iAP.QueryProducts() with your productIDs whenever you feel you need to, and it *should* now reflect the correct purchase status once it returns. Please try this and reply if it works. If so, I'll copy this into the QP ticket for Embarcadero's info. -
In App Purchase (consumable and subscription)
Chris Pim replied to Joe Sansalone's topic in Cross-platform
Thanks for reporting this. Iâll take a look at the Delphi sources and see if I can find the bug to offer a workaround. -
In App Purchase (consumable and subscription)
Chris Pim replied to Joe Sansalone's topic in Cross-platform
I understand your frustrations. As the author of that article I really shouldnât have had to write it at all as they shouldâve implemented subscriptions by now. They havenât changed that code for at least 5 years and so basically abandoned within their own code base at the is point. I aim to update the article for the latest Android subscriptions (there are a few small changes you can make to support multiple base subscriptions). I hope that helps once I have. I hadnât noticed the caching issue but suspect youâre correct. Itâs worth checking the Delphi code first as thatâs the easiest fix if so. Itâs recommended that you use server side callbacks from the stores to capture subscription changes directly from Apple and Google and store them in a server of your own. Thatâs what I do as you canât easily get the subscription expiry details from Google or Apple using their APIs. The only way is to decode the receipt file on Apple (which is difficult) or use their receipt validation APIs (which theyâve now deprecated). For Google you use their developer API to get details about the purchase but itâs only valid for 60 days then wonât return anything. I agree that this side of the Delphi mobile support is pretty poor and it would be better if a third party picked this up and released supported modern components for iAP instead, who knows, maybe someone will as we have a great community here. -
TMemo no longer scrolls on iOS when set to Platform on iOS 18
Chris Pim replied to Chris Pim's topic in FMX
Thanks Dave. Interesting to figure out what's conflicting on this... -
Supporting iOS Dynamic Type (accessibility font size) in Delphi FMX apps
Chris Pim replied to happySuzhou's topic in FMX
Thatâs an interesting solution, thanks! By default a Delphi app will apply the font scale from the phone to text set to size 12, but not others, which is a shame. -
iOS problem since switching from Delphi 12.1 to 12.2
Chris Pim replied to BytePusher's topic in Cross-platform
This is a known bug in Delphi 12.2 and above. Itâs caused by the new iOS linker and has been logged with EMB. Itâs caused by increasing the min iOS version from 11 to 13 or higher. This breaks the linker and doesnât matter what other dependencies you have in the app. A blank app will also fail to link. Iâve been seriously impacted by this too and have been assured theyâll be fixing in the next update (12.4? 13? Who knows). For now, the only workaround I found is to either keep the min iOS version as 11, or if you have a copy of Delphi 12.1 Pro or above you can copy the ld.exe file from the bin folder of the installation to replace the one in the version youâre using. I.e. downgrade the linker to a version that works. If youâre using community or donât have an older version of Delphi, this obviously wonât help. I hope that helps. -
Iâve noticed a weird bug in all Delphi versions since 12.0 when building an iOS app against SDK 18 (running on an iOS 18 device). If you have a TMemo set to ControlType=Platform, it canât be scrolled! Weâve just updated our app for D12.2 built against SDK 18.2 and had users complaining. If we build against SDK 17 (as our app used to be) it scrolls fine. Unfortunately, Apple are mandating all apps must be built against SDK 18 from 24th April so we need to find a solution. Ive checked Delphi 12.3 and itâs still broken in there too. The memo has to use platform control type to support Arabic users and their existing notes data (R2L isnât supported in the styled memo). Iâve logged a QP issue for this but wonder if anyone could suggest any other workarounds or options? We need a fix pretty quickly! https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-3318 Thanks
-
We've had a few of our users on Samsung devices report that when typing into a TMemo control in our FMX app, after a random number of characters, the keyboard switches caps lock on and it can't be turned off again. The app is using Delphi 12.1 (latest patch) and Skia. We can't reproduce this issue on any of our test Samsung devices but seems to be happening on a range of Android versions and Samsung devices from A12, 13 and 14. There's nothing logged in the Logcat on those devices nor errors raised within the app. Has anyone else seen this behaviour? I'm trying to put a case together to report it to EMB but need something they can work from. Thanks in advance
-
Looks very serious. Can you please log it with Embarcadero in their quality portal so they can start investigating? We might get a quick patch from them with any luck. https://embt.atlassian.net/servicedesk/customer/portals
-
Thanks Kryvich, very helpful. I'll take a look through those.
-
I've been using Markdown in my other non-Delphi projects as a way to provide formatted docs in my apps. E.g. T&C documents, in-line help content etc. Seems like this is pretty standard in other platforms (Flutter, Swift, C# etc) I've tried a few alternative approaches such as using the web browser (too heavy-weight for in-line content), TDzHTMLLabel (excellent but HTML based an doesn't handle images well. Also not great for longer content as it's just a formatted label control). I found the HTML Component Library but it's very expensive for the small part of it that I need. I found an open source project to convert markdown to HTML which is an option I'm looking into but still falls back onto another component to actually display the content. Embarcadero referred to Markdown support in Delphi 12 but from what I can see it's only for use in the IDE itself, not in your own apps. It just feels like I'm missing something here. Does anyone know of a good solution I haven't found? Maybe it's just a great opportunity for someone to create one!
-
Google rejects Production Release after upgrading to Rad Studio 12
Chris Pim replied to Stanislav Yotov's topic in FMX
Hi Stanislav Did you find out what was causing this issue? We had the same problem recently after upgrading our project to Delphi 12. When running on devices (particularly older than Android 14) it crashed with the same Resource not found for drawable/splash_image_def. In our case, the problem was the colors.xml file not containing an entry for: <color name="splash_background">#FFFFFF</color> We replace the standard colors.xml file in our project deployment with a custom one to support a custom Android widget library. Our xml file was from D11.3, but from D12 it now needs to include the extra color entry for splash_background. I hope this helps if you're still having problems. Chris -
Delphi 11.3 issue with iOS Today Extension widgets
Chris Pim replied to Chris Pim's topic in Cross-platform
The only solution we came up with for this was: 1. Copy the fully signed extension from XCode into the Delphi project (in our case deployed to the PlugIns folder). 2. Do a full build and deploy with Delphi (which damages the appex by re-signing with the wrong entitlements file) 3. Manually run a script which copies the original binary of the appex over the top of the one Delphi re-signs in the .app generated in the scratch-dir so itâs correct again. 4. The script then also has to re-run the iosinstall command to deploy the fixed app to the device. To help with step 3, I have the original binary from inside the .appex included in the deployment twice. Once into the PlugIns folder as expected and a second to ../ which puts a copy into the scratch-dir folder. By doing this, my script for stage 3 knows where to get the original file from and itâs always the pre-broken version. This works fine but has the manual step at the end which is a pain. Delphi doesnât have a post-deploy stage in the project build options (like it does for post-build) which is a shame as the âcopy-backâ step could just be included there if it did. With any luck, EMB will undo the âfixâ that broke this in 11.3 so it isnât needed anymore. Maybe we should all vote for the issue to push it up their priority list. -
I've tested this fix on a more complex app too and it also stops the crashing issue on iOS 17, so thank you as always Dave!