You are currently viewing How To Troubleshoot iOS Apps

How To Troubleshoot iOS Apps

If you want to create a perfect app, you need to go through various issues in development that can be solved by troubleshooting.

Let’s instigate to find some common iOS development issues with their possible solutions.

iOS Toolbox

If you are an iOS developer, you must learn the following techniques for debugging the app issues to incorporate them into your workflow while building the app:

Google, the savior!

Wherever you find some issue or error while writing the XCode and couldn’t be able to resolve it by yourself, copy the error and paste it into Google search.

As many developers are using standard iOS toolchain, you just need to update a dependency, run clean, or remove the derived data, and you are done.

Clean/Rebuild

Cleaning and rebuilding the XCode can fix most of the build issues. Navigate to Product a Clean Build Folder in the menu of XCode to clean your current build.

Remove Derived Data

Your XCode sometimes uses the old data and builds artifacts. Make a fresh start by removing the derived data on the disk.

For this, open XCode preferences, go to the location tab and click the arrow you see next to Derived Data. A Finder window will open at the location of XCode’s temporary Derived Data. Select all the items from this directory and delete them. After deleting, do a rebuild in XCode.

Error: Sandbox is not synced with the Podfile.lock

When the CocoaPods are not able to run to install dependencies then the above error occurs.

Run the following command to update your CocoaPods:

npx cap update ios

Do a rebuild after running this command.

Forever Indexing

The XCode of your app gets stuck in indexing and you are unable to perform anything.

To fix this, Force Close XCode using Activity Monitor and then start it again.

Apple Silicon: ffi Bus Error

If you are working on Apple Silicon-powered Mac, you may see the Analyzing dependencies error when you run npx cap update.

This is a CocoaPods error that occurs due to ffi not installing on M1. For this, install Rosetta then install ffi on a x86_64 architecture, then run pod install using the simulated Intel architecture.

$ sudo arch -x86_64 gem install ffi

$ arch -x86_64 pod install

After this, run your app again.

Failed to connect to GitHub

If you are using an old version of openssl and ruby on your Mac then you may encounter this error as the cryptographic protocols are restricted by GitHub when you access repos.

To fix this, update openssl and update ruby:

brew install openssl

brew upgrade openssl

brew install ruby

brew link –overwrite ruby

Lastly, make sure that the environment variable /usr/local/bin is being put before $PATH.

Plugin Not Implemented

If the app does not find the plugins or is unable to inject its code into the WebView, then a plugin error occurred.

Firstly, make sure that the plugin is installed and present in the package.json file. Then run npx cap update ios and lastly, check that the plugin is in ios/App/Podfile.

If you are building an Android app, make sure to check How to Troubleshoot Android Apps.

This Post Has One Comment

Leave a Reply