Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

How to link splash screen image with xib file in expo in ios

$
0
0

So, did achieved splash screen in android, But in IOS I had to create .xib file using xcodeI made that and the xml code which looked like this

<?xml version="1.0" encoding="UTF-8"?><document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES"><device id="retina6_1" orientation="portrait" appearance="light"/><dependencies><plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/><capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/></dependencies><objects><placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/><placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/><view contentMode="scaleToFill" id="iN0-l3-epB"><rect key="frame" x="0.0" y="0.0" width="480" height="480"/><autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/><subviews><imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Splash" translatesAutoresizingMaskIntoConstraints="NO" id="dmA-Xr-d65"><rect key="frame" x="120" y="60" width="240" height="128"/><autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/></imageView><label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="App Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZxK-KE-XZU"><rect key="frame" x="151" y="196" width="179" height="35"/><autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/><fontDescription key="fontDescription" name=".SFNS-Regular" family=".AppleSystemUIFont" pointSize="31"/><color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/><nil key="highlightedColor"/></label></subviews><color key="backgroundColor" red="0.43213649611398963" green="0.074902013912802171" blue="0.14326473451700134" alpha="1" colorSpace="custom" customColorSpace="sRGB"/><nil key="simulatedStatusBarMetrics"/><freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/><point key="canvasLocation" x="548" y="455"/></view></objects><resources><image name="Splash" width="40" height="40"/></resources></document>

here you can see

<resources><image name="Splash" width="40" height="40"/></resources>

You can see image resources tags here and name Splash and i do have image somewhere in my assets folder but how do i like in it my xml file .. if you need my app.json here it is

{"expo": {"name": "myapp","slug": "myapp","privacy": "unlisted","sdkVersion": "36.0.0","platforms": ["ios", "android", "web"],"version": "1.0.0","orientation": "portrait","icon": "./assets/icon.png","scheme": "myapp","updates": {"fallbackToCacheTimeout": 0    },"splash": {"image": "./assets/splash.png"    },"assetBundlePatterns": ["**/*"],"ios": {"bundleIdentifier": "np.myapp.com","buildNumber": "0.0.1.1","supportsTablet": true,"usesAppleSignIn": true,"googleServicesFile": "./GoogleService-Info.plist","config": {"googleSignIn": {"reservedClientId": "com.googleusercontent.apps.123213Xxxxxxxxxx"        }      },"requireFullScreen": true,"splash": {"xib": "./LaunchScreen.xib","image": "./assets/splash.png","resizeMode": "contain"      }    },"androidStatusBar": {"backgroundColor": "#000","translucent": false    },"android": {"splash": {"mdpi": "./assets/android/mipmap-mdpi/ic_launcher.png","hdpi": "./assets/android/mipmap-hdpi/ic_launcher.png","xhdpi": "./assets/android/mipmap-xhdpi/ic_launcher.png","xxhdpi": "./assets/android/mipmap-xxhdpi/ic_launcher.png","xxxhdpi": "./assets/android/mipmap-xxxhdpi/ic_launcher.png","image": "./assets/splash.png","resizeMode": "native"      },"package": "np.appname.com","versionCode": 1,"googleServicesFile": "./google-services.json","config": {"googleSignIn": {"apiKey": "xxxxxxx","certificateHash": "xxxxxx"        }      }    },"description": ""  }}

Viewing all articles
Browse latest Browse all 16552

Trending Articles