How to check if an application runs in Xojo Cloud

  1. 6 months ago

    Marco V

    Apr 21 Pre-Release Testers, Xojo Pro

    Dear All

    Does anyone know how can I easily check during runtime if an application uses/runs under Xojo Cloud?
    Any advice highly appreciated.

    Best regards from Zurich
    Marco

    @Marco V Dear All

    Does anyone know how can I easily check during runtime if an application uses/runs under Xojo Cloud?
    Any advice highly appreciated.

    Best regards from Zurich
    Marco

    There is a constant available named TargetXojoCloud which will only return True when an app was built and deployed to Xojo Cloud. You can either use that in a regular "if" statement, or as part of a compiler directive:

    #if TargetXojoCloud
    
    #endif

    To include/exclude code from the built app entirely.

  2. Greg O

    Apr 21 Xojo Inc Answer Somewhere near Raleigh, NC

    @Marco V Dear All

    Does anyone know how can I easily check during runtime if an application uses/runs under Xojo Cloud?
    Any advice highly appreciated.

    Best regards from Zurich
    Marco

    There is a constant available named TargetXojoCloud which will only return True when an app was built and deployed to Xojo Cloud. You can either use that in a regular "if" statement, or as part of a compiler directive:

    #if TargetXojoCloud
    
    #endif

    To include/exclude code from the built app entirely.

  3. Marco V

    Apr 23 Pre-Release Testers, Xojo Pro

    Thank you Greg for this information.

    Best regards, Marco

or Sign Up to reply!