CFBundleDocumentType ne fonctionne pas dans le file myproject-Info.plist

J'essaye de build une application dans le ionic framework.

J'essaye de build cette fonctionnalité comme quand je clique sur la photo de la galerie et clique sur le partage Un panoramique de partage s'ouvrira. Je veux montrer mon application ici.

J'ai fait quelques modifications dans un file plist

voici le code de mon file plist

<?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>CFBundleDevelopmentRegion</key> <ssortingng>English</ssortingng> <key>CFBundleDisplayName</key> <ssortingng>${PRODUCT_NAME}</ssortingng> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <ssortingng>public.jpeg</ssortingng> <key>CFBundleTypeRole</key> <ssortingng>Editor</ssortingng> <key>LSHandlerRank</key> <ssortingng>Owner</ssortingng> <key>LSItemContentTypes</key> <array> <ssortingng>public.jpeg</ssortingng> </array> </dict> </array> <key>CFBundleExecutable</key> <ssortingng>${EXECUTABLE_NAME}</ssortingng> <key>CFBundleIconFile</key> <ssortingng>icon.png</ssortingng> <key>CFBundleIcons</key> <dict> <key>CFBundlePrimaryIcon</key> <dict> <key>CFBundleIconFiles</key> <array> <ssortingng>icon-40</ssortingng> <ssortingng>icon-small</ssortingng> <ssortingng>icon-60</ssortingng> <ssortingng>icon.png</ssortingng> <ssortingng>icon@2x</ssortingng> <ssortingng>icon-72</ssortingng> <ssortingng>icon-72@2x</ssortingng> </array> <key>UIPrerenderedIcon</key> <false/> </dict> </dict> <key>CFBundleIcons~ipad</key> <dict> <key>CFBundlePrimaryIcon</key> <dict> <key>CFBundleIconFiles</key> <array> <ssortingng>icon-small</ssortingng> <ssortingng>icon-40</ssortingng> <ssortingng>icon-50</ssortingng> <ssortingng>icon-76</ssortingng> <ssortingng>icon-60</ssortingng> <ssortingng>icon</ssortingng> <ssortingng>icon@2x</ssortingng> <ssortingng>icon-72</ssortingng> <ssortingng>icon-72@2x</ssortingng> </array> <key>UIPrerenderedIcon</key> <false/> </dict> </dict> <key>CFBundleIdentifier</key> <ssortingng>com.ionicframework.hitutest948556</ssortingng> <key>CFBundleInfoDictionaryVersion</key> <ssortingng>6.0</ssortingng> <key>CFBundleName</key> <ssortingng>${PRODUCT_NAME}</ssortingng> <key>CFBundlePackageType</key> <ssortingng>APPL</ssortingng> <key>CFBundleSignature</key> <ssortingng>????</ssortingng> <key>CFBundleVersion</key> <ssortingng>0.0.1</ssortingng> <key>CFBundleShortVersionSsortingng</key> <ssortingng>0.0.1</ssortingng> <key>LSRequiresIPhoneOS</key> <true/> <key>NSMainNibFile</key> <ssortingng></ssortingng> <key>NSMainNibFile~ipad</key> <ssortingng></ssortingng> <key>UISupportedInterfaceOrientations~ipad</key> <array> <ssortingng>UIInterfaceOrientationPortrait</ssortingng> <ssortingng>UIInterfaceOrientationLandscapeLeft</ssortingng> <ssortingng>UIInterfaceOrientationPortraitUpsideDown</ssortingng> <ssortingng>UIInterfaceOrientationLandscapeRight</ssortingng> </array> <key>UILaunchImages</key> <array> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Portrait</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{320, 480}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Landscape</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{320, 480}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default-568h</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Portrait</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{320, 568}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default-568h</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Landscape</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{320, 568}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default-667h</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Portrait</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{375, 667}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default-667h</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Landscape</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{375, 667}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default-736h</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Portrait</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{414, 736}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default-Landscape-736h</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Landscape</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{414, 736}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default-Portrait</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Portrait</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{768, 1024}</ssortingng> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <ssortingng>8.0</ssortingng> <key>UILaunchImageName</key> <ssortingng>Default-Landscape</ssortingng> <key>UILaunchImageOrientation</key> <ssortingng>Landscape</ssortingng> <key>UILaunchImageSize</key> <ssortingng>{768, 1024}</ssortingng> </dict> </array> </dict> </plist> 

Partie que j'avais ajoutée

  <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <ssortingng>public.jpeg</ssortingng> <key>CFBundleTypeRole</key> <ssortingng>Editor</ssortingng> <key>LSHandlerRank</key> <ssortingng>Owner</ssortingng> <key>LSItemContentTypes</key> <array> <ssortingng>public.jpeg</ssortingng> </array> </dict> </array> 

toute suggestion pour le même. Comme toujours je ne suis pas en mesure de voir myapp dans le volet de partage

Merci

Plusieurs choses sont manquantes / fausses:

  • CFBundTypeIconFiles: Je suis assez suire, vous devez spécifier les icons pour que votre application apparaisse
  • CFBundleTypeName: Vous mettez ici le nom de votre application
  • CFBundleTypeRole: Je pense que vous voulez "Viewer" ici
  • LSHandlerRank: Je pense que vous voulez "Alternate" ici (pas sûr que vous pouvez être quelque chose d'autre pour un type de contenu comme "public.jpeg")

Ceci est un exemple qui fonctionne pour save votre application. Il a été testé et fonctionne pour tous les types de données . Travaillez votre path à partir de là pour cibler uniquement public.jpeg:

 <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeIconFiles</key> <array> <ssortingng>Icon-22x29.png</ssortingng> <ssortingng>Icon-44x58.png</ssortingng> <ssortingng>Icon-64x64.png</ssortingng> <ssortingng>Icon-320x320.png</ssortingng> </array> <key>CFBundleTypeName</key> <ssortingng>My App</ssortingng> <key>CFBundleTypeRole</key> <ssortingng>Viewer</ssortingng> <key>LSHandlerRank</key> <ssortingng>Alternate</ssortingng> <key>LSItemContentTypes</key> <array> <ssortingng>public.data</ssortingng> </array> </dict> </array> 

Définissez UIFileSharingEnabled sur YES . Vous avez manqué de le mettre en plist.

J'espère que cela va résoudre votre problème.