macOS SDK Troubleshooting
Important
Visual Studio App Center is scheduled for retirement on March 31, 2025. While you can continue to use Visual Studio App Center until it is fully retired, there are several recommended alternatives that you may consider migrating to.
Issues during setup
- In the console, look for an Assert log with the message - "App Center SDK configured successfully". This verifies that the SDK is configured successfully.
- If you're using Cocoapods to integrate App Center in your macOS app and run into an error with the message -
CocoaPods - Unable to find a specification for AppCenter
, runpod repo update
to update your local Cocoapods repository and then runpod install
again. - If you're integrating the SDK binaries manually, make sure your modules are enabled for your project.
Analytics data doesn't show up in the portal.
Make sure you've integrated the SDK modules correctly.
Make sure the correct App Secret is included along with the
start:withServices:
method call. You can copy the exactstart:withServices:
-code by opening the app in the portal and navigating to Getting Started page.If you want to see the logs sent to the backend, change the log level to Verbose in your application and the SDK will print the logs in the Console. Insert the following call before the SDK start:
[MSACAppCenter setLogLevel:MSACLogLevelVerbose]
AppCenter.logLevel = .verbose
Make sure "App Center SDK configured successfully" appears in the logs (at INFO log level), then check if you see HTTPS request logs.
Make sure your device is online and the app has internet access.
Note
If your app is using the App Sandbox, you must set the capability to allow incoming (Server) and outgoing (Client) connections to allow the app to have access to the internet. Xcode 9 enables the App Sandbox by default but the capabilities for incoming and outgoing connections need to be set explicitly.
Select your project in the project navigator, select the Capabilities tab and if your app is using the sandbox, add the capabilities for incoming and outgoing connections.
Sometimes, logs might take a few minutes to surface in the portal. Wait for some time if that’s the case.
To check if App Center backend has received your data, go to the Log flow section in Analytics service. Your events should appear once it's been sent.
Crashes don't show up in the portal.
Make sure you've integrated the SDK modules correctly.
Make sure the correct app secret is included along with the
start:withServices:
method call. You can copy the exactstart:withServices:
code by opening the app in the portal and navigating to Getting Started page.Restart the app after a crash. App Center Crashes will forward the crash log only after the app is restarted. Also, the SDK won't forward any crash logs if you're attached to the debugger. Make sure the debugger isn't attached when you crash the app.
If you want to see the logs sent to the backend, change the log level to Verbose in your application and the SDK will print the logs in the Console. Insert the following call before the SDK start:
[MSACAppCenter setLogLevel:MSACLogLevelVerbose]
AppCenter.logLevel = .verbose
Make sure "App Center SDK configured successfully" appears in the logs (at INFO log level), then check if you see HTTPS request logs.
Don't use any other libraries that provide Crash Reporting functionality. You can only have one crash reporting SDK integrated in your app.
Make sure your device is online and the app has internet access.
Note
If your app is using the App Sandbox, you must set the capability to allow incoming (Server) and outgoing (Client) connections to allow the app to have access to the internet. Xcode 9 enables the App Sandbox by default but the capabilities for incoming and outgoing connections need to be set explicitly.
Select your project in the project navigator, select the Capabilities tab and if your app is using the sandbox, enable incoming and outgoing connections.
At times, logs might take few minutes to surface in the portal. Wait for some time if that’s the case.
If you want to check if the SDK detected the crash on the next app start, you can call the API to check whether the app crashed in the last session and shows an alert. Or you can extend the crash
didSucceedSendingErrorReport
callback to see if it was successfully sent to the server.To check if App Center backend received the crash, go to the Log flow section in the Analytics service. Your crashes should appear there, once it's been sent.
Protect the App Center secret value
The app_secret
is an identifier of your app, it's required to know which app the traffic applies to and it can not be used to retrieve or edit existing data. If your app_secret
is exposed, the biggest risk is sending bad data to your app, but it won't have an effect on the security of the data.
To retrieve any sensitive data, you'd need to provide an app/user token, which is generated on the client’s side. There's no way to make data on the client's side completely secure.
You can improve your app's security by using an environment variable to inject the app secret into your code. That way, the secret isn't visible in your code.