Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: (DecodingError) typeMismatch(Swift.Int, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "preferredProjectObjectVersion", intValue: nil)] […])) #861

Closed
F1248 opened this issue Sep 28, 2024 · 5 comments · Fixed by #862

Comments

@F1248
Copy link

F1248 commented Sep 28, 2024

Context 🕵️‍♀️

  • Xcode 16.1 beta 2 (16B5014f)
  • Xcode project format: Xcode 16.0 (objectVersion = 77)
  • Periphery 2.21.1
  • XcodeProj 8.24.1

project.pbxproj:

// !$*UTF8*$!
{
	objectVersion = 77;
	objects = {
[…]
/* Begin PBXProject section */
		XXXXXXXXXXXXXXXXXXXXXXXX /* Project object */ = {
			isa = PBXProject;
			[…]
			preferredProjectObjectVersion = 77;
			[…]
		};
/* End PBXProject section */
[…]
	};
	rootObject = XXXXXXXXXXXXXXXXXXXXXXXX /* Project object */;
}

What 🌱

When I try to scan my project with Periphery, that uses XcodeProj, with periphery scan, I get this error message:

error: (DecodingError) typeMismatch(Swift.Int, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "preferredProjectObjectVersion", intValue: nil)], debugDescription: "Expected to decode Int but found a string instead.", underlyingError: nil))

It seems that for my project, #854 doesn't work as expected.

@pepicrft
Copy link
Contributor

@F1248 would you mind including a small Xcode project where we can reproduce the issue?

@F1248
Copy link
Author

F1248 commented Sep 30, 2024

@pepicrft

I created this project from scratch using Xcode 16.1 beta 2 (16B5014f):
Create New Project…MultiplApp

% cd Test
% periphery scan --setup
Welcome to Periphery!
This guided setup will help you select the appropriate configuration for your project.

* Inspecting project...

error: (DecodingError) typeMismatch(Swift.Int, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "preferredProjectObjectVersion", intValue: nil)], debugDescription: "Expected to decode Int but found a string instead.", underlyingError: nil))

@aksh1t
Copy link

aksh1t commented Sep 30, 2024

I can reproduce this as well on a fresh iOS project created with Xcode 16 (16A242d).

@pepicrft
Copy link
Contributor

pepicrft commented Oct 1, 2024

I opened a PR addressing the issue

@aksh1t
Copy link

aksh1t commented Oct 9, 2024

Can confirm your PR fixes the issue! Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants