iOS

    Pod init failed in Xcode 16    


    If you ever had issues in getting the pod init or pod install in Xcode 16, this is as a result of changes that have happened in structures as well as settings of the project. There is one of the typical issues, it is all right connected with the project configuration, which is not suitable to the expected environment, CocoaPods.  

    Why does this error occur?

    The problem arises because Xcode 16 is incompatible with CocoaPods in some ways. Some of these include minimizedProjectReferenceProxies and a higher objectVersion in the project.pbxproj file leads to conflict during pod init or pod install.

    Step-by-Step Guide

    1. Make Project Folder as Groups in Xcode

    • Open your project in Xcode.
    • In Project Navigator, you should find your project folder.
    • Go to the project folder and right-click it and press “Convert to Group”. This step is useful for Xcode to understand how the folders are layed out.

     

    This conversion makes sure they are treated as a group instead of folder reference which can be a problem on some occasions when using cocoa pods.

     

    2. Change Project Settings in project .pbxproj

    Originally a problem can lie in the project.pbxproj file, which is contained within the.xcodeproj package. 

    To fix this:

    • Open a folder with your .xcodeproj file and right-click it, then click “Show Package Contents”.

    • Open the project.pbxproj file with any text editor you choose (TextEdit, VSCode, etc.)

    3. Remove Specific Lines

    In the project.pbxproj file, search for and remove the following lines:

    minimizedProjectReferenceProxies = 1;

    Prefer project object version 77.

    These lines can be problematic for CocoaPods to install, therefore their removal solves the problem.

    4. Update objectVersion

    Next, find the objectVersion line in the project.pbxproj file In the next steps, replace the previous version with the new name. You should see something like this:

    objectVersion = 77;

    Change it to:

    objectVersion = 56;

    This version update ensures compatibility with CocoaPods.

    5. Run CocoaPods Commands

    Once you've made these changes, you can proceed to initialize CocoaPods in your project, open your terminal and go to your project directory and run:

     

    pod initpod install

     

     

    This should work successfully now and you would be able to install the needed pods in your project to get rid of this

    failure.

    Conclusion

    Some parameter changes presented in Xcode 16 can be incompatible with older settings, such as when using CocoaPods. This way, you can overcome the pod init problem and your project will be appropriately configured to be utilizing CocoaPods

     

    Ready to transform your business with our technology solutions?     Contact Us today to Leverage Our iOS Expertise.

    Share

    facebook
    LinkedIn
    Twitter
    Mail
    iOS

    Related Center Of Excellence