How to work out which frameworks are triggering privacy-sensitive .plist issues - ios

I've got the classic problem of iTunes rejecting my .ipa because it's missing a bunch of .plist entries for 'privacy-senstive data' (in my case calendar, contacts, microphone, Apple Music and Siri!), despite my app having nothing to do with these frameworks.
I want to work out which 3rd party frameworks in my app are triggering this problem, rather than take the easy way out and just add the .plist entries.
Is there a way to analyse your .ipa or the files it contains to work out which 3rd party dependency is causing this issue?
Just to be clear, I understand I could just add the required .plist entries and this problem would go away - my question is specifically how to work out which dependencies are triggering this problem.

despite my app having nothing to do with these frameworks.
Is your Link Behavior in your release configuration set to Don't Link?
If so, the non-stripped Xamarin.iOS.dll references everything and will cause all kinds of privacy/entitlement issues just due to the fact that your app is linked to them but actually never uses them.
The default Release configuration used to be Link Framework SDKs Only (-linksdk) but in the recent releases that does not seem to be the case even though the documentation states that it is.
Change the behavior to Link Framework SDKs Only, create another archive and ipa and see if Apple likes that version ;-)

Related

Firebase Dynamic Links for iOS work for my device and simulators, but do not work for users after release

So I have implemented Firebase Dynamic Links in my app. I thought that I had them set up correctly, because they work for my own personal device and the simulators perfectly. I released the update to the app, but when two of my friends tried to open them after updating to the new version, it takes them to the Firebase website citing an error. I click the same link and it opens my app and handles the link.
Firebase has added the apple app site association to my domain prefix, I have added the a--link in my app's capabilities, I am truly at a loss as to why this may be. Even if they click the link from notes, it does not give them the option to open the link with my app like it will for me.
Is there anything that I could be overlooking? Happy to supply any relevant details but I feel like I have to be missing something.
App Links:
applinks:share.***.app
URL Type is set up in Target Info.
Custom Dynamic Domain is set in info.plist.
For others that come across this, it seems to be an open Apple bug: http://www.openradar.me/radar?id=4999496467480576
After several days, the user's apps downloaded the proper AASA and the deep links began to work. There doesn't seem to be a workaround with Google Dynamic Links, but Branch.io offers forced URI redirect mode to avoid this issue.

iOS build not showing activity tab since April 2020

I have uploaded to my application build on AppStore. But I have found strange issues I can not showing build on activity tab. This is happen starting from April and I got mail
"ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview)."
Then I checked my code I have not use UIWebView in my whole code. Please suggest me what to do.
I got the same issue before.
I have uploaded my app n got the mail related to UIWebview, so I have coverted the UIWebview to WKWebView and again I uploaded the same. But that time same thing happend again build appear for few minute and just disappears from activity tab. I failed to tackle the problem.
Then I mailed to Apple Developer Support and they replied like Any of the third party library internally using some privacy data you should ask permission for the same.
Then I checked Info.plist, I have given each permission in list still how it comes that we don't understand. Finally then after whole search the one third party library internally using motion related data without permission so this happened. Then I have added that in plist and then again uploaded and its approved.
So please first you check for the webview usage and change it to WKWebView if so and then you can check your info.plist and also check whether your third party library using any privacy sensitive data without permission internally or not. May it help you at some point.
SOLVED
I solved my self.
I just write pod 'GoogleSignIn', '~>4.4.0' instead of pod 'GoogleSignIn' and pod update its work. Now I am seen build on Activity tab.

iOS File Retrieval - NSDocumentDirectory

I am working on a library with a very verbose logger module that, on iOS, writes xml logs to NSDocumentDirectory in a consistent file tree. I want to come up with a way for the user of this library to easily access these logs.
I know it is simple to programatically retrieve files from this directory, but is it possible to access this directory on an iOS physical device in any way from outside Xcode to retrieve these logs? I feel like I have seen it somewhere before, something in the manner of extracting the .ipa file and going into the package contents, but I could be wrong.
---------------------------------------------------------EDIT------------------------------------------------------------------
This (Browse the files created on a device by the IOS application I'm developing, on workstation?) is how to do it with Xcode on a device, but I have to assume that there is some way we can create that gets the logs off of a device for a user.
is it possible to access this directory on an iOS physical device in any way from outside Xcode to retrieve these logs?
It is possible to expose the Documents directory by enabling iTunes file sharing. When file sharing is enabled through this method, the contents of Documents directory would be visible to the user in iTunes, which can also be exported. The documents would also be visible for export through some third party desktop apps like iExplorer.
Here is the link to Apple documentation. You may also refer this thread to understand how this is done.
If you're using a simulator (apparently your task doesn't seem to need te real device) you are in luck.
You should go to a folder similar to this one:
/Users/[YOUR_USER_NAME]/Library/Developer/CoreSimulator/Devices/[RANDOM_HASH_YOU_SHOULD_DISCOVER]/data/Containers/Data/Application/[RANDOM_HASH_2_YOU_SHOULD_ALSO_DISCOVER]
Once there, with finder, you'll get the "documents" folder of the simulator and the app you're trying to retrieve your logs from.
You might say: I don't know which 2 RANDOM_HASHES should I go to.
Yes, you're right. If you have MANY simulators installed and or being used, it might be tricky to discover which one is the one you're trying to debug.
The same thing with your APP, your app will live in another RANDOM_HASH folder, and you should browse them, one by one, and then discover your documents folder.
Someone needed to solve this "mess" and created a Xcode Alcatraz Extension that leads you to the exact live simulator and APP you're debugging in any given moment, and then you don't need to guess which 2 random_hash paths you need to navigate to.
If Xcode + Alcartaz plugin extension manager is somewhat out of your reach, you might need to google it. It's not a difficult process.
PS: That magical Alcatraz Extension is named "XCodeWay" (in case you are brave enough to install Alcatraz onto your copy of XCode).
EDIT: Useful link to get Alcatraz: http://alcatraz.io/ Follow its easy instructions and you're done.
EDIT2: If Xcode cannot be used, then the last question in this other thread might come in handy: Browse the files created on a device by the IOS application I'm developing, on workstation?
(Still, an external application in your users machine will be needed )

Will Appstore reviewers allow us to use dynamic library in iOS8?

I read many articles about dynamic library usage including this page "Can you build dynamic library...".
As apple document said, "Frameworks for iOS. iOS developers can now create dynamic frameworks. Frameworks are a collection of code and resources to encapsulate functionality that is valuable across multiple projects. Frameworks work perfectly with extensions, sharing logic that can be used by both the main application and the bundled extensions.", see full page from here.
Taking the security issue as consideration, I got the reject reason of dynamic library before iOS8, see details from "DarkDust's answer". But, how does it "just work" in iOS8? #appstore_reviewers?
Anyway, currently I'm writing a sample demo app and try to upload it to Appstore for review, the main feature is downloading a framework from internet to client and dlopen it. Hope that really "just works"!
Besides, the deployment target is iOS7.0, not sure it could works well in it.
I didn't get a so clear understand on differences between "dynamic library" and "framework", I think they are the same and in this thread I mean "Cocoa-touch framework" which could create in Xcode 6.
Some background: I'm trying to build an iOS app which does't contain extension feature, my cocoa-touch framework is for easy expand without uploading a new version as it comes from internet....
UPDATE
I published a demo project GMDemo here, will try to upload to Appstore.
UPDATE2
I failed to dlopen my dynamic framework with invalid code signing error after many tries in iOS device. Sorry, no good news here. (Almost forgot to update this question, sorry! BTW)
App Store Review Guidelines explicitly prohibit that in 2.4.5 Apps that download code in any way or form will be rejected https://developer.apple.com/app-store/review/guidelines/
UPDATE3 just use the same code signing!!!
I have test it in ad-hoc environment!
when my dynamic library use the code signing with the same code signing,It works,
otherwise,crush!!

Defining Facebook URL Scheme at compile time on iOS

This question could also be a general "How to change info.plist contents at compile-time" but I know it's a complex issue that is handled differently on iOS and MacOSX. The thing is that specifically when working with the Facebook SDK, it feels kind of wrong supplying my FB app-id twice - once in the "URL types" dictionary under "URL schemes" in the app's info.plist and once in my code. I want to be able to change the app-id dynamically from within my code without touching the info.plist file. I looked into Apple's launch services and found a potentially helpful "LSSetDefaultHandlerForURLScheme" method, only to find out that I was looking at the MAC developer library. I saw some other SO questions about this issue but the general opinion seems to be that this is not doable. Any ideas that don't involve pulling information out of the plist at compile time? (I want to be able to support several app-ids that are defined in a specific header file in my code).
Thanks!

Resources