Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   Ios OneNote Client URL aus App öffnen (https://www.delphipraxis.net/212909-ios-onenote-client-url-aus-app-oeffnen.html)

oakley 22. Apr 2023 20:57

Ios OneNote Client URL aus App öffnen
 
Hallo zusammen,

ich bin mal wieder mit OneNote und Ios zu Gange.
Ich lasse per Graph Api die Links zu einzelnen Sektionen aus Notizbüchern auslesen.
Dabei bekomme ich einmal den Weblink und einmal den Clientlink.
Diese sind bis auf eine Kleinigkeit identisch, und zwar wird beim Clientlink nur "onenote:" vorangestellt.
Der Weblink sieht so aus:
https://xxxxxxx.sharepoint.com/sites...20Notebooks%20[1]/04%20-%20Test4.one#Notizen%20-%20Notes&section-id=8c9f6b41-4a75-4d7b-b8c9-2066c85e6c72&page-id=cd09d003-69a3-41a0-bb8d-497db6108ea5&end

Wenn ich mir den Clientlink per Email schicke und drauf klicke, geht sofort der OneNoteClient auf und lädt die entsprechende Seite.

Aus meiner app versuche ich den Clientlink so zu laden:

Delphi-Quellcode:
if SharedApplication.canOpenURL(StrToNSUrl(URL)) then
  SharedApplication.OpenURL(StrToNSUrl(URL));
Es passiert aber nichts. Kann ich irgendwie den installierten OneNote Client direkt ansprechen?

LG

Mirko

Olli73 23. Apr 2023 11:25

AW: Ios OneNote Client URL aus App öffnen
 
Sieht für mich so aus, als ob du eine "Berechtigung" für "onenote:" brauchst:

Important

If you link your app on or after iOS 9.0, you must declare the URL schemes you pass to this method by adding the LSApplicationQueriesSchemes key to your app's Info.plist file. This method always returns false for undeclared schemes, even if the device doesn’t have a registered app installed. Apps linked on or after iOS 15 are limited to a maximum of 50 entries in the LSApplicationQueriesSchemes key. To learn more about the key, see LSApplicationQueriesSchemes.

Rollo62 23. Apr 2023 11:37

AW: Ios OneNote Client URL aus App öffnen
 
Office365 ist nicht OneNote, aber vielleicht ist hier ja irgendein hilfreicher Hinweis für Dich dabei ?
https://github.com/dliocode/sendemail

oakley 23. Apr 2023 12:42

AW: Ios OneNote Client URL aus App öffnen
 
Alles klar, das geht, es muss die Datei die info.plist.TemplateiOS.xml wie folgt bearbeitet werden:

Vor dem letzten </dict> Tag das hier einfügen.

<key>LSApplicationQueriesSchemes</key>
<array>
<string>onenote</string>
</array>

Danke für Eure Hilfe!

LG

Mirko


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:52 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz