I'm following the NativeScript tutorial, but when I'm trying to load the image with res:// is not working with iOS.
<Image src="res://logo" stretch ="none" />
The file is in the App_Resources/iOS/logo.png
UPDATE:
Now works:
1.- Uninstall the app from the device/emulator
2.- Then do a new tns build ios
to get a fresh build
Related steps for the same issue but with Android.
tns platform remove Android
tns platform add Android
tns run Android
Added explanation: The issue here is that your app isn't really running from AppResources. It is actually running from platform/ios and platform/android, both of which are compiled during a fresh build.
So when you add an image under AppResources, great, but unless you rebuild the app is still running on outdated resources found in platform/ios and platform/android.
Removing the platforms and adding the platforms will ensure the folders your app is using mimic App Resources. And your image will be available.
It worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With