Appcenter: Allow to override xcodebuild SDK arguments

Created on 16 Jun 2019  路  9Comments  路  Source: microsoft/appcenter

Describe the solution you'd like
We have app targets that have dependencies on watchOS targets within the same project. Since these targets are embedded in the final binaries, they are required to compile properly for the encompassing target to also complete successfully.

As of right now, the xcodebuild command line always includes a -sdk iphoneos for iOS projects. However this in effect breaks those targets depending on embedded watchOS extensions.

A simple solution would be to have a mechanism to avoid an explicit SDK being specified to xcodebuild. In fact, just removing that -sdk argument from the command line should fix the issue. Xcode should be able to automatically infer the SDK from a properly configured target.

If there is somehow still a need for that argument to be present in some cases, it would be great if this could be set as some kind of advanced build option for the app.

Describe alternatives you've considered
Looked at possible ways to override this with environment variables, but to no avail.

Additional context
I believe this should be a showstopper for any iOS project that also includes watchOS (or other platform) targets.

Stale build feature request

All 9 comments

@megastep Thanks for the suggestion! We recently removed -sdk for iOS React Native with Xcode 10 builds, if legacy build system is not enforced (#364). I wonder if we should just do this for all iOS builds. For now, I'd like to keep an eye on how React Native builds go for a while, then we can look into the potential of removing it for all builds.

@DennisPan We ran into the same problem and only removing the -sdk flag could help us now. Any updates on the topic?

@SchafftJonas Could you reach out to support and ask to be forwarded to me? I'd like to see if we can implement a quick workaround for your app. For now, I'd like to avoid a widespread change, with the risk of breaking others who don't need it.

For folks who are running into the same, we have implemented a workaround that can be enabled per app, which removed -sdk option during build. If you need this as well, please reach out to support. Hopefully we will make this more flexible globally (either by providing an advanced option, or be smarter about it with repository analysis), but likely not very near term

For folks who are running into the same, we have implemented a workaround that can be enabled per app.

At this time, I've been informed by @phillipleblanc we're no longer manually applying this change as a workaround, and it doesn't look like there's an alternative workaround. Sorry for the inconvenience.

If you're still impacted by this scenario and haven't voted for it with a 馃憤at the top; please do so to show your support for this feature update.

This might be a duplicate of #881 though I'm not 100% sure. Definitely looks very similar though.

@King-of-Spades - Kent, thanks for updating this and for your response on our particular, related issue... which I will mention here in case anyone else sees similar. As detailed in the original post, ours involved building for Apple Watch, but we were able to reproduce even with Apple's own watchOS sample, SpeedySloth.
Unmodified, the project/scheme is a hybrid of both "-sdk watchos" and "-sdk phoneos" -- specify either on the command line to "xcodebuild" and the build fails. If you don't specify "-sdk" at all, the build succeeds. Unfortunately, AppCenter seems to allow us no way to make that happen.
Per your suggestion, Kent, I will vote. Others please do the same!

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

Was this page helpful?
0 / 5 - 0 ratings