Cannot successfully prepare iOS - ios

I cannot seem to get the tns prepare ios command to work since upgrading from "tns-core-modules": "6.2.1" to "tns-core-modules": "^6.3.2". I receive the following message:
Webpack compilation complete.
Installing pods...
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod
"MaterialComponents/Tabs": In Podfile:
MaterialComponents/Tabs (~> 92.3)
MaterialComponents/Tabs (~> 94.5)
None of your spec sources contain a spec satisfying the dependencies:
MaterialComponents/Tabs (~> 92.3), MaterialComponents/Tabs (~>
94.5).
You have either: * out-of-date source repos which you can update with
pod repo update or with pod install --repo-update. * mistyped the
name or version. * not added the source repo that hosts the Podspec
to your Podfile.
[!] There are duplicate dependencies on MaterialComponents/Tabs in
Podfile:
MaterialComponents/Tabs (~> 92.3)
MaterialComponents/Tabs (~> 94.5) 'pod install' command failed. For more information on resolving CocoaPod issues in NativeScript read.
I have tried running pod repo update and pod install --repo-update with no success. I'm running this with xCode 10.1 on macOS 10.13.6 (High Sierra).
package.json
{
"description": "xxxx",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "xxxxx",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "xxxxxx",
"tns-android": {
"version": "6.2.0"
},
"tns-ios": {
"version": "6.3.0"
}
},
"dependencies": {
"#nativescript/core": "6.2.1",
"#nativescript/theme": "2.2.0",
"#progress-nativechat/nativescript-nativechat": "2.0.4",
"axios": "^0.19.0",
"kinvey-nativescript-sdk": "4.2.5",
"nativescript-accelerometer": "3.0.0",
"nativescript-background-http": "4.2.1",
"nativescript-camera": "4.5.0",
"nativescript-fonticon": "^2.0.0",
"nativescript-geolocation": "5.1.0",
"nativescript-image": "2.2.5",
"nativescript-imagepicker": "7.1.0",
"nativescript-intl": "3.0.0",
"nativescript-iqkeyboardmanager": "1.5.1",
"nativescript-purchase": "^2.0.13",
"nativescript-social-share": "1.5.2",
"nativescript-theme-core": "1.0.6",
"nativescript-ui-autocomplete": "6.0.0",
"nativescript-ui-calendar": "6.0.0",
"nativescript-ui-chart": "7.0.0",
"nativescript-ui-dataform": "6.0.0",
"nativescript-ui-gauge": "6.0.0",
"nativescript-ui-listview": "8.0.1",
"nativescript-ui-sidedrawer": "8.0.0",
"nativescript-vue": "2.4.0",
"tns-core-modules": "^6.3.2"
},
"devDependencies": {
"#babel/core": "7.6.4",
"#babel/preset-env": "^7.7.7",
"babel-loader": "^8.0.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"clean-webpack-plugin": "^0.1.19",
"copy-webpack-plugin": "^4.5.2",
"css-hot-loader": "^1.4.2",
"css-loader": "^1.0.0",
"lazy": "1.0.11",
"mini-css-extract-plugin": "^0.4.1",
"nativescript-dev-webpack": "1.3.0",
"nativescript-vue-template-compiler": "^2.0.0-alpha.3",
"nativescript-worker-loader": "~0.9.0",
"node-sass": "^4.9.2",
"sass-loader": "^7.1.0",
"tns-platform-declarations": "6.2.1",
"uglifyjs-webpack-plugin": "~1.2.7",
"vue-loader": "^15.8.3",
"webpack": "^4.41.5",
"webpack-bundle-analyzer": "~2.13.1",
"webpack-cli": "^3.1.0"
}
}

I had the same issue, removing and adding again the IOS platform resolved it.

Related

Nativescript IOS build Cacoapods could not find compatible versions for pod

I have Nativescript 8 app :
{
"name": "TEST",
"main": "src/main.ts",
"version": "1.0.1",
"private": true,
"dependencies": {
"#angular/animations": "~14.2.0",
"#angular/common": "~14.2.0",
"#angular/compiler": "~14.2.0",
"#angular/core": "~14.2.0",
"#angular/forms": "~14.2.0",
"#angular/platform-browser": "~14.2.0",
"#angular/platform-browser-dynamic": "~14.2.0",
"#angular/router": "~14.2.0",
"#nativescript-community/ui-zoomimage": "^4.3.6",
"#nativescript/angular": "~14.2.0",
"#nativescript/camera": "^5.0.13",
"#nativescript/core": "~8.3.0",
"#nativescript/datetimepicker": "^2.1.11",
"#nativescript/firebase": "^11.1.3",
"#nativescript/firebase-auth": "^2.4.4",
"#nativescript/firebase-core": "^2.4.4",
"#nativescript/firebase-firestore": "^2.4.4",
"#nativescript/firebase-storage": "^2.4.4",
"#nativescript/imagepicker": "^1.0.7",
"#nativescript/local-notifications": "^6.0.0",
"#nativescript/theme": "~3.0.2",
"#triniwiz/nativescript-image-zoom": "^4.2.0",
"moment": "^2.29.4",
"nativescript-phone": "^3.0.3",
"nativescript-ui-listview": "^14.2.4",
"rxjs": "~7.5.0",
"zone.js": "~0.11.5"
},
"devDependencies": {
"#angular-devkit/build-angular": "~14.2.0",
"#angular/compiler-cli": "~14.2.0",
"#nativescript/ios": "8.4.0",
"#nativescript/preview-cli": "1.0.2",
"#nativescript/types": "~8.3.0",
"#nativescript/webpack": "~5.0.9",
"#ngtools/webpack": "~14.2.0",
"typescript": "~4.7.0"
}
}
After i try to run ns build ios :
ERROR :
Installing pods... Analyzing dependencies Pre-downloading:
FirebaseFirestore from
https://github.com/invertase/firestore-ios-sdk-frameworks.git, tag
9.6.0 Pre-downloading: QBImagePickerController from https://github.com/flypapertech/QBImagePicker.git, commit
47aa21d32f8e6db0df79b089ad64e43d498b5951 [!] CocoaPods could not find
compatible versions for pod "FirebaseFirestore": In Podfile:
FirebaseFirestore (from https://github.com/invertase/firestore-ios-sdk-frameworks.git, tag
9.6.0)
Specs satisfying the FirebaseFirestore (from
https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag
9.6.0)` dependency were found, but they required a higher minimum deployment target. 'arch install' command failed.
What should i change to make this build work ? I can't even understand the error itself, can someone explain ?
Generally, you'll probably get answers faster on the Nativescript Discord server.
I believe it's telling you that it can't find/install the proper pods from CocoaPods.
It's looking for pods compatible with an older minimum iOS version.
You can build your app for a newer minimum versions by placing
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
in your build.xcconfig file.
Then run
ns clean
and try again.
If that doesn't work, you may also need to run
pod repo update

Expo SDK 46 iOS build failed in pod installation step

I am trying to build iOS app from expo managed project. The build fails At Pod installation step.
In Expo SDK 44, 45 everything was okay. But when I upgrade to SDK 46, I am facing the issue.
Here is my package.json
{
"name": "App1234",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"#expo/vector-icons": "^13.0.0",
"#openspacelabs/react-native-zoomable-view": "^2.0.4",
"#react-native-community/datetimepicker": "6.2.0",
"#react-native-community/netinfo": "9.3.0",
"#react-native-community/slider": "4.2.3",
"#react-native-google-signin/google-signin": "^8.1.0",
"#react-navigation/bottom-tabs": "^6.4.0",
"#react-navigation/drawer": "^6.5.0",
"#react-navigation/native": "^6.0.13",
"#react-navigation/native-stack": "^6.9.0",
"#react-navigation/stack": "^6.3.2",
"#stripe/stripe-react-native": "0.13.1",
"#types/react-native": "~0.69.1",
"apisauce": "^2.1.6",
"expo": "~46.0.13",
"expo-apple-authentication": "^4.3.0",
"expo-constants": "^13.2.4",
"expo-document-picker": "^10.3.0",
"expo-firebase-recaptcha": "^2.3.0",
"expo-font": "^10.2.1",
"expo-image-picker": "^13.3.1",
"expo-linear-gradient": "^11.4.0",
"expo-linking": "^3.2.2",
"expo-location": "^14.3.0",
"expo-notifications": "^0.16.1",
"expo-secure-store": "^11.3.0",
"expo-tracking-transparency": "^2.3.1",
"expo-updates": "^0.14.6",
"firebase": "9.9.2",
"formik": "^2.2.9",
"html-entities": "^2.3.3",
"lodash": "^4.17.21",
"lottie-react-native": "5.1.3",
"mime": "^3.0.0",
"moment": "^2.29.4",
"qs": "^6.11.0",
"react": "18.0.0",
"react-native": "0.69.6",
"react-native-draggable-flatlist": "^3.1.2",
"react-native-fbsdk-next": "^11.0.0",
"react-native-geocoding": "^0.5.0",
"react-native-gesture-handler": "~2.5.0",
"react-native-google-mobile-ads": "^8.2.0",
"react-native-maps": "0.31.1",
"react-native-phone-number-input": "^2.1.0",
"react-native-progress": "^5.0.0",
"react-native-razorpay": "^2.2.9",
"react-native-read-more-text": "^1.1.2",
"react-native-reanimated": "~2.9.1",
"react-native-safe-area-context": "4.3.1",
"react-native-screens": "~3.15.0",
"react-native-svg": "12.3.0",
"react-native-webview": "11.23.0",
"react-native-youtube-iframe": "^2.2.2",
"typescript": "^4.6.3",
"yup": "^0.32.11"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
Here is Install Pods logs
Using Expo modules
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.13.2/bin/node
Adding a custom script phase for Pod RNGoogleMobileAds: [RNGoogleMobileAds] Configuration
Auto-linking React Native modules for target `HomListi`: RNDateTimePicker, RNGestureHandler, RNGoogleMobileAds, RNGoogleSignin, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-fbsdk-next, react-native-maps, react-native-netinfo, react-native-razorpay, react-native-safe-area-context, react-native-slider, react-native-webview, and stripe-react-native
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
[stderr] /Users/expo/workingdir/build/node_modules/react-native-fbsdk-next/react-native-fbsdk-next.podspec:4: warning: already initialized constant Pod::FBSDKVersion
[stderr] /Users/expo/workingdir/build/node_modules/react-native-fbsdk-next/react-native-fbsdk-next.podspec:4: warning: previous definition of FBSDKVersion was here
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
[!] CocoaPods could not find compatible versions for pod "ExpoAdapterGoogleSignIn":
In Podfile:
ExpoAdapterGoogleSignIn (from `../node_modules/#react-native-google-signin/google-signin/ios`)
Specs satisfying the `ExpoAdapterGoogleSignIn (from `../node_modules/#react-native-google-signin/google-signin/ios`)` dependency were found, but they required a higher minimum deployment target.
Error: Compatible versions of some pods could not be resolved.
You are seeing this error because either:
- Versions in the cached Podfile.lock do not match required values in Podspecs of some installed libraries. To fix this, you can re-run build command with "--clear-cache" option, or select "Clear cache and retry build" on the build page.
- Some of the pods used in your project depend on different versions of the same pod. See logs for more information.
I've used 'eas build -p ios' command
also used 'eas build -p ios --clear-cache'
didn't work.
Can anybody help please. Please please please!!!!
Update your Podfile platform to 13:
platform :ios, '13.0'
Update the Pod file i.e platform to 13.0 or higher.
platform :ios, podfile_properties['ios.deploymentTarget'] || '13.0'
try downgrade version "#react-native-google-signin/google-signin":"8.0.0"

error Command failed with exit code 1 with react-native and Xcode library not found

I'm getting the following error when I clone react native project from github, yarn install, cd ios && pod install, cd .. , yarn ios . And/or when I ran react-native run-ios as well:
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
In addition, when I open the .xcworkspace in the Xcode, I get the error:
library not found for BugsnagReactNative
The package.json is:
{
"name": "proj",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"build": "CI= npm run build",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#bugsnag/react-native": "^7.16.2",
"#react-native-async-storage/async-storage": "^1.15.6",
"#react-native-community/checkbox": "^0.5.8",
"#react-native-community/datetimepicker": "^4.0.1",
"#react-native-community/masked-view": "^0.1.11",
"#react-native-community/netinfo": "^6.0.0",
"#react-navigation/bottom-tabs": "^6.0.5",
"#react-navigation/native": "^6.0.2",
"#react-navigation/stack": "^6.0.7",
"amazon-cognito-identity-js": "^5.1.0",
"aws-amplify": "^4.2.4",
"axios": "^0.21.1",
"package": "^1.0.1",
"prop-types": "^15.7.2",
"react": "17.0.2",
"react-native": "0.66.3",
"react-native-carousel": "^0.12.0",
"react-native-codegen": "^0.0.7",
"react-native-collapsible": "^1.6.0",
"react-native-date-picker": "^4.1.1",
"react-native-dropdown-picker": "^5.1.23",
"react-native-exit-app": "^1.1.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-mask-input": "^1.0.3",
"react-native-modal-dropdown": "^1.0.1",
"react-native-month-year-picker": "^1.8.0",
"react-native-safe-area-context": "^3.3.0",
"react-native-screens": "^3.13.1",
"react-native-select-dropdown": "^1.1.0",
"react-native-snap-carousel": "^3.9.1",
"tcomb-form-native": "^0.6.20",
"toggle-switch-react-native": "^3.2.0",
"yarn": "^1.22.17"
},
"devDependencies": {
"#babel/core": "^7.15.0",
"#babel/runtime": "^7.15.3",
"#bugsnag/source-maps": "^2.3.1",
"#react-native-community/eslint-config": "^3.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "26.6.3",
"eslint": "7.32.0",
"jest": "^27.0.6",
"metro-react-native-babel-preset": "^0.66.2",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
}
The solutions below I tried didn't work.
yarn add global #bugsnag/react-native-cli
change rct-folly deployment target to 9.0
set Build Active architecture Only to Yes
click and install ios 13.0 simulator in xcode
delete the search paths in build settings delete pods folder, and installed pods again
remove all lines in the 'Other Linker Flags' list BUT only if $(inherited) is at the top
pod update
reinstall ruby/gem
uninstall and reinstall Cocoapods
rm -rf node_modules, yarn cache clean
remove the podfile.lock and the pod, re-install them
sudo arch -x86_64 gem install ffi, arch -x86_64 pod install
uninstall and reinstall watchman
check node version, react native version, and bugsnag version
comment out bugsnag dependencies from package. json
fresh install multiple times
try this
npx #bugsnag/react-native-cli init
and check bugsnag documentation as you need to have a project available on bugsnag

React/RCTDefines.h file not found in RCTBridgeModule.h

I was using Expo and I separated expo eject for module use.
And I tried pod install in iOS file. it was work.
Pod installation complete! There are 51 dependencies from the Pod file
and 63 total pods installed.
But An error occurred when the Xcode was opened and the build and run button was pressed.
package.json:
{
"name": "testgame",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-cli": "6.26.0",
"babel-plugin-module-resolver": "^3.1.1",
"babel-preset-es2015": "6.24.1",
"jest-expo": "27.0.0",
"react-native-scripts": "1.14.0",
"react-test-renderer": "16.3.1"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"#expo/vector-icons": "^8.1.0",
"bignumber.js": "^8.1.1",
"crypto-browserify": "^3.12.0",
"eth-lightwallet": "^3.0.1",
"ethereumjs-tx": "^1.3.7",
"ethereumjs-util": "^6.0.0",
"ethereumjs-wallet-react-native": "^0.6.7",
"expo": "^30.0.0",
"expokit": "^1.8.0",
"formik": "^1.3.2",
"js-sha3": "^0.8.0",
"native-base": "^2.8.2",
"node-libs-browser": "2.1.0",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-confirmation-code-input": "^1.0.4",
"react-native-fast-crypto": "^1.8.1",
"react-native-fetch-blob": "git+https://github.com/HCL-HO/react-native-fetch-blob-expo.git",
"react-native-fs": "^2.13.3",
"react-native-keychain": "^3.1.2",
"react-native-pin-view": "^2.2.1",
"react-native-secure-randombytes": "^3.0.0",
"react-native-touch-id": "^4.4.1",
"react-navigation": "3.0.4",
"web3": "1.0.0-beta.34",
"yup": "^0.26.6"
}
}
Xcode Version: 10.2.1
I've never used Xcode before, so I'm a beginner. Please explain it in detail. I'd appreciate it if you could explain it with a screenshot.
I made a podsec myself and solved it.
This is not in the official document and requires a fundamental solution from the module developer.
This solution creates a lot of Warning. There's nothing wrong with the code.
Remove react-native-secure-randombytes path from Header Search Path
Unlink react-native-secure-randombytes module - react-native unlink react-native-secure-randombytes
Added react-native-secure-randombytes.podspec from this link
Added next code into pod file:
pod 'react-native-secure-randombytes', :path =>
'../node_modules/react-native-secure-randombytes'
do `pod install'

Rails/Webpacker is not working

I have a Rails/React project. It's using Rails/webpack 3.3.0.
To precompile react code, I executed:
rails assets:precompile RAILS_ENV=development
But I am getting this error:
[Webpacker] Compilation failed:
(node:47256) DeprecationWarning: Tapable.apply is deprecated.
Call apply on the plugin directly instead (node:47256)
DeprecationWarning:
Tapable.plugin is deprecated. Use new API on .hooks instead
TypeError: dep.getResourceIdentifier is not a function
Is this something you faced before? Would you like to help me to fix thsi problem?
Here is my package.json
{
"dependencies": {
"#rails/webpacker": "3.3.0",
"babel-core": "6",
"babel-loader": "^7.1.4",
"babel-preset-react": "^6.24.1",
"caniuse-lite": "^1.0.3000697",
"classnames": "^2.2.5",
"coffee-loader": "^0.9.0",
"coffeescript": "^2.2.2",
"debounce": "^1.1.0",
"es6-shim": "^0.35.3",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"mobile-detect": "^1.4.1",
"prop-types": "^15.6.1",
"react": "16.0.0",
"react-addons-css-transition-group": "^16.0.0-alpha.3",
"react-addons-update": "^15.6.2",
"react-bootstrap": "^0.32.1",
"react-dom": "^16.2.0",
"react-dom-factories": "^1.0.2",
"react_ujs": "^2.4.4",
"uglifyjs-webpack-plugin": "^1.2.5",
"webpack": "4.0.0"
},
"devDependencies": {
"webpack-cli": "^2.0.15",
"webpack-dev-server": "^3.1.0"
},
"license": "UNLICENSED",
"private": true
}
The version of Webpacker you are using isn't compatible with Webpack 4.
However, it looks like support is close, Webpack 4.x support has been merged:
https://github.com/rails/webpacker/pull/1316
And there's a Webpacker 4.x preview release:
https://rubygems.org/gems/webpacker
So I believe you want to use Webpack 3.x for the time being, or go bleeding edge and try the prerelease.
With that said, I'm going to give the prerelease a go, I've been waiting for Webpack 4.x support!

Resources