gpt4 book ai didi

xcode - 当我尝试存档项目时 - 位码错误

转载 作者:搜寻专家 更新时间:2023-11-01 07:27:19 25 4
gpt4 key购买 nike

bitcode bundle could not be generated because '/Users/Hadevs/Desktop/XCodeProjects/KartinaTV/TVVLCKit.framework/TVVLCKit(VLCMe‌​dia.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

我知道,它可以通过使用完整的位码编译 TVVLCKit 来解决,但我做不到。有很多问题我该如何解决?

最佳答案

为了成功构建最新版本的 TVVLCKit,请从您的终端执行以下命令:

git clone http://code.videolan.org/videolan/VLCKit.git
cd VLCKit
./buildMobileVLCKit.sh -t

# it will probably stop on error about code.c missing string.h and it will state the declaration of memcpy is incorrect, execute the following lines:
sed -i .bak 's/git pull --rebase/#git pull --rebase/;s/git reset --hard ${TESTEDHASH}/#git reset --hard ${TESTEDHASH}/' buildMobileVLCKit.sh

sed -i .bak -e '/git reset --hard ${TESTEDHASH}/{' -e 'n;s?git am ../../patches/\*.patch?#git am ../../patches/\*.patch?' -e'}' buildMobileVLCKit.sh

cd MobileVLCKit/ImportedSources/vlc/contrib/AppleTVOS-aarch64/gsm/src
cp code.c code.bak
echo -e "#include <string.h>\n$(cat code.c)" > code.c
cd ../../../../../../..

cd MobileVLCKit/ImportedSources/vlc/contrib/AppleTVSimulator-x86_64/gsm/src
cp code.c code.bak
echo -e "#include <string.h>\n$(cat code.c)" > code.c
cd ../../../../../../..

./buildMobileVLCKit.sh -t

# now you should be able to see the "all done" message, now lets xCode build (you can change the tvOS version from 9.2 to 9.1 if you need), (note the bit code generation option)

xcodebuild -project "MobileVLCKit.xcodeproj" -target "TVVLCKit" -sdk appletvos9.2 -configuration Release ARCHS="arm64" IPHONEOS_DEPLOYMENT_TARGET=9.2 GCC_PREPROCESSOR_DEFINITIONS="" BITCODE_GENERATION_MODE=bitcode

xcodebuild -project "MobileVLCKit.xcodeproj" -target "TVVLCKit" -sdk appletvsimulator9.2 -configuration Release ARCHS="x86_64" IPHONEOS_DEPLOYMENT_TARGET=9.2 GCC_PREPROCESSOR_DEFINITIONS="" BITCODE_GENERATION_MODE=bitcode

# you can also create the framework file for both simulator and red apple tv with the following lines:

cd build
rm -rf TVVLCKit.framework
mkdir TVVLCKit.framework
lipo -create Release-appletvos/libTVVLCKit.a Release-appletvsimulator/libTVVLCKit.a -o TVVLCKit.framework/TVVLCKit
chmod a+x TVVLCKit.framework/TVVLCKit
cp -pr Release-appletvos/TVVLCKit TVVLCKit.framework/Headers

在此之后,您可以在“VLCKit/build/Release-appletvos”找到真正的苹果电视的“libTVVLCKit.a”文件,在“VLCKit/build/Release-小程序VS模拟器”

框架文件将位于:“VLCKit/build/TVVLCKit.framework”

为了测试它,将“TVVLCKit.framework”拖到您的项目中,并在您的项目中包含以下框架:

  • AudioToolbox.framework
  • OpenGLES.framework
  • CFNetwork.framework
  • CoreText.framework
  • libbz2.tbd
  • libiconv.tbd
  • CoreGraphics.framework
  • 安全框架
  • libc++.tbd
  • CoreVideo.framework
  • MediaPlayer.framework
  • QuartzCore.framework

不确定它们是否都是必需的,

如果你使用的是swift,那么创建一个桥头文件并写下这个import语句:

#import <TVVLCKit/TVVLCKit.h>

这是一个播放流/文件的快速示例:

var appDelegate: AppDelegate!
appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate

player = VLCMediaPlayer()
player.media = VLCMedia(URL: NSURL(string: "http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4"))
player.play()
player.drawable = appDelegate.window // or self.view if this code is in a UIViewController

关于xcode - 当我尝试存档项目时 - 位码错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35138548/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com