Disable crashlytics/Fabric at runtime in iOS - ios

I want to disable the crashlytics at run time in iOS app.
I could see it is possible using the latest Firebase api. How to do this with old Fabric/Crashlytics api?
Update: My app will get locked if the user goes to background, if the app is locked then without user authentication I shouldn't call any api(http request, accessing database). So I want to restrict the crashlytics api as well. When the app comes to foreground, crashlytics/fabric calling the http request so I want to avoid this if the user is not authenticated.

Fabric/Firebaser here - you can conditionally choose to initialize or skip the initialization of Fabric with an opt-in flag set by your user, but there isn't a (supported) way to totally disable Crashlytics from running when it has already been initialized. There is a way, however, to control your submission behavior with Crashlytics, but might not suit your use case. Also, check out these docs for more information on the opt-in/opt-out mentioned above.

Related

IOS: App rejected because of App Tracking Transparency on WebView

I'm working on an app made in React Native with Expo.
It uses a web view to show the site in the app.
Everything worked well, but when I submitted my app to the App Store, it got rejected.
The mail said:
We noticed you collect data to track after the user selects "Ask App
Not to Track" on the App Tracking Transparency permission request.
Specifically, we noticed your app accesses web content you own and
collects cookies for tracking after the user asked you not to track
them.
After that, using the expo tracking transparency library, I added a permission request to track data.
If the user doesn't accept it, I disable third party cookies on the web view.
After submitting again to the App Store, I got the exact same message.
I don't know what to do, because I can't control the site, and I'm limited to the React Native web view props
Maybe, I could enable incognito mode if the user doesn't want the app to track, but I'm not sure if this will be accepted too.
i had the same issue i solved it like this:
change the privacy of the app on apple store, go to app privacy and in data types section click edit and select Identifiers (Device ID) and set this one as used for tracking purposes. and make sure that this is the only one selected as used for tracking.
also make sure that the permission is showing on real device (so test it first on TestFlight).
another thing is you need to tell them where you show this permission send them video to tell them where you show the permission.

iOS: Facebook SDK makes calls to graph.facebook.com even though SDK is not initialized nor used

As the title suggests. Facebook SDK makes calls to graph.facebook.com when checking in Charles even though I'm not initializing the SDK in app delegate and I've removed all calls to the SDK.
I've made sure that there are no other frameworks in my stack which uses Facebook.
How is this even possible? Doesn't the SDK need to be initialized in App Delegate before it can perform any operations? Is there some clever way Facebook can bypass this through listening to notifications or method swizzling?
A user contacted me about this citing GDPR violations which is why I need this to be resolved.
Clarification: I removed the calls just to investigate this issue. I still need it for authentication purposes, but I don't want graph calls to be made upon launch as this is supposedly a violation of GDPR

GDPR consent for Chartboost iOS 8.2.0 SDK

I'm integrating Chartboost into one of my apps. I've done this before, but before GDPR.
In the integration docs, it says to call the "startWithAppId" within the first few seconds of launching an app. Got it. I do that in "didFinishLaunchingWithOptions"
It also says, "Publishers should call the addDataUseConsent API from the Chartboost SDK and pass in the appropriate consent value for GDPR and CCPA. Publishers are required as part of Terms of Service to obtain the consent from their users before Chartboost will process any personal data and pass it to the Chartboost SDK via the above method. This method should be called before startWithAppId if possible."
What's the best way to go about doing that? Grab the self.window.RootViewController, and present my own dialog?
Chartboost's example app does this:
[Chartboost addDataUseConsent:[CHBGDPRDataUseConsent gdprConsent:CHBGDPRConsentBehavioral]];
[Chartboost addDataUseConsent:[CHBCCPADataUseConsent ccpaConsent:CHBCCPAConsentOptInSale]];
before the startWithAppId call, but it needs to ask for permission, not blindly just set those values, right? Or am I missing something here?
For AdMob, I was able to use the PACConsentInformation, but I'm at a loss for what to do with only Chartboost.
Yes that's correct. You need to present your own dialog with CCPA and GDPR information and how it will be used. You can then use their response for those values.
I wouldn't worry too much about calling startWithAppId before showing the dialog. Just set both values to opt-out for the first session then the next time the user opens the app use their responses for the values. I would assume that startWithAppId just needs to be called ASAP for them to track stuff.

Force removal/invalidation of iOS app from user devices

Assuming you created an app that users have downloaded that is just awful and you neither want to fix it nor have anyone continue to use it so that it won't tarnish your brand, is there a way to end its life on user's iOS devices?
Curious if there is some store setting to force it to work with earlier versions of iOS and invalidates the current app, or code that would force an update that says the app is no longer available.
As many have confirmed, there is no way to remove an application from someone's device. For these cases though, many companies have servers that the application sends a request to on launch, that returns either a need to update the app, a message, or to tell the user the app has been discontinued and that the app cannot be used anymore, stopping them from using the app from there on.
The last use case might be useful to you, but of course this is a proactive solution, not a reactive one.

Programmatically using Crashlytics to satisfy GDPR

I'm about to release a scientific iOS app into the App store, for the first time in a few since years. Since I last released an app, GDPR has happened and I'm wondering about the programming mechanics developers are using to satisfy it:
Give the users a choice of enabling Crashlytics/Fabric
Turn off Crashlytics without restarting the iOS app? Is that even possible
Providing a user button to delete the user's data programmatically - is anyone actually using Crashlytics API to do this
The app's backend is Azure based - I don't collect any user data but apparently even Azure collecting IP addresses in a log is sufficient to make my one-person company liable to a fine. Any suggestions how I would programmatically tackle that?
My sense at the moment is to not make my (free) app available in EU territories - Has anyone else given up on EU distribution because of GDPR?
Actually i dont have answer to all your questions, but here are some.
If you want to give user a choice to enable crashlytics or fabric.
First of all, for initialising crashlytics, you use below code normally as :
Crashlytics.start(withAPIKey: kCrashlyticsFabricKey)
Fabric.with([Crashlytics.self])
Now, run this code in selector method of the button that you will provide to enable this in your app.
As per my knowledge, turning of Crashlytics is not possible without restarting app. As crashlytics is never used by "Users" of app, it is used by developer of app to get crash data, so it is simple that developer never wants it to turn off, so Crashltics have provided method as start(withAPIKey:) but no any stop method, and i think there are very less chance that they will provide such methods in near future.
But yes, you have way to stop submitting report. You can subscribe to CrashlyticsDelegate, in which it will give you callback for this method - (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report completionHandler:(void (^)(BOOL submit))completionHandler, here in completionHandler if you provide submit = false, then it will ignore that crash Report.
So, if user have disabled it, then you can stop submitting reports in this way.
No idea about this.
No idea about this too.

Resources