AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Cross-Platform-Entwicklung iOS Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7
Thema durchsuchen
Ansicht
Themen-Optionen

Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7

Ein Thema von jayjay77 · begonnen am 15. Sep 2020 · letzter Beitrag vom 16. Sep 2020
Antwort Antwort
jayjay77

Registriert seit: 29. Okt 2013
7 Beiträge
 
Delphi 10.4 Sydney
 
#1

Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7

  Alt 15. Sep 2020, 08:16
Hallo Zusammen,

vielleicht könnt Ihr mir helfen, im Netzt finde ich immer nur Infos zu Android Apps.


Ich habe das von Embarcadero mitgelieferte CameraComponent Demo erzeugt und auf das iPad übertragen.
C:\Users\Public\Documents\Embarcadero\Studio\21.0\ Samples\Object Pascal\Mobile Snippets\CameraComponent

Die App bekommt keine Berechtigung auf die Kamera zuzugreifen?

Delphi Meldung:
Im Projekt ...ist eine Exception der Klasse ECaptureDeviceException mit der Meldung " aufgetreten

iPad Meldung:
Fehler Keine Berechtigung zum Aufzeichnen von Video

ipad 13.7
Delphi 10.4.1 Pro
MacOS 10.15.6
PAServer 12.1.10.3

Die info.plist.TemplateiOS.xml Datei habe ich auch angepasst.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<%VersionInfoPListKeys%>
<%ExtraInfoPListKeys%>
 <key>NSCameraUsageDescription</key>
 <string>This app needs access to camera</string>
<%StoryboardInfoPListKey%>
</dict>
</plist>

hier die CameraComponent.info.plist Datei
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>CFBundleName</key>
   <string>CameraComponent</string>
   <key>CFBundleDevelopmentRegion</key>
   <string>en</string>
   <key>CFBundleDisplayName</key>
   <string>CameraComponent</string>
   <key>CFBundleIdentifier</key>
   <string>XXXXXXXXXXXX</string>
   <key>CFBundleInfoDictionaryVersion</key>
   <string>7.1</string>
   <key>CFBundleVersion</key>
   <string>1.0.0</string>
   <key>CFBundleShortVersionString</key>
   <string>1.0.0</string>
   <key>CFBundlePackageType</key>
   <string>APPL</string>
   <key>CFBundleSignature</key>
   <string>????</string>
   <key>LSRequiresIPhoneOS</key>
   <true/>
   <key>CFBundleAllowMixedLocalizations</key>
   <true/>
   <key>CFBundleExecutable</key>
   <string>CameraComponent</string>
   <key>UIDeviceFamily</key>
   <array>
      <integer>1</integer>
      <integer>2</integer>
   </array>
   <key>NSLocationAlwaysUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>NSLocationWhenInUseUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>UIBackgroundModes</key>
   <array>
   </array>
   <key>NSContactsUsageDescription</key>
   <string>The reason for accessing the contacts</string>
   <key>NSPhotoLibraryUsageDescription</key>
   <string>The reason for accessing the photo library</string>
   <key>NSPhotoLibraryAddUsageDescription</key>
   <string>The reason for adding to the photo library</string>
   <key>NSCameraUsageDescription</key>
   <string>The reason for accessing the camera</string>
   <key>NSFaceIDUsageDescription</key>
   <string>The reason for accessing the face id</string>
   <key>NSMicrophoneUsageDescription</key>
   <string>The reason for accessing the microphone</string>
   <key>NSSiriUsageDescription</key>
   <string>The reason for accessing Siri</string>
   <key>ITSAppUsesNonExemptEncryption</key>
   <false/>
   <key>NSBluetoothAlwaysUsageDescription</key>
   <string>The reason for accessing bluetooth</string>
   <key>NSBluetoothPeripheralUsageDescription</key>
   <string>The reason for accessing bluetooth peripherals</string>
   <key>NSCalendarsUsageDescription</key>
   <string>The reason for accessing the calendar data</string>
   <key>NSRemindersUsageDescription</key>
   <string>The reason for accessing the reminders</string>
   <key>NSMotionUsageDescription</key>
   <string>The reason for accessing the accelerometer</string>
   <key>NSSpeechRecognitionUsageDescription</key>
   <string>The reason for requesting to send user data to Apple's speech recognition servers</string>

   <key>UISupportedInterfaceOrientations</key>
   <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
   </array>
   <key>UISupportedInterfaceOrientations~ipad</key>
   <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
   </array>
   <key>NSAppTransportSecurity</key>
   <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
   </dict>
   <key>UIRequiredDeviceCapabilities</key>
   <array>
      <string>arm64</string>
   </array>
   <key>CFBundleSupportedPlatforms</key>
   <array>
      <string>iPhoneOS</string>
   </array>
   <key>MinimumOSVersion</key>
   <string>11.0</string>

<key>NSPhotoLibraryUsageDescription</key>
<string>XXX requires access to your photo library</string>
<key>NSCameraUsageDescription</key>
<string>XXX requires access to your phone&#11488;camera to scan QR tags</string>
   <key>UILaunchStoryboardName</key>
   <string>LaunchScreen</string>

</dict>
</plist>
Evtl könnt Ihr das original Demo auch mal mit 10.4.1 testen.
Mit Delphi 10.3.3 hat das alles noch funktioniert.

Danke und Grüße

Geändert von jayjay77 (15. Sep 2020 um 09:31 Uhr)
  Mit Zitat antworten Zitat
Rollo62

Registriert seit: 15. Mär 2007
3.901 Beiträge
 
Delphi 12 Athens
 
#2

AW: Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7

  Alt 15. Sep 2020, 09:31
Ich habe jetzt kein 13.7 installiert, nur 13.6, ich hoffe da ist keine Änderung drin.

Am Besten löschst Du nochmal die
info.plist.TemplateiOS.xml
Entitlement.TemplateiOS.xml
Dateien, die legt sich Rx10.4.1 dann neu an.

Wenn Du vorher mit 10.3.3 darauf zugegriffen hattest sind dort womöglich die alten Daten drin (das geht dann natürlich nicht).
Das frisch installierte Sample bei mir hat keine Template-Dateien drin,
es sollte diese also immer erstmalig neu anlegen, das ist eine gute Idee.

Weiterhin muss man nicht im Template was ändern, sondern nur in der VersionInfo den
Key NSCameraUsageDescription anpassen "The app needs camera to take pictures".
Am Besten gleich unter "Alle Konfigurationen", damit DEBUG/RELEASE richtig stehen.

Bei mir lief das Demo CameraComponent.dproj damit korrekt durch, und fragte auch nach der Berechtigung.
  Mit Zitat antworten Zitat
jayjay77

Registriert seit: 29. Okt 2013
7 Beiträge
 
Delphi 10.4 Sydney
 
#3

AW: Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7

  Alt 15. Sep 2020, 13:06
es geht leider immer noch nicht.

wann kam bei dir die Nachfrage, beim Appstart oder beim klick auf Start in der App?

im Anhang mal die Version Info.

kannst du bitte mal deine CameraComponent.info.plist posten?

Hier meine:
C:\Users\Public\Documents\Embarcadero\Studio\21.0\ Samples\Object Pascal\Mobile Snippets\CameraComponent\iOSDevice64\Debug\
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>CFBundleName</key>
   <string>CameraComponent</string>
   <key>CFBundleDevelopmentRegion</key>
   <string>en</string>
   <key>CFBundleDisplayName</key>
   <string>CameraComponent</string>
   <key>CFBundleIdentifier</key>
   <string>xxxxxxxxxx</string>
   <key>CFBundleInfoDictionaryVersion</key>
   <string>7.1</string>
   <key>CFBundleVersion</key>
   <string>1.0.0</string>
   <key>CFBundleShortVersionString</key>
   <string>1.0.0</string>
   <key>CFBundlePackageType</key>
   <string>APPL</string>
   <key>CFBundleSignature</key>
   <string>????</string>
   <key>LSRequiresIPhoneOS</key>
   <true/>
   <key>CFBundleAllowMixedLocalizations</key>
   <true/>
   <key>CFBundleExecutable</key>
   <string>CameraComponent</string>
   <key>UIDeviceFamily</key>
   <array>
      <integer>1</integer>
      <integer>2</integer>
   </array>
   <key>NSLocationAlwaysUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>NSLocationWhenInUseUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>UIBackgroundModes</key>
   <array>
   </array>
   <key>NSContactsUsageDescription</key>
   <string>The reason for accessing the contacts</string>
   <key>NSPhotoLibraryUsageDescription</key>
   <true/>
   <key>NSPhotoLibraryAddUsageDescription</key>
   <string>The reason for adding to the photo library</string>
   <key>NSCameraUsageDescription</key>
   <true/>
   <key>NSFaceIDUsageDescription</key>
   <string>The reason for accessing the face id</string>
   <key>NSMicrophoneUsageDescription</key>
   <string>The reason for accessing the microphone</string>
   <key>NSSiriUsageDescription</key>
   <string>The reason for accessing Siri</string>
   <key>ITSAppUsesNonExemptEncryption</key>
   <false/>
   <key>NSBluetoothAlwaysUsageDescription</key>
   <string>The reason for accessing bluetooth</string>
   <key>NSBluetoothPeripheralUsageDescription</key>
   <string>The reason for accessing bluetooth peripherals</string>
   <key>NSCalendarsUsageDescription</key>
   <string>The reason for accessing the calendar data</string>
   <key>NSRemindersUsageDescription</key>
   <string>The reason for accessing the reminders</string>
   <key>NSMotionUsageDescription</key>
   <string>The reason for accessing the accelerometer</string>
   <key>NSSpeechRecognitionUsageDescription</key>
   <string>The reason for requesting to send user data to Apple's speech recognition servers</string>

   <key>UISupportedInterfaceOrientations</key>
   <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
   </array>
   <key>UISupportedInterfaceOrientations~ipad</key>
   <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
   </array>
   <key>NSAppTransportSecurity</key>
   <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
   </dict>
   <key>UIRequiredDeviceCapabilities</key>
   <array>
      <string>arm64</string>
   </array>
   <key>CFBundleSupportedPlatforms</key>
   <array>
      <string>iPhoneOS</string>
   </array>
   <key>MinimumOSVersion</key>
   <string>11.0</string>

   <key>UILaunchStoryboardName</key>
   <string>LaunchScreen</string>

</dict>
</plist>
Miniaturansicht angehängter Grafiken
ioss.jpg  
  Mit Zitat antworten Zitat
Rollo62

Registriert seit: 15. Mär 2007
3.901 Beiträge
 
Delphi 12 Athens
 
#4

AW: Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7

  Alt 15. Sep 2020, 13:51
Ich glaube die Abfrage kam beim Drücken auf Start, weiss nicht mehr genau.

Das Template:
Zitat:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<%VersionInfoPListKeys%>
<%ExtraInfoPListKeys%>
<%StoryboardInfoPListKey%>
</dict>
</plist>
die plist
Delphi-Quellcode:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>CFBundleName</key>
   <string>CameraComponent</string>
   <key>CFBundleDevelopmentRegion</key>
   <string>en</string>
   <key>CFBundleDisplayName</key>
   <string>CameraComponent</string>
   <key>CFBundleIdentifier</key>
   <string>com.Xyz.CameraComponent</string>
   <key>CFBundleInfoDictionaryVersion</key>
   <string>7.1</string>
   <key>CFBundleVersion</key>
   <string>1.0.0</string>
   <key>CFBundleShortVersionString</key>
   <string>1.0.0</string>
   <key>CFBundlePackageType</key>
   <string>APPL</string>
   <key>CFBundleSignature</key>
   <string>????</string>
   <key>LSRequiresIPhoneOS</key>
   <true/>
   <key>CFBundleAllowMixedLocalizations</key>
   <true/>
   <key>CFBundleExecutable</key>
   <string>CameraComponent</string>
   <key>UIDeviceFamily</key>
   <array>
      <integer>1</integer>
      <integer>2</integer>
   </array>
   <key>NSLocationAlwaysUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>NSLocationWhenInUseUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
   <string>The reason for accessing the location information of the user</string>
   <key>UIBackgroundModes</key>
   <array>
   </array>
   <key>NSContactsUsageDescription</key>
   <string>The reason for accessing the contacts</string>
   <key>NSPhotoLibraryUsageDescription</key>
   <string>The reason for accessing the photo library</string>
   <key>NSPhotoLibraryAddUsageDescription</key>
   <string>The reason for adding to the photo library</string>
   <key>NSCameraUsageDescription</key>
   <string>The app needs camera to take pictures</string>
   <key>NSFaceIDUsageDescription</key>
   <string>The reason for accessing the face id</string>
   <key>NSMicrophoneUsageDescription</key>
   <string>The reason for accessing the microphone</string>
   <key>NSSiriUsageDescription</key>
   <string>The reason for accessing Siri</string>
   <key>ITSAppUsesNonExemptEncryption</key>
   <false/>
   <key>NSBluetoothAlwaysUsageDescription</key>
   <string>The reason for accessing bluetooth</string>
   <key>NSBluetoothPeripheralUsageDescription</key>
   <string>The reason for accessing bluetooth peripherals</string>
   <key>NSCalendarsUsageDescription</key>
   <string>The reason for accessing the calendar data</string>
   <key>NSRemindersUsageDescription</key>
   <string>The reason for accessing the reminders</string>
   <key>NSMotionUsageDescription</key>
   <string>The reason for accessing the accelerometer</string>
   <key>NSSpeechRecognitionUsageDescription</key>
   <string>The reason for requesting to send user data to Apple's speech recognition servers</string>

   <key>UISupportedInterfaceOrientations</key>
   <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
   </array>
   <key>UISupportedInterfaceOrientations~ipad</key>
   <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
      <string>UIInterfaceOrientationLandscapeRight</string>
   </array>
   <key>NSAppTransportSecurity</key>
   <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
   </dict>
   <key>UIRequiredDeviceCapabilities</key>
   <array>
      <string>arm64</string>
   </array>
   <key>CFBundleSupportedPlatforms</key>
   <array>
      <string>iPhoneOS</string>
   </array>
   <key>MinimumOSVersion</key>
   <string>11.0</string>

   <key>UILaunchStoryboardName</key>
   <string>LaunchScreen</string>

</dict>
</plist>
Ich sehe gerade das Projekt war nicht ganz jungfräulich, ich hatte schonmal eine andere BundleID eingegeben.
Ich hatte es wohl hier schonmal ausprobiert.

Geändert von Rollo62 (15. Sep 2020 um 14:24 Uhr)
  Mit Zitat antworten Zitat
jayjay77

Registriert seit: 29. Okt 2013
7 Beiträge
 
Delphi 10.4 Sydney
 
#5

AW: Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7

  Alt 16. Sep 2020, 06:40
Leider keine Verbesserung.
Kann es evtl auch an den Entwicklerlizenzen von Apple liegen?
Das hier ein Zertifikat oder Identifiers fehlt?
Unter Windows und Android geht die App.
  Mit Zitat antworten Zitat
Rollo62

Registriert seit: 15. Mär 2007
3.901 Beiträge
 
Delphi 12 Athens
 
#6

AW: Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7

  Alt 16. Sep 2020, 06:58
Leider keine Verbesserung.
Kann es evtl auch an den Entwicklerlizenzen von Apple liegen?
Das hier ein Zertifikat oder Identifiers fehlt?
Unter Windows und Android geht die App.
Ja natürlich.
Provisioning Files und Permissions sind meistens die Ursache für Probleme.
Bei der Entwicklung ist das aber noch nicht so relevant, erst beim AppStore.
Es gibt aber gute Anleitungen dazu von Embarcadero im DocWiki.
Das würde ich mal Schritt für Schritt kontrollieren.

Ansonsten gibt es noch andere Samples mit Kamera, zum Testen.
Je einfacher desto besser.
  Mit Zitat antworten Zitat
jayjay77

Registriert seit: 29. Okt 2013
7 Beiträge
 
Delphi 10.4 Sydney
 
#7

AW: Sample CameraComponent keine Berechtigung Delphi 10.4.1 iOS13.7

  Alt 16. Sep 2020, 09:00
so, es gibt Neuigkeiten,
das andere Embarcadero Demo AccessCameraApp funktioniert.
C:\Users\Public\Documents\Embarcadero\Studio\21.0\ Samples\Object Pascal\Mobile Snippets\AccessCameraApp\AccessCameraApp

Hier kommt die Nachfrage, ob Zugriff auf die Kamera gegeben werden soll.
Allerdings nutzt das Demo nicht die TCameraComponent Komponente.
Es muss wohl an der TCameraComponent Komponente liegen,
da diese nicht in das Ereignis SampleBufferReady springt und somit wird diese Berechtigung nicht angefragt.

Wenn ich den Zugriff auf die Kamera von der AccessCamera App zulasse und danach die CameraComponent App starte habe ich Zugriff auf die Kamera.
Lösche ich die CameraComponent App und die AccessCamera App vom iPad,
übertrage die CameraComponent App neu und starte sie kommt keine Abfrage und der Zugriff ist auch wieder weg.

Evtl kommt da ein Fix für die TCameraComponent von Embarcadero.

Geändert von jayjay77 (16. Sep 2020 um 09:10 Uhr)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:57 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz