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

watchOS support for Pod gen #42

Open
charlotteliang opened this issue Nov 22, 2019 · 4 comments
Open

watchOS support for Pod gen #42

charlotteliang opened this issue Nov 22, 2019 · 4 comments

Comments

@charlotteliang
Copy link

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.

@paulb777
Copy link
Contributor

Likely will need a podspec that demonstrates the problem to investigate.

@charlotteliang
Copy link
Author

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.

@paulb777
Copy link
Contributor

paulb777 commented Dec 7, 2019

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:

Screen Shot 2019-12-07 at 2 41 25 PM

but then you run into the issue that XCTests are not supported for watchOS:

Screen Shot 2019-12-07 at 2 31 15 PM

Given that XCTest is not supported for watchOS, would this feature still be useful?

@paulb777
Copy link
Contributor

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

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

No branches or pull requests

2 participants