Closed nhhynd closed 11 months ago
Have you install the beta
version yet ? Cause this is for beta version only!
Have you install the
beta
version yet ? Cause this is for beta version only!
I've installed v1.0.4-beta
Please make sure the image url is correct and works normally. I've tested all images, still work fine though.
Or describe more detailed on how you've implemented it here, image or screen recording of how the issue occurred.
And one more thing is the url must be a network image url https://
, as local url isn't supported yet. I'll try to implement it at the next update soon.
Please make sure the image url is correct and works normally. I've tested all images, still work fine though.
Or describe more detailed on how you've implemented it here, image or screen recording of how the issue occurred.
And one more thing is the url must be a network image url
https://
, as local url isn't supported yet. I'll try to implement it at the next update soon.
I excuted command "npx react-native@latest init AwesomeProject" and "npm install react-native-screenguard@beta --save"
env iOS: 16.1.2 iPhone 11 Pro Max
my App.tsx code
import React from 'react';
import {
Text,
View,
} from 'react-native';
import ScreenGuardModule from 'react-native-screenguard';
function App(): React.JSX.Element {
React.useEffect(() => {
const data = {
height: 150,
width: 200,
uri: 'https://www.icegif.com/wp-content/uploads/2022/09/icegif-386.gif',
backgroundColor: '#d31e1e',
alignment: 5 // Alignment.centerRight
};
ScreenGuardModule.registerWithImage(
data,
() => {
console.log('123');
});
}, []);
return (
<View style={{flex: 1, backgroundColor: '#fff'}}>
<Text>sadfasdfasdfda</Text>
</View>
);
}
export default App;
backgroundColor worked for me, but I couldn't see the image.
Thank you for your hard work.
Well, I've checked for both iOS 17 and iOS 16.1. All worked as expected. Maybe you should double check the internet connection, or try with a smaller image size (< 1 MB), try with PNG or JPEG......
This is my test
Thanks to your issue, I've discovered another problem with the GIF image. Seems like it's not animated but stand still like a normal image.
Also, a lot of options for controlling the image will be introduced on next beta released.
Only worked "backgroundColor" I can't see the image