Skip to content
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

Bump rive-ios to v6.2, rive-android to 9.9.5, and remove iOS Skia support #270

Merged
merged 7 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ When an underlying runtime like [rive-ios](https://github.com/rive-app/rive-ios)
Before running `yarn` at the root level of the project, set the appropriate version of the iOS runtime in `rive-react-native.podspec` at the root of the folder:

```
s.dependency "RiveRuntime", "5.1.6"
s.dependency "RiveRuntime", "6.2.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now have v6.2.1 which fixes some potentials for crashes on iOS, might want to bump the bump!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Added the newer version. I also make this section of the docs generic (x.x.x) so we don't have to keep updating it every time.

```

In the example folder, run the following command to update the example project to retrieve the expected `RiveRuntime` dependency you're upgrading to:
Expand Down
17 changes: 17 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,22 @@ target 'RiveReactNativeExample' do
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)

# This is a temporary workaround for the issue described here:
# https://github.com/facebook/react-native/issues/43335. Flipper is no longer
# used in React Native 0.74 so this workaround can be removed once we upgrade.
installer.pods_project.targets.each do |target|
if target.name == 'Flipper'
file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
contents = File.read(file_path)
unless contents.include?('#include <functional>')
File.chmod(0755, file_path)
File.open(file_path, 'w') do |file|
file.puts('#include <functional>')
file.puts(contents)
end
end
end
end
end
end
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,10 @@ PODS:
- React-jsi (= 0.72.7)
- React-logger (= 0.72.7)
- React-perflogger (= 0.72.7)
- rive-react-native (7.2.0):
- rive-react-native (7.3.0):
- React-Core
- RiveRuntime (= 5.14.0)
- RiveRuntime (5.14.0)
- RiveRuntime (= 6.2.0)
- RiveRuntime (6.2.0)
- RNCMaskedView (0.2.9):
- React-Core
- RNCPicker (1.16.8):
Expand Down Expand Up @@ -744,8 +744,8 @@ SPEC CHECKSUMS:
React-runtimescheduler: 7649c3b46c8dee1853691ecf60146a16ae59253c
React-utils: 56838edeaaf651220d1e53cd0b8934fb8ce68415
ReactCommon: 5f704096ccf7733b390f59043b6fa9cc180ee4f6
rive-react-native: c5f46a81d999be348e3a4875f5d5a42b0288db78
RiveRuntime: c470cc8daa0c192c678f7abb35b980f95d2bb625
rive-react-native: cc732acaddbe1f38eadd5164133394490b9b1699
RiveRuntime: 9e4b2a0e6a28808a27c6b8613364ac17b70c2168
RNCMaskedView: 949696f25ec596bfc697fc88e6f95cf0c79669b6
RNCPicker: 0991c56da7815c0cf946d6f63cf920b25296e5f6
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
Expand All @@ -755,6 +755,6 @@ SPEC CHECKSUMS:
Yoga: 4c3aa327e4a6a23eeacd71f61c81df1bcdf677d5
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 2e1de35b032a6e591da83a5975df1059c489c1d8
PODFILE CHECKSUM: 2162e0768710a1457a43053c4af0534adf174041

COCOAPODS: 1.15.2
12 changes: 10 additions & 2 deletions example/ios/RiveReactNativeExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,11 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -972,7 +976,11 @@
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
2 changes: 1 addition & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function Main() {
// For more information: https://rive.app/community/doc/overview/docD20dU9Rod
//
// This is optional. The current defaults are:
// - iOS: Skia
// - iOS: Rive
// - Android: Skia
// In the future the default will be the Rive Renderer (RiveRendererIOS.Rive and RiveRendererAndroid.Rive)
//
Expand Down
7 changes: 2 additions & 5 deletions ios/RNRiveRendererType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,20 @@ import RiveRuntime

enum RNRiveRendererType: String {
case Rive = "rive"
case Skia = "skia"
case CoreGraphics = "coreGraphics"

static func mapToRNRiveRendererType(value: String) -> RNRiveRendererType {
if let rnEnum = RNRiveRendererType(rawValue: value) {
return rnEnum
} else {
fatalError("Unsupported renderer type: \(value)")
}
}

static func mapToRendererType(rnRendererType: RNRiveRendererType) -> RendererType {
switch rnRendererType {
case .Rive:
return RendererType.riveRenderer
case .Skia:
return RendererType.skiaRenderer
case .CoreGraphics:
return RendererType.cgRenderer
}
Expand Down
4 changes: 2 additions & 2 deletions ios/RiveReactNative-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <RiveRuntime/RiveRuntime.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTViewManager.h>
#import "React/RCTUIManager.h"
#import <React/RCTUIManager.h>
#import <React/RCTUtils.h>
#import "React/RCTExceptionsManager.h"
#import <React/RCTExceptionsManager.h>
#import <React/RCTView.h>
2 changes: 1 addition & 1 deletion ios/RiveReactNativeViewManager.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#import "React/RCTViewManager.h"
#import <React/RCTViewManager.h>

@interface RCT_EXTERN_MODULE(RiveReactNativeViewManager, RCTViewManager)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rive-react-native",
"version": "7.3.0",
"version": "8.0.0",
"description": "Rive React Native",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
4 changes: 3 additions & 1 deletion rive-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Pod::Spec.new do |s|

s.source_files = "ios/**/*.{h,m,mm,swift}"

s.swift_version = "5.0"

s.dependency "React-Core"
s.dependency "RiveRuntime", "5.14.0"
s.dependency "RiveRuntime", "6.2.0"
end
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export enum Direction {

export enum RiveRendererIOS {
Rive = 'rive',
Skia = 'skia',
CoreGraphics = 'coreGraphics',
}

Expand Down
Loading