简体   繁体   中英

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 ? App1 is looking to query which version of App2 got installed.

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.

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.

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.

Here is some information I found in other posts: Other post Apple's File System Programming Guide

I think the only thing is passing text or files to apps which can handle the filetype you want to access (text -> Whatsapp). You can do this by using the UIDocumentInteractionController or by calling an url by the URL :

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM