erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

Release 3.9.2 not on Cocoapods #531

Closed okwasniewski closed 11 months ago

okwasniewski commented 1 year ago

Hey!

Firstly thanks for your work on maintaining the project! I have an issue with the latest version for some reason, https://cocoapods.org/pods/OCMock still shows 3.9.1 as the latest version.

Version 3.9.2 includes support for visionOS which is crucial for me.

Thanks for your help in advance!

erikdoe commented 1 year ago

It would great if I could push this to Cocoapods but this is proving to be harder than it should.

First, I spent a couple of hours trying to update Cocoapods itself. There were issues with failing to build native extensions when using the usual approach using gem. This seems to be a problem that's been around in various shapes for years. Installing via brew solved that issue.

Now, though, the podspec doesn't validate:


 -> OCMock (3.9.2)
    - NOTE  | xcodebuild:  note: Using codesigning identity override: 
    - NOTE  | xcodebuild:  note: Building targets in dependency order
    - NOTE  | xcodebuild:  note: Target dependency graph (3 targets)
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | xcodebuild:  note: Signing static framework with --generate-pre-encrypt-hashes (in target 'Pods-App' from project 'Pods')
    - ERROR | [watchOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [watchOS] xcodebuild:  ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/Library/Frameworks/XCTest.framework/XCTest, file is universal (x86_64,arm64) but does not contain the i386 architecture: /Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/Library/Frameworks/XCTest.framework/XCTest
    - NOTE  | [watchOS] xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)
    - ERROR | [visionOS] unknown: Encountered an unknown error (Could not find a `visionos` simulator (valid values: ios, tvos, watchos). Ensure that Xcode -> Window -> Devices has at least one `visionos` simulator listed or otherwise add one.) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 2 errors.

I have no idea why there is a problem with watchOS, but the second error seems even more problematic. It looks like I can't validate the pod without having a visionOS simulator installed, which means – as far as I know – I'd need an Xcode beta.

I'm going to be offline for a week. If you have any ideas or suggestions how to fix these issues, please leave a comment here, and I'll look into it when I'm back.

LowAmmo commented 1 year ago

@erikdoe I believe you are right...that you'll have to install the VisionOS simulator, either that, or remove the visionos deployment target from the podspec.

Not sure on the WatchOS, but could try upping the minimum OS version...?