This is a step-by-step guide to create React Native app.
You will get an application which has;
- TypeScript
- Linting
- Formatting
- Testing
| extension UIHostingController { | |
| convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
| self.init(rootView: rootView) | |
| if ignoreSafeArea { | |
| disableSafeArea() | |
| } | |
| } | |
| func disableSafeArea() { |
| // Take photo from camera and save it to public gallery | |
| // Before Q and After Q implementations | |
| // Answer riginally taken from this SO answer | |
| // https://stackoverflow.com/a/59482148/5695091 | |
| private val REQUEST_TAKE_PHOTO = 101 | |
| private val REQUEST_PICK_PHOTO = 102 | |
| private var photoURI : Uri? = null | |
| // | |
| // Created by https://quickplan.app on 2020/11/8. | |
| // | |
| import SwiftUI | |
| /// Control if allow to dismiss the sheet by the user actions | |
| /// - Drag down on the sheet on iPhone and iPad | |
| /// - Tap outside the sheet on iPad | |
| /// No impact to dismiss programatically (by calling "presentationMode.wrappedValue.dismiss()") |
| import SwiftUI | |
| import os | |
| @main | |
| struct ios14DemoApp: App { | |
| @StateObject var notificationCenter = NotificationCenter() | |
| @UIApplicationDelegateAdaptor private var appDelegate: AppDelegate | |
| var body: some Scene { | |
| WindowGroup { |
| import AsyncStorage from '@react-native-community/async-storage'; | |
| import { | |
| setGenericPassword, | |
| getGenericPassword, | |
| resetGenericPassword, | |
| } from 'react-native-keychain'; | |
| const KeychainStorage = { | |
| async getAllKeys(cb) { | |
| try { |
| # remove iOS bitcode | |
| flutter build ios | |
| cd build/ios/iphoneos/Runner.app/Frameworks | |
| cd App.framework | |
| xcrun bitcode_strip -r app -o app | |
| cd .. | |
| cd Flutter.framework | |
| xcrun bitcode_strip -r Flutter -o Flutter | |
| cd ../../../../../../ |
| #!/bin/bash | |
| NDK=/Volumes/Samsung-T5/sdk/android-ndk-r21b | |
| TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/darwin-x86_64 | |
| API=21 | |
| function build_android() { | |
| cd ffmpeg-4.3.1 | |
| echo "Compiling FFmpeg for $CPU" | |
| ./configure \ |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>downloadables</key> | |
| <array> | |
| <dict> | |
| <key>fileSize</key> | |
| <integer>1171440164</integer> | |
| <key>identifier</key> |
| i386 : iOS Simulator 32-bit | |
| x86_64 : iOS Simulator 64-bit | |
| iPhone1,1 : iPhone 1st Gen | |
| iPhone1,2 : iPhone 3G 2nd Gen | |
| iPhone2,1 : iPhone 3GS 3rd Gen | |
| iPhone3,1 : iPhone 4 | |
| iPhone3,2 : iPhone 4 (GSM) Rev A | |
| iPhone3,3 : iPhone 4 (CDMA) | |
| iPhone4,1 : iPhone 4s |