当我试图存档项目时 - bitcode错误

时间:2016-02-01 19:21:33

标签: xcode swift vlc bitcode

  

无法生成bitcode包,因为   ' /Users/Hadevs/Desktop/XCodeProjects/KartinaTV/TVVLCKit.framework/TVVLCKit(VLCMe dia.o)'   没有完整的bitcode。所有目标文件和库   必须从Xcode Archive或Install build for生成bitcode   建筑arm64

我知道,它通过使用完整的bitcode编译TVVLCKit来解决,但我不能这样做。有很多问题我该如何解决?

1 个答案:

答案 0 :(得分:2)

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

d <- data.frame(x=rnorm(90), y=rnorm(90), 
                f1 = gl(3, 30) , f2 = rep(gl(3, 10), 3) )

p <- ggplot(d, aes(x, y)) + 
  geom_point()

# if you want to keep the facet labels
# p <- p + facet_grid(f1~f2)

library(plyr)
pl <- dlply(d, .(f1, f2), "%+%", e1=p, .drop = FALSE)

.dummy_plot <- ggplot() + theme_void()
pl[c(3,4,7)] <- rep(list(.dummy_plot), 3, simplify=FALSE)


# devtools::install_github("baptiste/egg)
library(grid)
grid.newpage()
grid.draw(egg::ggarrange(plots=pl))

# alternatively
# library(cowplot)
# plot_grid(plotlist = pl)

之后,您可以在以下位置找到真正苹果电视的“libTVVLCKit.a”文件:“VLCKit / build / Release-appletvos”和Xcode模拟器的“libTVVLCKit.a”:“VLCKit / build / Release- appletvsimulator“

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

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

  • AudioToolbox.framework
  • OpenGLES.framework
  • CFNetwork.framework
  • CoreText.framework
  • libbz2.tbd
  • libiconv.tbd
  • CoreGraphics.framework
  • Security.framework
  • 的libc ++。TBD
  • CoreVideo.framework
  • MediaPlayer.framework
  • QuartzCore.framework

不确定这些都是必需的,

如果您使用的是swift,则创建一个桥头文件并编写此import语句:

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

这是播放流/文件的一个小巧的例子:

#import <TVVLCKit/TVVLCKit.h>
相关问题