-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support for the new watchos
platform
#3681
Conversation
watchos
platformwatchos
platform
watchos
platformwatchos
platform
See https://github.com/neonichu/native-watchOS-example for an example on how to try this out. |
@@ -82,7 +82,7 @@ def save_as(path) | |||
# @return [String] | |||
# | |||
def generate_platform_import_header | |||
"#import #{platform == :ios ? '<UIKit/UIKit.h>' : '<Cocoa/Cocoa.h>'}\n" | |||
"#import <Foundation/Foundation.h>\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a backwards incompatible change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly - might be a better idea to only use Foundation
for watchos
targets.
Regarding specs: |
@mrackwitz Will add an example, not sure what the integration spec should actually test, though. Since the changes on this repo are minimal, it seems a bit redundant. |
case platform.name | ||
when :ios then "#import <UIKit/UIKit.h>\n" | ||
when :osx then "#import <Cocoa/Cocoa.h>\n" | ||
else "#import <Foundation/Foundation.h>\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should leave this empty for new platforms?
Re: #1746
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Foundation must be imported as long as the FOUNDATION_EXPORT
macro is used by the umbrella header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, shouldn't the umbrella header import Foundation and not the pch file?
Seems like this is generally not done and it is up to the user to define the correct platform for the watchOS targets inside their Podfile. |
@neonichu isn't that done via target introspection already? |
@segiddins I think it's supposed to be done, but doesn't actually function. |
This reverts commit 782576c.
Skipped by `examples:build` for now, because it breaks with Xcode < 7.0
watchos
platformwatchos
platform
OK, this should be merge-able now 🎉 |
Should already be done in |
👍 |
Support for the new `watchos` platform
⌚ 🎉 |
I would like to move watch target's resource and storyboard as a pod library, but when I |
Fixes some issues with the newly added
watchos
platform. This lays the groundwork for supporting watchOS as a new platform in CocoaPods.Things yet to be addressed:
watchapp2
andwatchkit2-extension
targets should automatically be build for watchOSSee also CocoaPods/Core#249 and CocoaPods/Xcodeproj#272