IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Composants FMX Delphi Discussion :

[Berlin 10.1.2upg-IOS]Fmx.phonedialer ne fonctionne plus avec Berlin 10.1.2 [iOS]


Sujet :

Composants FMX Delphi

  1. #1
    Membre habitué
    Profil pro
    Développeur informatique
    Inscrit en
    Mars 2002
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mars 2002
    Messages : 391
    Points : 189
    Points
    189
    Par défaut [Berlin 10.1.2upg-IOS]Fmx.phonedialer ne fonctionne plus avec Berlin 10.1.2
    Bonjour

    Très bonne année 2017 a tous

    J'aimerais savoir si vous avez utilisé Fmx.phonedialer avec IOS64 moi j'ai essayé avec mon iPhone 5 Ios32 et ca crash sans erreurs. J'ai lu sur différent site que sa existe depuis Berlin, avez vous réussi a le remplacer par une autre fonction ou il faut attendre que Embarcadero corrige ce bug dans une nouvelle version.

    C'est ce qui me créait des problèmes depuis la mise a jour de Berlin 10.1.2 avant de savoir que c'était mon problème ca pris plusieurs essais.

    Merci

    Mario

  2. #2
    Membre régulier Avatar de Coudrak
    Profil pro
    Inscrit en
    Avril 2002
    Messages
    66
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2002
    Messages : 66
    Points : 90
    Points
    90
    Par défaut
    Ca fait même delpuis 10 Seattle que ça ne marche pas, et ils ne sont pas pressés de corriger, c'est pas comme si déclencher un appel téléphonique était quelque chose d'important sur un téléphone... (no comment)

    Voici l'unité iOSapi.CoreTelephony.pas à inclure dans ton projet qui a été corrigée par quelqu'un :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
     
    {**********************************************************}
    {                                                          }
    {           CodeGear Delphi Runtime Library                }
    {                                                          }
    { Delphi-Objective-C Bridge                                }
    { Interfaces for Cocoa framework CoreTelephony             }
    {                                                          }
    { Copyright (c) 2010, Apple Inc. All rights reserved.      }
    {                                                          }
    { Translator: Embarcadero Technologies, Inc.               }
    { Copyright(c) 2016 Embarcadero Technologies, Inc.         }
    {              All rights reserved                         }
    {                                                          }
    {**********************************************************}
    unit iOSapi.CoreTelephony;
     
    interface
     
    uses Macapi.ObjectiveC, iOSapi.CocoaTypes, iOSapi.Foundation;
     
    // ===== External functions =====
     
    const
      libCoreTelephony = '/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony';
     
     
    type
    {$M+}
    // ===== Forward declarations =====
     
      CTCarrier = interface;
      CTTelephonyNetworkInfo = interface;
      CTCall = interface;
      CTCallCenter = interface;
     
    // ===== Interface declarations =====
     
      CTCarrierClass = interface(NSObjectClass)
        ['{FA14F6EF-18EF-4AE0-A115-5D5819B05A32}']
      end;
      CTCarrier = interface(NSObject)
        ['{7FF111BF-7573-4BD2-881F-0B614DD5C01E}']
        function allowsVOIP: Boolean; cdecl;
        function carrierName: NSString; cdecl;
        function isoCountryCode: NSString; cdecl;
        function mobileCountryCode: NSString; cdecl;
        function mobileNetworkCode: NSString; cdecl;
      end;
      TCTCarrier = class(TOCGenericImport<CTCarrierClass, CTCarrier>)  end;
     
      TCellularProviderNotifier = procedure(const Data: CTCarrier) of object;
      CTTelephonyNetworkInfoClass = interface(NSObjectClass)
        ['{28EB8488-EE8F-4967-B8A8-6BF96AD4382D}']
      end;
      CTTelephonyNetworkInfo = interface(NSObject)
        ['{F75CE940-A78E-4C64-812E-0576386B582D}']
        function subscriberCellularProvider: CTCarrier; cdecl;
        procedure setSubscriberCellularProviderDidUpdateNotifier(Handler: TCellularProviderNotifier); cdecl;
      end;
      TCTTelephonyNetworkInfo = class(TOCGenericImport<CTTelephonyNetworkInfoClass, CTTelephonyNetworkInfo>)  end;
     
      CTCallClass = interface(NSObjectClass)
        ['{1FA8C69C-57FA-4607-ACBA-547C9636312F}']
      end;
      CTCall = interface(NSObject)
        ['{31625956-A516-437B-A385-7DF292D6FB5A}']
        function callID: NSString; cdecl;
        function callState: NSString; cdecl;
      end;
      TCTCall = class(TOCGenericImport<CTCallClass, CTCall>)  end;
     
      TCallEventHandler = procedure(const Data: CTCall) of object;
      CTCallCenterClass = interface(NSObjectClass)
        ['{A28B0E07-ED5A-4C05-82DA-E9FE4073E14D}']
      end;
      CTCallCenter = interface(NSObject)
        ['{0FDB7AC7-B379-4E20-8D72-F1C11EA32EB6}']
        procedure setCallEventHandler(EventHandler: TCallEventHandler); cdecl;
        function currentCalls: NSSet; cdecl;
      end;
      TCTCallCenter = class(TOCGenericImport<CTCallCenterClass, CTCallCenter>)  end;
     
    // exported string consts
     
    function CTCallStateDialing: NSString;
    function CTCallStateIncoming: NSString;
    function CTCallStateConnected: NSString;
    function CTCallStateDisconnected: NSString;
     
    implementation
     
    uses
      Posix.Dlfcn;
     
    var
      CoreTelephonyModule: THandle;
     
    const
      CoreTelephonyFwk: string = '/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony';
     
    function CTCallStateDialing: NSString;
    begin
      Result := CocoaNSStringConst(CoreTelephonyFwk, 'CTCallStateDialing');
    end;
     
    function CTCallStateIncoming: NSString;
    begin
      Result := CocoaNSStringConst(CoreTelephonyFwk, 'CTCallStateIncoming');
    end;
     
    function CTCallStateConnected: NSString;
    begin
      Result := CocoaNSStringConst(CoreTelephonyFwk, 'CTCallStateConnected');
    end;
     
    function CTCallStateDisconnected: NSString;
    begin
      Result := CocoaNSStringConst(CoreTelephonyFwk, 'CTCallStateDisconnected');
    end;
     
    initialization
      CoreTelephonyModule := dlopen(MarshaledAString(libCoreTelephony), RTLD_LAZY);
     
    finalization
      dlclose(CoreTelephonyModule);
     
    end.

  3. #3
    Membre habitué
    Profil pro
    Développeur informatique
    Inscrit en
    Mars 2002
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mars 2002
    Messages : 391
    Points : 189
    Points
    189
    Par défaut [Berlin 10.1.2upg-IOS]Fmx.phonedialer ne fonctionne plus avec Berlin 10.1.2
    Bonjour

    Merci Coudrak pour votre solution.Je vais l'essayé avec l'exemple du PhoneDialer et je vous reviens avec les résultats.


    http://docwiki.embarcadero.com/CodeE...eDialer_Sample


    Mario

  4. #4
    Membre habitué
    Profil pro
    Développeur informatique
    Inscrit en
    Mars 2002
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mars 2002
    Messages : 391
    Points : 189
    Points
    189
    Par défaut [Berlin 10.1.2upg-IOS]Fmx.phonedialer ne fonctionne plus avec Berlin 10.1.2
    Bonjour

    J'ai fais un test avec http://docwiki.embarcadero.com/CodeE...eDialer_Sample

    J'avais remplacé avant le fichier iOSapi.CoreTelephony par le code que vous m'avez donné mais mon application scrach au démarrage.

    Si vous avez fais ce test et que ca fonctionne juste a me le signalé svp.

    Le test a été fait avec

    Berlin 10.1 upg2
    Windows 10
    IPhone 5 version 10.2

    Pa server version 9.00.2.03
    xcode 8.2

    Merci

  5. #5
    Membre régulier Avatar de Coudrak
    Profil pro
    Inscrit en
    Avril 2002
    Messages
    66
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2002
    Messages : 66
    Points : 90
    Points
    90
    Par défaut
    De mémoire il ne faut pas remplacer l'unité existante de Delphi (qui n'est peut-être pas recompilée) mais ajouter celle-là au projet, pour être sûr qu'elle est prise en compte en étant recompilée.

  6. #6
    Membre habitué
    Profil pro
    Développeur informatique
    Inscrit en
    Mars 2002
    Messages
    391
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mars 2002
    Messages : 391
    Points : 189
    Points
    189
    Par défaut [iOS] [Berlin 10.1.2upg-IOS]Fmx.phonedialer ne fonctionne plus avec Berlin 10.1.2
    Bonjour

    Supper ca fonctionne très bien quand on l' ajoute a notre application et recompile. Il me reste a faire l'essais avec mon application et la soumettre a Apple pour la faire approuver.

    Mais ca fonctionne très bien avec le démo http://docwiki.embarcadero.com/CodeE...eDialer_Sample.

    Je vous remercie beaucoup de votre aide Coudrak. Ca va être utile a d'autre utilisateurs du forum.

    Mario

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 1
    Dernier message: 22/10/2017, 11h20
  2. Réponses: 1
    Dernier message: 08/09/2016, 03h54
  3. Responsive ne fonctionne pas avec Android et IOS
    Par fidbell84 dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 02/07/2015, 14h43
  4. [Xe8-IOS] Action ShowShareShettAcrion ne fonctionne pas
    Par mario9 dans le forum Composants FMX
    Réponses: 1
    Dernier message: 12/05/2015, 18h05
  5. [Objective-C] Code qui ne fonctionne plus sous iOS 5
    Par kOrt3x dans le forum Objective-C
    Réponses: 4
    Dernier message: 08/10/2011, 13h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo