You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran pod install with a project targeting visionOS and CocoaPods dependency supporting visionOS.
What did you expect to happen?
Install all dependencies and get "Build Succeeded" after building.
What happened instead?
Build error:
Cannot find module BitmovinPlayerCore.
The copy XCFrameworks script (Pods/Target Support Files/BitmovinPlayerCore/BitmovinPlayerCore-xcframeworks.sh) does not have install_xcframework line like for iOS at the end: install_xcframework "${PODS_ROOT}/BitmovinPlayerCore/BitmovinPlayerCore.xcframework" "BitmovinPlayerCore" "framework" "ios-arm64" "ios-arm64_x86_64-simulator"
Note:
Adding the following line fixes the issue: install_xcframework "${PODS_ROOT}/BitmovinPlayerCore/BitmovinPlayerCore.xcframework" "BitmovinPlayerCore" "framework" "xros-arm64" "xros-arm64_x86_64-simulator"
# Uncomment the next line to define a global platform for your project# platform :ios, '9.0'source'https://cdn.cocoapods.org'source'https://github.com/bitmovin/cocoapod-specs.git'target'BitmovinTest'do# Comment the next line if you don't want to use dynamic frameworksuse_frameworks!platform:visionos,'1.0'pod'BitmovinPlayerCore','3.48.0-a.8'end
The missing part would only be the following, except the included CoconutLib.xcframework needs slices for visionOS and visionOS simulator.
generator=CopyXCFrameworksScript.new([xcframework],temporary_sandbox.root,Platform.visionos)generator.send(:script).should.include<<-SH.strip_heredoc install_xcframework "${PODS_ROOT}/../../spec/fixtures/CoconutLib.xcframework" "CoconutLib" "framework" "xros-arm64" "xros-arm64_x86_64-simulator" SH
I could not find out if there is an easy way to build that xcframework using existing tools in the repo.
I did not open a PR with the failing test due to the missing slices for CoconutLib.xcframework.
Found the culprit but have no idea how to fix it.
In:
the compared values (with an xcframework having visionOS slices) are: f.platform.symbolic_name: xros platform.symbolic_name: visionos
The text was updated successfully, but these errors were encountered:
rolandkakonyi
changed the title
VisionOS pod with XCFramework fails to install xcframework files
visionOS pod with XCFramework fails to install xcframework files
Oct 25, 2023
I would be open to contribute a fix if I get some pointers where the fix should happen!
Additionally I would need some instructions where the CoconutLub.xcframework comes from. I could only find some build.sh scripts for the ones that apply to some specific tests.
One possible solution here is to modify the initialization method of Pod::Platform to replace xros with visionos. This way, the platform information in the XCFramework will match "visionos".
definitialize(input,target=nil)ifinput.is_a?Platform@symbolic_name=input.name@deployment_target=input.deployment_targetelse# Allow `Platform.new('macos')` to be equivalent to `Platform.macos`ifinput == 'macos'input='osx'elsifinput == 'xros'input='visionos'end@symbolic_name=input.to_symtarget=target[:deployment_target]iftarget.is_a?(Hash)@deployment_target=Version.create(target)endend
Report
What did you do?
Ran
pod install
with a project targeting visionOS and CocoaPods dependency supporting visionOS.What did you expect to happen?
Install all dependencies and get "Build Succeeded" after building.
What happened instead?
Build error:
The copy XCFrameworks script (
Pods/Target Support Files/BitmovinPlayerCore/BitmovinPlayerCore-xcframeworks.sh
) does not haveinstall_xcframework
line like for iOS at the end:install_xcframework "${PODS_ROOT}/BitmovinPlayerCore/BitmovinPlayerCore.xcframework" "BitmovinPlayerCore" "framework" "ios-arm64" "ios-arm64_x86_64-simulator"
Note:
Adding the following line fixes the issue:
install_xcframework "${PODS_ROOT}/BitmovinPlayerCore/BitmovinPlayerCore.xcframework" "BitmovinPlayerCore" "framework" "xros-arm64" "xros-arm64_x86_64-simulator"
CocoaPods Environment
Stack
Installation Source
Plugins
Podfile
Project that demonstrates the issue
BitmovinTest.zip
Additional information
Found that there are no tests against visionOS support here:
CocoaPods/spec/unit/generator/copy_xcframeworks_script_spec.rb
Lines 13 to 31 in 00b92c8
The missing part would only be the following, except the included
CoconutLib.xcframework
needs slices for visionOS and visionOS simulator.I could not find out if there is an easy way to build that xcframework using existing tools in the repo.
I did not open a PR with the failing test due to the missing slices for
CoconutLib.xcframework
.Found the culprit but have no idea how to fix it.
In:
CocoaPods/lib/cocoapods/generator/copy_xcframework_script.rb
Line 152 in 00b92c8
the compared values (with an xcframework having visionOS slices) are:
f.platform.symbolic_name
:xros
platform.symbolic_name
:visionos
The text was updated successfully, but these errors were encountered: