Jump to content

MikeMon

Members
  • Content Count

    147
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by MikeMon


  1. 1 minute ago, vfbb said:

    The options of the delphi 10.4 is working perfectly for this, you don't have to add it manually to the deploy project and you don't need to change the storyboard files either. You can test with a new project.

    Hi @vfbb. Option 4 yes. Option 3 isn't working. The default Delphi launch screen images are added no matter what.


  2. Hi Guyz

     

    I'm having an issue making the storyboard work with an existing app (I haven't tried with new apps yet).

     

    I've followed these steps but I keep on getting a blank screen:

     

    1.) I deleted the info.plist.TemplateiOS.xml from my project directory.

    2.) Added the launch images in the project options

    3.) I edited the LaunchScreen.storyboard and Assets files in LaunchScreen.TemplateiOS (actually only the Contents.json file in the Assets\LaunchScreenImage.imageset folder) as needed by replacing the default FM launch icons with mine.

    4.) Made sure that my launch screen images to be deployed are in the "Project | Deployment".

    5.) Deleted the app on the device (as @vfbb suggested above)

    6.) Powered down the device (as @vfbb suggested above)

    7.) Powered up the device (as @vfbb suggested above)

    8.) Installed the app (as @vfbb suggested above)

     

    Any ideas


  3. 9 hours ago, vfbb said:

    Just a information: The ZXing is a crossplatform solution, and is simple to implement, but is not the best choose. In Android I prefer the GoogleVision and in iOS I prefer use the apis of the AVFoundation, you will even avoid using TCamera, because it is very slow, very.

    Hi @vfbb

     

    Thank you for your information. Will look into it.


  4. 3 hours ago, MikeMon said:

    Hi Dave. Thank you for your valuable input. I compiled and ran your desktop app and it's working perfectly. I will check your code and see what I'm missing.

    Hi @Dave Nottage

     

    After some playing around, I found out what the problem was. The "Authorization" header should not be encoded. Now, everything works fine by using REST. 

     

    FYI, the pre-complied RESTDebugger.exe that comes with Delphi 10.3.3 doesn't have the "Do Not Encode" checkbox when adding parameters. I had to recompile its project and it was there.

    • Like 1

  5. Hi

     

    I've setup firebase cloud messaging and everything is working fine both on iOS and Android, i.e. I can send push notifications through the Firebase Cloud Messaging console. What I want to do is to develop my own console with which I want to send my firebase push notifications.

     

    I came across the following in the FCM app server protocols:

     

    https://fcm.googleapis.com/fcm/send

     

    To test it, I'm using the "Embarcadero REST Debugger" software. As per the FCM documentation, I've add a header called "Authorization" with a value of "key=XYZ". XYZ is the "Server Key" value in the Firebase Console's "Cloud Messaging" setting of my App. Unfortunately I keep on getting a "401: INVALID_KEY" response. Is there anything else I need to do to make it work?


  6. 1 hour ago, Rollo62 said:

    You could try to simply add another rectangle on top of the CustomStyle Panel background in the StyleDesigner,

    with giving a new StyleName it should be accessible.

    Not tested in your case, but Ido similar things with other controls.

    As proposed above, try to use TRectangle instead of TPanel, or better even TLayout as base container for your other components.

    Hi @Rollo62

    As I said earlier, I do use TRectangle instead of TPanel. But my example above was just for illustration to show that first-level stylename's properties of a style can not be modified whereas its children's can. E.g. with a TSwitchObject, there is nothing I can do. The TSwitchObject stylename is at the first-level and I can't access any of its properties programmatically. I tried adding a TLayout in the style at the first-level and have the TSwitchObject as its child, but it is not working properly. E.g., the isChecked:= True is not changing the TSwitch's state.


  7. 2 hours ago, Rollo62 said:

    The implementations can also vary between the different platforms.

    You cannot rely that one element is accessible in same way under all platforms.

    This is one of the biggest drawbacks of FMX styles IMHO.

    Let me find a solution for 1 platform and I'll do the rest!! lol


  8. 3 minutes ago, Serge_G said:

    Panel is no more than a TRectangle (depending style file I think)

    I don't know why but if you try to change TPanel fill color this does not work with 'windows 10 desktop style' ,  works during design time with 'default' Stylecollection but not at runtime 🐛something to do with the fact that this TRectangle is at the root and not in a TLayout ?     

    Best suggestion I can do is : use a TRectangle. I do not use anymore  TPanel  now, preferring Layouts and TRectangle 😉

    Yes, I can change the color of TPanel during design time, but not at runtime. To be honest I use TRectangle, too. The TPanel in my question was just for reference because it is simple to demonstrate. Generally, I can't access and change the properties of the first-level style. Another example which I still haven't found a workaround for is TSwitch. I use a TSwitchObject for a TSwitch style. Again, because it is the first-level style, I can't access and change its properties, e.g. "ThumbOn.Color".


  9. 1 hour ago, Serge_G said:

    As I understand what is in your mind, I think it's your  ChangeObjectRecursive function the problem.

    A component (your panel) as style but style is not the "container" of the panel's childs.

    And therefore, you change wrong "styledata" property for a label

     

    Hi Serge

     

    Thank you for your answer.

     

    The custom-styled TPanel has no children. This is what I'm doing:

     

    1.) Drop a TPanel on the form. Call it Panel1

    2.) Right-click on the TPanel and choose "Edit Custom Style..."

    3.) Close the designer

    4.) Make sure the "StyleLookup" field of Panel1 is "Panel1Style1"

     

    What I need to do is to programmatically change the "Fill.Color" of "Panel1Style1". I can't seem to find a way how.

     

    However, if I drop a TLabel and do the same, "Label1Style1" will be created. Label1Style1 has a child stylename "Text". I could easily access and change its properties by my method above, i.e. Label1.StylesData['text.Scale.X']:= 2, or Label1.StylesData['text.Text']:= 'OK'

     


  10. The code above works for the children of the "RedButtonLabelStyle" resource. How do I change for the resource itself. E.g.: when you use a "Custom Style" for a TPanel, it creates a custom style e.g. Panel1Style1. Panel1Style1 doesn't have any children. How can I change its properties (e.g. Fill.Color) by code? The above code's approach (e.g. StylesData['Panel1Style1.Fill.Color'] or StylesData['Fill.Color']) doesn't work.


  11. 25 minutes ago, mausmb said:

    Something in this direction ?

    Hi. Thank you for your answer.

     

    Your approach is irrelevant to what I am trying to do. What I want to do is change properties of a style in a Stylebook and expect all objects having that style in their stylelookup field to be updated automatically. Currently, as a workaround, I'm recursively checking all objects and their children and looking for TLabels with stylelookup the style that I want, and changing the fill color of the rectangle in the style. There should be a better way, i.e. just change the fill color of the style in the stylebook. This is the code I'm currently using as a workaround:

    procedure ChangeAllLabelStyles(ChangeToColor: Cardinal);
    
      procedure ChangeObjectRecursive(CurrentComponent: TComponent);
      var
         i: Integer;
      begin
           if CurrentComponent.ClassNameIs('TLabel') and (TLabel(CurrentComponent).StyleLookup = 'RedButtonLabelStyle') then 
              TLabel(CurrentComponent).StylesData['Rectangle1Style.Fill.Color']:= ChangeToColor;
              
           for i:= 0 To CurrentComponent.ComponentCount - 1 do ChangeObjectRecursive(CurrentComponent.Components[i]);
      end;
    
    begin
         ChangeObjectRecursive(Self);
    end;

     


  12. How can I programmatically change properties of a custom style?

     

    Basically, I have created a custom style for TLabel and have added a rectangle to be able to control its background. How can I programmatically change its color so that all TLabels that have that style are automatically updated with the new color?


  13. 2 minutes ago, Hans♫ said:

    I don't know when (or if) Apple will make it a requirement to use the Storyboard, but so far you can still use the old way that Delphi supports right now. We are not using the storyboard solution in our app, and that is still accepted by Apple. Its only one week ago we uploaded the last update.

    This is an email I received a couple of days ago.

     

    Dear Mike,

    We greatly value the worldwide developer community, and appreciate your commitment to making a difference in people’s lives through the power of technology. To accommodate developers who may need additional time to update their existing apps on the App Store, the deadline for adhering to the requirements below has been extended to June 30, 2020.

    • Apps for iPhone or iPad must be built with the iOS 13 SDK or later and use an Xcode storyboard to provide the app’s launch screen.
    • iPhone apps must support all iPhone screens and all iPad apps must support all iPad screens.
    • Apps for Apple Watch must be built with the watchOS 6 SDK or later.
    • Apps that authenticate or set up user accounts must support Sign in with Apple if required by guideline 4.8 of the App Store Review Guidelines.
    • Apps in the Kids category must be in full compliance with guideline 1.3 and guideline 5.1.4. of the App Store Review Guidelines.
    • Apps using HTML 5 must be in full compliance with guideline 4.7 sections 4, 5, and 6 of the App Store Review Guidelines.

    Thank you for your continuing efforts to serve your users during this time. If you have any questions, contact us.

    Read the App Store Review Guidelinesarrow_2x.gif

    Learn about submitting appsarrow_2x.gif

    Best regards,
    Apple Developer Relations

     

    The initial deadline was the April 29.

     

    So, obviously, we have an issue here with the first and 4th points.

     

    Any input would be appreciated.


  14. Hi

     

    I've added a file to the deployment manager which is being copied to a specific folder on iOS and Android. When the user runs the app for the first time, I'm copying that file to another folder on the device and then deleting the original file. This is the problem: while using the app, the file is being deleted OK. But every time the app is run again, the file is reappearing.

     

    How can I permanently delete a file from a specific folder?

     

    Kindly advise


  15. I changed my Interbase connection from IBLite to IBTogo. Now, if I run the app without the "-cleaninstall" in the Run parameters, it works fine on the device. If I create a bundle (32 & 64-bit) and upload it to the Google Play Store, I'm getting the same error: "product INTERBASE is not licensed". Have in mind that this is ONLY if the app is already installed and is updating; not when the user is installing it for the first time.

     

    I'm out of ideas.


  16. Hi

     

    After upgrading to Delphi Rio 10.3.3, I have an issue with IBLite licensing on Android devices (haven't checked on iOS). The issue is the following. When a user downloads the app for the first time, it runs perfectly fine. When they update the app (if they have it already installed on their phone), they get the "product INTERBASE is not licensed" exception. In the same way, during development, if I do a "clean install", everything works fine. If I don't I'm getting the same error.

     

    Most probably, there is a file on the existing app that is not being overwritten during the update because it is newer then the file on the updated app. The files needed for IBLite are the following: 

     

    - reg_iblite.txt

    - ibconfig

    - admin.ib

    - license.txt

    - oss_license_notice.txt

    - interbase.msg

     

    I even changed the date on my PC, modified the files above to have a future datestamp and tried again. Same error.

     

    Is there something I'm missing?

     

    Kindly advise

×