@@ -263,6 +263,48 @@ def build_package(self):
263263 'displayImageURL' : display_image_url ,
264264 'fullSizeImageURL' : full_size_image_url ,
265265 }
266+ # Permissions and their Justification Descriptions
267+ local_network_usage_description = self .buildozer .config .getdefault (
268+ "app" , "ios.local_network_usage_description" , None )
269+ media_usage_description = self .buildozer .config .getdefault (
270+ "app" , "ios.media_usage_description" , None )
271+ camera_usage_description = self .buildozer .config .getdefault (
272+ "app" , "ios.camera_usage_description" , None )
273+ viewcontroller_based_statusbar_appearance = self .buildozer .config .getdefault (
274+ "app" , "ios.viewcontroller_based_statusbar_appearance" , None )
275+
276+
277+ #types
278+ custom_ext_types = self .buildozer .config .getdefault ("app" , "ios.app_extensions" , None )
279+
280+ if media_usage_description :
281+ plist ['NSAppleMusicUsageDescription' ] = media_usage_description
282+ if local_network_usage_description :
283+ plist ['NSLocalNetworkUsageDescription' ] = local_network_usage_description
284+ if camera_usage_description :
285+ plist ['NSCameraUsageDescription' ] = camera_usage_description
286+ if viewcontroller_based_statusbar_appearance :
287+ plist ['UIViewControllerBasedStatusBarAppearance' ] = viewcontroller_based_statusbar_appearance
288+ if custom_ext_types :
289+ import ast
290+ custom_ext_types = ast .literal_eval (custom_ext_types )
291+ for ext in custom_ext_types :
292+ plist ["UTExportedTypeDeclarations" ] = [{
293+ 'UTTypeConformsTo' : ext [1 ],
294+ 'UTTypeIdentifier' : ext [2 ],
295+ 'UTTypeDescription' : ext [3 ],
296+ 'UTTypeIconFile' : ext [4 ],
297+ 'UTTypeReferenceURL' : ext [5 ],
298+ 'UTTypeTagSpecification' :{'public.filename-extension' : ext [0 ]},}]
299+ plist ["CFBundleDocumentTypes" ] = [{
300+ "CFBundleTypeName" : ext [3 ],
301+ "CFBundleTypeIconFile" : ext [4 ],
302+ "CFBundleTypeRole" : "Editor" ,
303+ "LSHandlerRank" : "Owner" ,
304+ "LSItemContentTypes" : [ext [2 ]],}]
305+ plist ["LSSupportsOpeningDocumentsInPlace" ] = "NO"
306+ plist ["UISupportsDocumentBrowser" ] = "NO"
307+
266308
267309 # ok, write the modified plist.
268310 self .dump_plist_to_file (plist , plist_rfn )
0 commit comments