简体   繁体   English

是否可以在iOS中读取已安装应用的info.plist?

[英]Is it possible to read an installed app's info.plist in iOS?

Is it possible to read any info from installed apps in iOS, like reading App2's info.plist file from App1 ? 是否可以从iOS中已安装的应用程序中读取任何信息,例如从App1中读取App2的 info.plist文件? App1 is looking to query which version of App2 got installed. App1正在查询安装了哪个版本的App2

This is of course an old question, but you haven't specified whether you own (or are the developer of) the other app or not? 这当然是一个老问题,但是您是否尚未指定是否拥有另一个应用程序(或是该应用程序的开发者)?

If you are the developer of both apps, then this can almost be achieved using App Groups. 如果您是这两个应用程序的开发者,那么几乎可以使用应用程序组来实现。

In App2, you could write a file (or even just copy the whole plist) to an "App Group" that's shared between the two apps, and then read it from App1. 在App2中,您可以将文件(甚至只是将整个plist复制)到两个应用程序之间共享的“应用程序组”,然后从App1中读取文件。

Using this method for checking whether App2 had been updated would not work unless App2 had been run since it was updated (or updated the file in the background using Background App Refresh), and also wouldn't work if you're not the developer of App2. 使用此方法来检查App2是否已更新,除非自从App2被更新以来就已运行(或使用Background App Refresh在后台更新文件),否则它将不起作用,并且如果您不是该应用程序的开发者,该方法也将不起作用App2。

Like I see, there is no possibility because every app is working inside a Sandbox which doesn't allow your app to access other apps information. 如我所见,这是不可能的,因为每个应用程序都在Sandbox ,这不允许您的应用访问其他应用信息。

Here is some information I found in other posts: Other post Apple's File System Programming Guide 这是我在其他帖子中找到的一些信息: 其他帖子 Apple的文件系统编程指南

I think the only thing is passing text or files to apps which can handle the filetype you want to access (text -> Whatsapp). 我认为唯一的事情是将文本或文件传递给可以处理您要访问的文件类型的应用程序(文本-> Whatsapp)。 You can do this by using the UIDocumentInteractionController or by calling an url by the URL : 您可以使用UIDocumentInteractionController或通过URL调用url来做到这一点:

[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"whatsapp://"]]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iOS应用无法读取info.plist - iOS app cannot read info.plist 要将此应用配置为iOS路由应用,应用的Info.plist必须包含MKDirectionsApplicationSupportedModes键 - To configure this app as an iOS routing app, the app's Info.plist must contain the MKDirectionsApplicationSupportedModes key 我可以在我的主机应用中阅读我的应用扩展程序的info.plist吗? - Can I read my app extension's info.plist in my host app? iOS 12-“应用程序的Info.plist必须包含NSMicrophoneUsageDescription密钥” - iOS 12 - “The app's Info.plist must contain an NSMicrophoneUsageDescription key” 是否有可能在 Info.Plist 或 iOS 中的权利中添加注释? - Is it possible, good practice, to add comments to Info.Plist, or entitlements in iOS? iOS 应用程序提交 - 存档不包含 info.plist - iOS app submission - archive does not contain an info.plist IOS 应用程序在添加 info.plist 时缺少用途字符串 - IOS app missing purpose string in info.plist while it is added Flutter ios 应用程序提交:Info.plist 中缺少目的字符串 - Flutter ios app submission: Missing Purpose String in Info.plist React Native Expo iOS应用程序 - 尝试修改info.plist - React Native Expo iOS app - trying to modify info.plist 在cordova ios应用程序中将字段添加到info.plist - Add fields to info.plist in cordova ios app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM