Ios out of band

few bits to sort out
- [x] make our mix of simulator/emulator consistent, settling on emulator
- [x] passing the factory in works great for just in time asset decoding, but its not amazing when you want to decode ahead of time.
- [x] couple of places left to pass this function signature through. (Question) is there a neater way to get this done, feels a bit like we are going back to parameter explosion a bit?
- [x] should do a few examples, i think the complexity grows quite a bit in this one as you add caching, or callbacks
- [x] should get the cached images/fonts to draw on init as well, either warming up cache, or jitting
- [x] examples loading assets from the bundle (also there seem to be actual asset things too? should we use those?!)
- [x] add test
- [x] re-add "preview" project & rev the preview project once this has been deployed. (do this after new ios deploy)
- [x] fix up race condition (see comment)

https://github.com/rive-app/rive/assets/1216025/2c14330f-e8a4-481b-bc27-4807cabe3b82

(simple example, both swift ui and standard)

![CleanShot 2023-11-20 at 16 54 59](https://github.com/rive-app/rive/assets/1216025/a71e207c-30ad-44dd-9e4b-ad7431b22186)

Diffs=
fabb7f97f Ios out of band (#6232)

Co-authored-by: Gordon Hayes <pggordonhayes@gmail.com>
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
This commit is contained in:
luigi-rosso
2023-12-05 21:21:22 +00:00
parent 3d0537a01a
commit 911b1631b8
11 changed files with 55 additions and 44 deletions

View File

@@ -175,8 +175,8 @@ ninja -C out/iossim_x64
bin/gn gen out/iossim_arm64 --type=static_library --args=" \
target_os=\"ios\" \
target_cpu=\"arm64\" \
extra_cflags=[\"-fno-rtti\", \"-fembed-bitcode\", \"-flto=full\", \"-DSK_DISABLE_SKPICTURE\", \"-DSK_DISABLE_TEXT\", \"-DRIVE_OPTIMIZED\", \"-DSK_DISABLE_LEGACY_SHADERCONTEXT\", \"-DSK_DISABLE_LOWP_RASTER_PIPELINE\", \"-DSK_FORCE_RASTER_PIPELINE_BLITTER\", \"-DSK_DISABLE_AAA\", \"-DSK_DISABLE_EFFECT_DESERIALIZATION\", \"--target=arm64-apple-ios12.0.0-simulator\"] \
extra_ldflags=[\"--target=arm64-apple-ios12.0.0-simulator\"] \
extra_cflags=[\"-fno-rtti\", \"-fembed-bitcode\", \"-flto=full\", \"-DSK_DISABLE_SKPICTURE\", \"-DSK_DISABLE_TEXT\", \"-DRIVE_OPTIMIZED\", \"-DSK_DISABLE_LEGACY_SHADERCONTEXT\", \"-DSK_DISABLE_LOWP_RASTER_PIPELINE\", \"-DSK_FORCE_RASTER_PIPELINE_BLITTER\", \"-DSK_DISABLE_AAA\", \"-DSK_DISABLE_EFFECT_DESERIALIZATION\", \"--target=arm64-apple-ios13.0.0-simulator\"] \
extra_ldflags=[\"--target=arm64-apple-ios13.0.0-simulator\"] \
is_official_build=true \
skia_use_angle=false \
skia_use_dng_sdk=false \

View File

@@ -6,39 +6,39 @@ export MAKE_SKIA_FILE="$0"
source ./get_skia2.sh
source ./cache_helper.sh
build_skia_ios(){
build_skia_ios() {
cd $SKIA_DIR_NAME
BASE=out/ios
case $1 in
arm64)
ARCH=arm64
FOLDER=$BASE/arm64
;;
arm)
ARCH=arm
FOLDER=$BASE/arm
;;
x86)
ARCH=x86
FOLDER=$BASE/x86
;;
x64)
ARCH=x64
FOLDER=$BASE/x64
;;
iossim_arm64)
ARCH=arm64
FOLDER=$BASE/iossim_arm64
EXTRA_CFLAGS=", \"--target=arm64-apple-ios12.0.0-simulator\""
EXTRA_LDLAGS="\"--target=arm64-apple-ios12.0.0-simulator\""
;;
*)
echo "Do not know build configuration for $1"
exit 1
case $1 in
arm64)
ARCH=arm64
FOLDER=$BASE/arm64
;;
arm)
ARCH=arm
FOLDER=$BASE/arm
;;
x86)
ARCH=x86
FOLDER=$BASE/x86
;;
x64)
ARCH=x64
FOLDER=$BASE/x64
;;
iossim_arm64)
ARCH=arm64
FOLDER=$BASE/iossim_arm64
EXTRA_CFLAGS=", \"--target=arm64-apple-ios13.0.0-simulator\""
EXTRA_LDLAGS="\"--target=arm64-apple-ios13.0.0-simulator\""
;;
*)
echo "Do not know build configuration for $1"
exit 1
;;
esac
# use Rive optimized/stripped Skia for iOS static libs.
bin/gn gen $FOLDER --type=static_library --args=" \
target_os=\"ios\" \
@@ -103,17 +103,17 @@ build_skia_ios(){
cd ..
}
if is_build_cached_locally; then
if is_build_cached_locally; then
echo "Build is cached, nothing to do."
else
if is_build_cached_remotely; then
if is_build_cached_remotely; then
pull_cache
else
else
getSkia
build_skia_ios $1
# hmm not the appiest with this guy
OUTPUT_CACHE=$FOLDER upload_cache
fi
fi
fi
cd ..