-
Notifications
You must be signed in to change notification settings - Fork 511
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
Xcode 14 Native Watch App _WatchKitStub/WK could not be copied #16142
Comments
Thanks for your feedback, @SprengerS. Could you provide a build log and a sample project that triggers your error? |
Hi @SprengerS. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
You can find the build log in the builds.txt file. if you need diagnostics build log don't hesitate to ask for. A sample Project needs a lot of time. I will try to create a sample project tomorrow. |
@SprengerS could you please provide the binlog and the project tree structure (running 'ls -LR')? |
Hi @SprengerS. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
I have resolved this problem with overwriting two current targets. The target <!-- Validate App only used for App Extensions Xcode 14. Needs to be checked in future time-->
<Target Name="_ValidateAppBundle" Condition="'$(IsAppExtension)' == 'false' And '$(IsWatchApp)' == 'true'" DependsOnTargets="_DetectSdkLocations;_ComputeTargetFrameworkMoniker;_GenerateBundleName">
<ValidateAppBundleTask
Condition="'$(IsMacEnabled)' == 'true'"
SessionId="$(BuildSessionId)"
AppBundlePath="$(_AppBundlePath)"
SdkIsSimulator="$(_SdkIsSimulator)"
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
/>
</Target> My new target <!--Create ipa without copying the watchkit stubs which are not necessary any more-->
<Target Name="_CoreCreateIpa" Condition="'$(BuildIpa)' == 'true'" DependsOnTargets="Codesign">
<RemoveDir SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true'" Directories="$(DeviceSpecificIntermediateOutputPath)ipa" />
<MakeDir SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true'" Directories="$(DeviceSpecificIntermediateOutputPath)ipa\Payload" />
<PropertyGroup>
<_IpaAppBundleDir>$(DeviceSpecificIntermediateOutputPath)ipa\Payload\$(_AppBundleName).app\</_IpaAppBundleDir>
</PropertyGroup>
<!-- Clone the compiled app bundle into the IPA's Payload directory... -->
<Ditto
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
ToolExe="$(DittoExe)"
ToolPath="$(DittoPath)"
Source="$(AppBundleDir)"
Destination="$(_IpaAppBundleDir)"
/>
<FindWatchOS2AppBundle
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And '@(_ResolvedWatchAppReferences)' != ''"
WatchAppReferences="@(_ResolvedWatchAppReferences)"
>
<Output TaskParameter="WatchOS2AppBundle" PropertyName="_WatchOS2AppBundle"/>
</FindWatchOS2AppBundle>
<CollectITunesSourceFiles
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
OutputPath="$(DeviceSpecificOutputPath)"
>
<Output TaskParameter="ITunesSourceFiles" ItemName="_ITunesSourceFile"/>
</CollectITunesSourceFiles>
<Copy
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And '@(_ITunesSourceFile)' != ''"
SourceFiles="@(_ITunesSourceFile)"
DestinationFolder="$(DeviceSpecificIntermediateOutputPath)ipa"
/>
<ItemGroup>
<_IpaPackageSource Include="$(DeviceSpecificIntermediateOutputPath)ipa\Payload" />
<_IpaPackageSource Include="$(DeviceSpecificIntermediateOutputPath)ipa\WatchKitSupport" Condition="Exists ('$(DeviceSpecificIntermediateOutputPath)ipa\WatchKitSupport\WK')" />
<_IpaPackageSource Include="$(DeviceSpecificIntermediateOutputPath)ipa\WatchKitSupport2" Condition="Exists ('$(DeviceSpecificIntermediateOutputPath)ipa\WatchKitSupport2\WK')" />
<_IpaPackageSource Include="$(DeviceSpecificIntermediateOutputPath)ipa\iTunesMetadata.plist" Condition="'$(IpaIncludeArtwork)' == 'true' And Exists ('$(DeviceSpecificIntermediateOutputPath)ipa\iTunesMetadata.plist')" />
<_IpaPackageSource Include="$(DeviceSpecificIntermediateOutputPath)ipa\iTunesArtwork@2x" Condition="'$(IpaIncludeArtwork)' == 'true' And Exists ('$(DeviceSpecificIntermediateOutputPath)ipa\iTunesArtwork@2x')" />
<_IpaPackageSource Include="$(DeviceSpecificIntermediateOutputPath)ipa\iTunesArtwork" Condition="'$(IpaIncludeArtwork)' == 'true' And Exists ('$(DeviceSpecificIntermediateOutputPath)ipa\iTunesArtwork')" />
</ItemGroup>
<PropertyGroup>
<!-- Calculate IpaPackageDir and IpaPackageName based on IpaPackagePath, if defined. -->
<IpaPackageDir Condition="'$(IpaPackagePath)' != ''">$([System.IO.Path]::GetDirectoryName('$(IpaPackagePath)'))</IpaPackageDir>
<IpaPackageName Condition="'$(IpaPackagePath)' != ''">$([System.IO.Path]::GetFileName('$(IpaPackagePath)'))</IpaPackageName>
<!-- Calculate an IPA package directory path if not already defined by the developer. -->
<!--<IpaPackageDir Condition="'$(IpaPackageDir)' == ''">$([System.Environment]::GetEnvironmentVariable('IPA_PACKAGE_DIR'))</IpaPackageDir>-->
<IpaPackageDir Condition="'$(IpaPackageDir)' == ''">$(DeviceSpecificOutputPath)</IpaPackageDir>
<!-- Calculate an IPA package name if not already defined by the developer. -->
<!--<IpaPackageName Condition="'$(IpaPackageName)' == ''">$([System.Environment]::GetEnvironmentVariable('IPA_PACKAGE_NAME'))</IpaPackageName>-->
<IpaPackageName Condition="'$(IpaPackageName)' != '' And !$(IpaPackageName.EndsWith ('.ipa', StringComparison.OrdinalIgnoreCase))">$(IpaPackageName).ipa</IpaPackageName>
<IpaPackageName Condition="'$(IpaPackageName)' == ''">$(_AppBundleName).ipa</IpaPackageName>
<!-- Calculate the full path of the IPA package if not already defined by the developer. -->
<!--<IpaPackagePath Condition="'$(IpaPackagePath)' == ''">$([System.Environment]::GetEnvironmentVariable('IPA_PACKAGE_PATH'))</IpaPackagePath>-->
<IpaPackagePath Condition="'$(IpaPackagePath)' == ''">$(IpaPackageDir)\$(IpaPackageName)</IpaPackagePath>
</PropertyGroup>
</Target> |
…ect watchOS app. Should fix xamarin#16142 and progress on xamarin#10070
…ect watchOS app. Should fix xamarin#16142 and progress on xamarin#10070
…chOS project. Fixes #16142. (#16690) I've made some small edits to the ValidateWatchApp method to allow for a native watchOS app that was created in Xcode 14 that uses a single project instead of an extension to be bundled into a Xamarin app. Should fix #16142 and progress on #10070 Co-authored-by: Jack Butler <jbutler@glneurotech.com> Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com> Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com> Co-authored-by: Alex Soto <alex@alexsoto.me>
…hOS project. Fixes #16142. (#16773) I've made some small edits to the ValidateWatchApp method to allow for a native watchOS app that was created in Xcode 14 that uses a single project instead of an extension to be bundled into a Xamarin app. Should fix #16142 and progress on #10070 Backport of #16690 Co-authored-by: Jack Butler <jbutler@glneurotech.com> Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
…ect watchOS app. Should fix xamarin#16142 and progress on xamarin#10070
…ect watchOS app. Should fix xamarin#16142 and progress on xamarin#10070
…ect watchOS app. Should fix xamarin#16142 and progress on xamarin#10070
…ect watchOS app. Should fix xamarin#16142 and progress on xamarin#10070
We have added a native WatchOS APP for our main App in the csproj file via
_ResolvedWatchAppReferences
Build target. This works on Xcode 13 very good, but not on Xcode 14. The native Watch App does not contain the WatchkitStub any more, so copying the native App will fail with the following message:Steps to Reproduce
_ResolvedWatchAppReferences
Expected Behavior
Actual Behavior
Building fails with the following error:
Environment
Version information
Build Logs
Example Project (If Possible)
builds.txt
The text was updated successfully, but these errors were encountered: