Display static image from iOS filesystem - ios

I am currently trying to display a static image within my react native app. I am using the Image Component from React Native, so there is nothing custom.
Maybe important to mention is that i am opening the Main App with my Share Extension => Image Gallery, Select Image, Share with Main App.
On the Simulator it works just great, when i am using a real device nothing is displayed. Here is the Image path i am trying to display:
<Image
style={styles.image}
source={{
uri: "/private/var/mobile/Containers/Data/PluginKitPlugin/156268E6-6BE0-4055-BF0E-0EDC546FC2F9/tmp/RNSE_TEMP_IMG.png",
isStatic: true
}}
/>
I have tried adding file:// + /private.... but this did not help at all.
Any ideas?

Related

IOS 15 coping images from Ionic app on long press

I just started testing my Ionic 5 app in IOS 15.0.2 and when I long press on any image it's allowing me to drag the image to other apps and photos and directly save it. When I drag the image to any text editor app, it shows the base64 string of the image.
The same is not happing in IOS 14 and I need to stop this behavior of the app. How can I control this from my ionic app?
The following CSS resolved the issue.
img {
pointer-events: none;
}
Now there are no event fired on long press images.
just try:
-webkit-user-drag: none;
or you can reference:https://www.denisbouquet.com/css-forbid-selection-user-select-dragging-ghost-image/

React Native images will not show on one app, but will show on other fresh apps

In my RN (ios based) app my images used to show perfectly, but for whatever reason stopped appearing. I keep them in an img folder labeled as 'home.png' etc.
I imported Image from react-native
import { SafeAreaView, StyleSheet, ScrollView, View, Image, Text, StatusBar, } from 'react-native';
and attempt to display it in return section with:
<Image source={require('./img/cool.jpg')}/>
The image will not show regardless of png or jpg extension. It shows up gray.
I created a fresh RN app and repeated the above, importing Image & using:
<Image source={require('./img/cool.jpg')}/>
In the fresh app, the image shows no problem. What could possibly be doing this? I can't get the images to show on any of my screens for the app I'm working on.
Surprisingly, images BREAK after certain updates whether it be React native or iOS updates. An absolutely unbelievable headache that no one seems to have encountered before. Luckily, copying code logic to a new working app fixed it. I hope this NEVER occurs again.

How to save image to iOS camera roll using default react-native Share component

I cannot manage to get the Save Image button menu sharing a remote image through default react-native Share component.
My code looks like:
import { Share } from 'react-native'
Share.share({url: 'https://i.imgur.com/I5DFV.jpg'})
Expected:
Current:

Xamarin Forms iOS images not showing

I have some Button with Image Property like that
<Button Image="Arrow_Left_40.png" Clicked="WocheZurueck_Clicked" WidthRequest="60" HorizontalOptions="Center"/>
and I have that Image in Resources folder in the iOS Project but I dont see the image...

iOS: Multiple launch images

Is it possible to provide multiple launch images instead of just one Default.png launch image? My goal is, that you have for example 5 different launch images and for every application start it shows another one.
Just in case someone responds with that, I know that there is the possibility to have different launch images for different configurations (e.g. screen orientation). But that's not what I'm looking for. I'd like to have different launch images for exactly the same configuration, with the only variable different being the time of the launch.
Judging from this link, I don't believe it's possible. You have some latitude in configuring different launch images for Custom URL Schemes or even to localize them, but other than that, since they are specified in the .plist file so that iOS handles them quickly before your app is processing, that's as much latitude as you get...
There are rumors that it's possible to load default image from Document folder:
set path in info.plist ../Document/Default.png
on each app launch override that Default.png with one of your predefined images
*on first launch the start-up screen will be black
PS. I didn't try it, so can't say that it works. And even if it works you can meet problems with Apple review process.
Would be possible if you would insert your launch images using javascript/jquery vs. entering plain HTML.
In your script you would have to specify your logic for what splash screen should be used when. Then use this:
<script type="text/javascript">
(function() {
var a;
if(navigator.platform==="iPad"){
a = window.orientation === 90 || window.orientation === -90 ?
"landscape.jpg":"portrait.jpg"
} else {
a = window.devicePixelRatio === 2 ?
"retina.jpg" : "startup.jpg"
}
document.write('<link rel="apple-touch-startup-image" href="'+a+'"/>')
})()
</script>
Your logic would have to add some variable to the images name. So if it's time, you will have
landscape-Morning.jpg
landscape-Noon.jpg
landscape-TeaTime.jpg
landscape-Evening.jpg
Same for the other images.
Haven't tried this but since you can use javscript to set which image to be displayed depending on orientation it shouldn't be a problem to set which image depending on time of day.

Resources