cocoapods-generate
cocoapods-generate copied to clipboard
watchOS support for Pod gen
Hi! I'm trying to add unit tests for a watchOS host app. I'm not able to import a watchOS app's resource files using 'Pod gen', so I wonder if there is such a support that I'm not aware of.
Likely will need a podspec that demonstrates the problem to investigate.
More specifically is to able able to add watchOS host app in a unit test spec: https://guides.cocoapods.org/syntax/podspec.html#test_spec
Currently it automatically adds a main.m file which doesn't work for watch app.
pod lib lint
has a similar issue.
A workaround for pod gen
is to fill in the empty main.m from the App build target in the Target Membership pane after creation:
but then you run into the issue that XCTests are not supported for watchOS:
Given that XCTest is not supported for watchOS, would this feature still be useful?
A workaround for using pod gen
with a podspec that includes watchOS so that it is usable for the other platforms is to specify a specific platform. Otherwise pod gen
will fail with
[!] The platform of the target `App-watchOS` (watchOS 6.0) is not compatible with `FirebaseCore/unit (6.4.0)`, which does not support `watchOS`.
Avoid with something like:
pod gen FirebaseCore.podspec --auto-open --local-sources=./ --platforms=ios