Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import the module needed to build an iOS app in React Native.
React Native
import [1] from 'react-native';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using View or Text instead of AppRegistry.
Forgetting to import AppRegistry causes the app not to start.
✗ Incorrect
AppRegistry is the module used to register the main component for iOS build in React Native.
2fill in blank
mediumComplete the command to create a new iOS build archive using Xcode command line tools.
React Native
xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration Release [1] MyApp.xcarchive archive Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using -exportPath instead of -archivePath.
Confusing -sdk with archive path.
✗ Incorrect
The -archivePath option specifies where to save the archive file during the build.
3fill in blank
hardFix the error in the command to export an IPA file from the archive using the correct option for the export options plist.
React Native
xcodebuild -exportArchive -archivePath MyApp.xcarchive -exportPath ./build -[1] exportOptions.plist Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect option names like -exportOptions or -exportPlist.
Missing the 'Plist' suffix causes command failure.
✗ Incorrect
The correct option to specify the export options plist file is -exportOptionsPlist.
4fill in blank
hardFill both blanks to complete the command that lists all available signing identities on your Mac.
React Native
security [1] -v | grep [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'codesign' instead of 'find-identity'.
Filtering with 'Apple' instead of 'iPhone' misses iOS certs.
✗ Incorrect
The 'security find-identity -v' command lists signing identities, and filtering with 'iPhone' shows iOS certificates.
5fill in blank
hardFill all three blanks to complete the React Native command to run the iOS app on a specific device.
React Native
npx react-native run-ios --device "[1]" --scheme [2] --configuration [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Debug' instead of 'Release' for production builds.
Using simulator names instead of device names.
✗ Incorrect
The device name is 'iPhone 14', the scheme is 'MyAppScheme', and the configuration for production build is 'Release'.