Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

205
Visualizações
Check if Apple LiveText is available?

I want to add apple live text support using a scan button. But I know that it is available for iOS 15+ and A12 processors and above. How do I check that in Swift?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Don't check for the iOS 15+ and processor A12+, check for the iOS 15's 'Live Text'feature support. Create a helper method with the following check that will return whether the device support live text or not


Sample:

var isSupported = true
if #available(iOS 15.0, *) {
    let check = UITextField().canPerformAction(#selector(UIResponder.captureTextFromCamera(_:)), withSender: nil)
    isSupported = check
} else {
    isSupported = false
}

print(isSupported)

Using the above condition will return false in the case of the device having iOS 15+ but not having hardware support.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda