Jump to content

Massimiliano S

Members
  • Content Count

    29
  • Joined

  • Last visited

Community Reputation

1 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. in firemonkey I save locally (win, IOS, Android) some Bitmaps in Jpeg format and reducing the quality and size. In this way 3 or 4 Mb files become 100 or 200Kb When I reload these files at runtime in a TBitmap of a Trectangle that I insert in a TListBoxItem, the RAM occupied is a lot, sometimes even 20 Mb. The result is that if I have to upload 150 files for a total of 20 Mb on the disk in memory I find myself occupying almost 600 Mb. Does anyone know why and how to decrease the occupation in memory? Thanks
  2. Hi Dave, finally after a long time I managed to solve Thanks a lot to you, Chris and Allen. Without you I wouldn't have been able to do it. You are great developers and great people Massimiliano
  3. Thank you very much Dave, I'm going to try and finally hope to succeed. Chris's post is really complete and accurate and you at Allen have helped me a lot too
  4. Hi Dave, Yes in Xamarin it is possible but I haven't tried it yet. https://forums.xamarin.com/discussion/177382/how-to-implement-share-extension-to-xamarin-forms-ios-project You would really do me a huge favor. Yes, I can confirm it
  5. Unfortunately following this POST I have not been able to create the archive file and I have stopped for two months on this problem. In fact, if I copy the whole PlugIns folder and insert the references in the deployment I always get this error: [PAClient Error] Error: E0776 error: exportArchive: "yashare.appex" requires a provisioning profile. [PAClient Error] Error: E0776 Error Domain=IDEProvisioningErrorDomain Code=9 ""yashare.appex" requires a provisioning profile." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="yashare.appex" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.} the PlugIns folder contains a yashare.appex folder which contains: yashare Info.plist embedded.mobileprovision Base.lproj \ MainInterface.storyboardc \ Info.plist Base.lproj \ MainInterface.storyboardc \ j1y-V4-xli-view-wbc-yd-nQP.nib Base.lproj \ MainInterface.storyboardc \ UIViewController-j1y-V4-xli.nib _CodeSignature \ CodeResources I tried with Ad Hoc mode but it's the same with Store mode. After creation of: all provisioning prodiles, parallel solution in xcode, certificates, Group etc .. What I have done is - Build in xCode (maybe something wrong here) - Copy the Plugins folder to my delphi project folder - Map all files in the deployment - Compile the Delphi version for Ad Hoc Last month I found this POST on Quality Center of embarcadero https://quality.embarcadero.com/browse/RSP-23804 Chris Pimlott seems to have had the same problem as mine and says Delphi is unable to add provisioning profile to plugIn He suggested an alternative method, that is to generate an Archive file in xCode with the parallel solution, from here extract the exportOptions.plist file, then from the command line on a mac launch a script with the various steps to create the archive with xcodebuild Unfortunately this solution also gives me an error and I always get this message 2020-09-10 16: 58: 54.881 xcodebuild [2882: 120742] [MT] IDEDistributionMethodManager: - [IDEDistributionMethodManager orderedDistributionMethodsForTask: archive:]: Error = Error Domain = IDEDistributionMethodManagerErrorDomain CodeInfo User Error = 2 "Unknown Distribution Error" {NSLocalizedDescription = Unknown Distribution Error} error: exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc Error Domain = IDEFoundationErrorDomain Code = 1 "exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc" UserInfo = {NSLocalizedDescription = exportOptionsPlist error for key 'method': expected one of {}, but found ad -hoc} Here, too, I'm probably doing something wrong but I don't know what. The idea I got, however, is that I am questioning delphi as a tool for developing apps. There is no documentation on App extensions even if they are very used and from embarcadero I have not had any support. At Xamarin I know that all these obstacles have overcome them
  6. Massimiliano S

    Android 10 delphi 10.4 camera and gallery doesn't work

    Here the Exception procedure TBitmap.LoadFromFile(const AFileName: string); var Surf: TBitmapSurface; begin TMonitor.Enter(Self); try Surf := TBitmapSurface.Create; try if TBitmapCodecManager.LoadFromFile(AFileName, Surf, CanvasClass.GetAttribute(TCanvasAttribute.MaxBitmapSize)) then Assign(Surf)
  7. Hi, After updating to delphi 10.4 and SDK 29 the camera and gallery do not work on Android 10 Also delphi examples don't work. After taking a photo from the camera the app doesn't return anything while the gallery, after choosing the photo, raises this execption First chance exception at $ 00000074D87D473C. Exception class EBitmapLoadingFailed with message 'Loading bitmap failed (/data/user/0/com.embarcadero.CameraRoll/cache/IMG_20200911_1728082355078942815963051.jpg).'. Process CameraRoll.apk (11714) any ideas?
  8. Massimiliano S

    Problem with Delphi RIO 10.3.3 and Google API Level 29

    Unfortunately there is no solution. I had to uninstall delphi 10.3 and install 10.4 This isn't cool because 10.3.3 is ultimately very recent and it can't possibly not support the latest minimal APIs
  9. Update I created the group with an administrator profile. Now I tried to do a test by uploading an empty app to the store (instead of mine in delphi) and my real extension. The upload worked so the problem seems to be related to delphi. If in the deployment I also enable embedded.mobieprovisioning then Delphi gives me the error [PAClient Error] Error: E0776 Error Domain=IDEProvisioningErrorDomain Code=9 ""yashare.appex" requires a provisioning profile with the App Groups feature." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="yashare.appex" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.} If instead I exclude it then Delphi creates the IPA file for me but during loading APPLE gives me this error ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '4WXQVJ6QJ7.it.diesys.youaddict.yashare' for the key 'application-identifier' in 'Payload/YaApp.app/PlugIns/yashare.appex/yashare'." maybe there is something wrong with embedded.mobieprovisioning file or I need to change something in the Delphi deployment, I don’t Know
  10. Hi, I created the Share extension type app in xcode and embedded it into my delphi project. After solving all the problems described above everything works in development and ad hoc. (thanks Dave and special thanks to Allen) But I had to remove the appex "embedded.mobileprovision" from the deployment: In App Store mode When I compile for the app store if I also enter "embedded.mobileprovision" in deployment tthen I get this error. [PAClient Error] Error: E0776 Error Domain=IDEProvisioningErrorDomain Code=9 ""yashare.appex" requires a provisioning profile with the App Groups feature." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="yashare.appex" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.} I checked the provisionings they are correct,s . both (app and extension) supports group If I disable "embedded.mobileprovision" for appex in deployment then delphi compiles the ipa correctly, however, when I try to upload IPA files to the store I get this error. ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '4WXQVJ6QJ7.it.diesys.youaddict.yashare' for the key 'application-identifier' in 'Payload/YaApp.app/PlugIns/yashare.appex/yashare'." In xcode everything looks fine Extension App
  11. Hello I need to upload a test app on the google store. Unfortunately, the loading is not successful because Google requires at least a Level 29 for Android 10 as the target of the API while mine is 28. I am using delphi rio 10.3.3 I updated the SDKs by also installing 29 and downloaded the android-ndk-r21d NDK version. I then updated SDK manager set as android-29 target. Unfortunately, delphi always compiles by setting in the manifest: <uses-sdk android: minSdkVersion = "19" android: targetSdkVersion = "28" /> So I forced version 29 in the manifest template but unfortunately the app crashes I read that Delphi RIO theoretically supported the Android 10 version but I could not find anything about my problem other than a 6 month old post with no solution Has anyone found this problem yet? Thanks Massimiliano
  12. Massimiliano S

    IOS Ad Hoc deploy work only one Device

    Update if I compile in Ad hoc on xCode with the same provisioning it goes to all devices. When I am delphi it can only be installed on mine
  13. When I compile in ad hoc mode even if the provisioning contains several devices, the app can only be installed on my iPhone while on the others the installation fails. using https://www.diawi.com/ and direct connect for installing app. This did not happen before inserting of a Share Extension made in xCode. Another strange thing, when I do a share somthing with my iPhone and my app I see a notification on my mac's safari When I compile with delphi in ad hoc mode, even if I connect another phone (included in the provisioning), the app is reinstalled on my remote and as a Target device in delphi I have always and only my phone and I cannot remove it. The provisionings are correct (in delphi and xCode) and until yesterday they have always worked, my doubt is that it is something left inside the xCode project but I don't know what. I have searched everywhere. Bye Massimiliano
  14. Hi Allen, received email, thank you very much My app must listen to receive links (both closed and open) and it is not necessary to send anything to the extension. Does this mean your app must open/run if it’s not running when the extension needs it? Yes, if my app is closed it should open automatically when a link arrives A bit like android intents and a bit like other apps do (e.g. notes etc ..) Where should I insert this code? Now what I have to do is send the Link, how do I capture and send it? I have never made this type of app extension, so I am not sure where you place the code on XCode side until I know what extension you are making. Each app extension works differently. I have seen that this extension has 2 methods IsContentValid didSelectedPost The first I think should be implemented with the controls on the selected content The second should send the place (I suppose) Then there is a configurationItems Are you making a “share” extension for Safari? Are you trying to capture all urls from Safari into your app? Could you explain what you are doing a little bit better? If you could clarify I might be able to advise you where to capture what you want to capture. The precise operation is as follows: The user browses the websites and when he finds a site he likes, he shares it with my app. My app must simply receive only a url that runs to a web services that I have made and that extracts from the site the name and some information that may be useful to the user. For example, I browse the site https://www.zara.com/it/it/donna-borse-pelle-l1041.html?v1=1549268 I see this bag that I like and I decide to save it. My app receives this link, processes it and saves it into a personal database So the only information needed is the site address and perhaps the name
  15. Hi Allen, Hi Dave I received, thank you very much, yes in theory I should be on vacation with my children but until I close this problem I'm blocked. I created a group on apple and managed to put my share exension in delphi and compile. The problem is that now my share extension and my app in delphi are two empty boxes. Probably now the most is done but I don't know xcode and I'm struggling a bit. If I now run my app on the iPhone the strange thing is that if I share a safari link to my app what happens is that the same site opens for me on the mac So the first thing to do is work on the app. My app must listen to receive links (both closed and open) and it is not necessary to send anything to the extension. To do this I have to enter this code but it is not clear where. In the OnCreate of the main form? var Defaults: NSUserDefaults; SharedSettings: MissingNSUserDefaults; begin { Init with the proper Application Group suite name } Defaults := TNSUserDefaults.Alloc; SharedSettings := TMissingNSUserDefaults.Wrap((Defaults as ILocalObject).GetObjectID); SharedSettings.initWithSuiteName(StrToNSStr('group.it.diesys.yadiesys')); I think this part is used to send data to the Share Extension and therefore in my case it should not be necessary, right? { Save SomeKey/SomeValue to the shared settings } SharedSettings.setObject( (StrToNSStr('SomeValue') as ILocalObject).GetObjectID, StrToNSStr('SomeKey') ); { Update the settings } SharedSettings.synchronize; Should the synchronize be called every time something is sent? How does the app know when a link is sent to it? and how can I extract it? Now comes the more complex part because I don't know xCode If I open my Extension I only have a file a ShareViewController.h file with the interface and a ShareViewController.m that implements the interface. #import "ShareViewController.h" @interface ShareViewController () @end @implementation ShareViewController - (BOOL)isContentValid { // Do validation of contentText and/or NSExtensionContext attachments here return YES; } - (void)didSelectPost { // This is called after the user selects Post. Do the upload of contentText and/or NSExtensionContext attachments. // Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context. [self.extensionContext completeRequestReturningItems:@[] completionHandler:nil]; } - (NSArray *)configurationItems { // To add configuration options via table cells at the bottom of the sheet, return an array of SLComposeSheetConfigurationItem here. return @[]; } @end Where should I insert this code? NSString *const AppGroupName = @" group.it.diesys.yadiesys'"; This shouldn't be necessary because my Extension just has to send, right? // Settings passed from the host application NSString *someValue; Where should I insert this code? // Create and share access to an NSUserDefaults object NSUserDefaults *sharedSettings = [[NSUserDefaults alloc] initWithSuiteName: AppGroupName]; Now what I have to do is send the Link, how do I capture and send it? Thank you very much Massimiliano
×