Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Added Fix for WatchKit 2.0 Support. (Apple Should fix their build chain) #148

Merged

Conversation

mathiasAichinger
Copy link

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 ☕️

@mathiasAichinger
Copy link
Author

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?)
Copy link
Contributor

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?

Copy link
Contributor

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 🚀

@KrauseFx
Copy link
Contributor

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?

@NachoSoto
Copy link

Uploaded WatchOS2 to iTC without any issues ☕️

What were the issues before this change? I've been uploading builds with a watchOS 2 app to TestFlight without any issues (after they fixed it, of course :P)

@KrauseFx
Copy link
Contributor

@NachoSoto did you use the legacy build API?

@NachoSoto
Copy link

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)?

@NachoSoto
Copy link

Oh never mind, I just noticed the return unless Gym.config[:use_legacy_build_api], never mind then! :)

@Thomvis
Copy link

Thomvis commented Nov 21, 2015

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?

@mathiasAichinger
Copy link
Author

@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.

@KrauseFx
Copy link
Contributor

@mathiasAichinger Thanks for the pull request, please update the one thing before it's ready to be merged 👍

@mathiasAichinger
Copy link
Author

@KrauseFx I changed it a little bit. I do not really know what you expect. Would be cool to merge this soon ;)

KrauseFx added a commit that referenced this pull request Dec 11, 2015
…pport

Added Fix for WatchKit 2.0 Support. (Apple Should fix their build chain)
@KrauseFx KrauseFx merged commit b3d7671 into fastlane-old:master Dec 11, 2015
@KrauseFx
Copy link
Contributor

Sorry for the delay. Looks good from my side, though I don't have a way to verify it. Bundling a new release now 👍

@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants