-
Notifications
You must be signed in to change notification settings - Fork 54
Added Fix for WatchKit 2.0 Support. (Apple Should fix their build chain) #148
Added Fix for WatchKit 2.0 Support. (Apple Should fix their build chain) #148
Conversation
Fixes #145 |
@@ -28,7 +28,7 @@ def watchkit_fix | |||
def watchkit? | |||
Dir["#{PackageCommandGenerator.appfile_path}/**/*.plist"].any? do |plist_path| | |||
`/usr/libexec/PlistBuddy -c 'Print WKWatchKitApp' '#{plist_path}' 2>&1`.strip == 'true' | |||
end | |||
end && !(Gym::XcodebuildFixes.watchkit2?) |
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.
Can we change this to be clearer and easier to read?
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.
@mathiasAichinger could you update this line? Then it's ready to merge 🚀
Thanks for the pull request. Do I understand correctly that this is only needed for the legacy build API and is not required for the new Xcode 7 build API? |
What were the issues before this change? I've been uploading builds with a |
@NachoSoto did you use the legacy build API? |
I didn't. So this is only to workaround it in Xcode 6? Just curious: does this fix get used when using the new build API (Xcode 7)? |
Oh never mind, I just noticed the |
Really happy to see this PR! I've had issues with this for a while. (But I didn't make a PR so I'm definitely not complaining!) Is the watch app that you submitted successfully with this fix built with Swift? What I'm seeing for watch apps (since watchOS 2, I think) that are written in Swift is that there is also an additional set of stdlib dylibs inside the .ipa at 'SwiftSupport/watchos'. Last time I checked, gym did not correctly set up this structure. Perhaps this PR should also be doing that? |
@KrauseFx @NachoSoto Yes I was using the legacy api. Had some problems before with the new one. I will test it again. As WatchOS2 is only build-able with Xcode 7, this PR might be not needed. @Thomvis Our Apple Watch app is using Obj-C at the moment. |
@mathiasAichinger Thanks for the pull request, please update the one thing before it's ready to be merged 👍 |
@KrauseFx I changed it a little bit. I do not really know what you expect. Would be cool to merge this soon ;) |
…pport Added Fix for WatchKit 2.0 Support. (Apple Should fix their build chain)
Sorry for the delay. Looks good from my side, though I don't have a way to verify it. Bundling a new release now 👍 |
Nearly the same like the WatchOS 1 fix. I also adapted the WatchOS 1 hack, because it's also failing if you have both Support folders in the binary. Currently it's only working for the one or the other, not both. I don't know if that's a real use case. I also checked a WatchOS 1 plist and didn't find any other way to detect WatchOS 1.
Uploaded WatchOS2 to iTC without any issues ☕️