Problem to run Nativescript app on iOS 14? - ios

after updating my NS app to latest version.. I am now suffering to run it on my iOS device..app simply does not open even though its installed. I was trying to run from xcode and got this msg on log :
Class TKDataSource is implemented in both /System/Library/Frameworks/CryptoTokenKit.framework/CryptoTokenKit (0x1fdff00d8) and /private/var/containers/Bundle/Application/A97BDBFB-56E2-4303-A817-F582CEF25550/MYDOC.app/Frameworks/TNSListView.framework/TNSListView (0x104966e70). One of the two will be used. Which one is undefined.
ns run ios shows this error :
unable to apply changes on device: 7BE6C620-A73C-42DF-81AD-65A0083CB13E. Error is: ENOENT: no such file or directory, scandir '/Users/timmrichter/Library/Developer/CoreSimulator/Devices/7BE6C620-A73C-42DF-81AD-65A0083CB13E/data/Applications'.
Any Idea?
Thanks

Try adding an Applications folder to the path /Users/timmrichter/Library/Developer/CoreSimulator/Devices/7BE6C620-A73C-42DF-81AD-65A0083CB13E/data.

I hit that problem, too. I was able to bypass it by opening the emulator via xcode first, and then entering tns run ios --emulator.

what worked for me was making the directory that's trying to be scanned. So in your case running the command
" mkdir /Users/timmrichter/Library/Developer/CoreSimulator/Devices/7BE6C620-A73C-42DF-81AD-65A0083CB13E/data/Applications "
Should solve the problem.

As I have some plugins like i18n which seems not supported on NS latest version. At the end I have downgraded to version 6.5.3 and it's now working on iOS 14.

Related

Xcode 10 - Can't Build React Native Application

Since updating the Xcode 10, I cannot build and run my app either on a physical device or on the simulator. I have tried via the terminal and directly through Xcode. What I have tried:
Removing my repo and re pulling.
https://github.com/facebook/react-native/issues/19573
https://github.com/facebook/react-native/issues/14382
https://medium.com/#swyx/if-you-get-a-third-party-config-h-35a3c54e9278
Print: Entry, ":CFBundleIdentifier", Does Not Exist
"config.h" file not found in iOS project of React native
I do not know what is left to do. I have had all the errors outlined in the above links. the main one that I am having trouble with at the moment is that config.h does exist and cfbundleidentifier", does not exist.
After following the instructions layed out in all the links provided, all I needed to do was run npm audit fix and it started working.

NativeScript IOS project.pbxproj not found

I am trying to run the hello world nativescript app using the command "tns run ios" but i am getting "Unable to apply changes on device: <device id>. Error is: ENOENT: no such file or directory, open '/<path_to_project>/NativeTest/platforms/ios/NativeTest.xcodeproj/project.pbxproj'.". Running it in Xcode works. I really ran out of ideas . Also, i checked and the file is actually there
After hours of time spent with this issue i found a fix, so maybe my answer would help somebody else. The issue was caused by me setting in XCode the dev team in the project. After i set the team project for the current project, i create a new project and it automatically got the team id i set at the old project without my intervention and now it works without errors. Yay
ns clean did it for me like it told me to do 😆 The platforms/ios folder appears to be invalid. If the build fails, run 'ns clean' and rebuild the app.
I was running npm run ios

ios Could not get BatchedBridge, make sure your bundle is packaged properly

I am getting this while running app on simulator using xCode, version 9.2
I've tried other solution mentioned on Stack overflow & Github S1S2 S3 S4 but most of the solution are mentioned for android.
P.S. This project also includes purescript code explained here Integrate Pure Script in your React Native project
That's how I resolved it.
Terminate your metro bundler > react-native link > react-native run-ios
It was not bundling because of some errors which was not showing in the simulator but just this error was thrown.
create index.js, index.android.js and index.ios.js whith the same content. I do have all of them and it solved my issue
I have also faced the same issue when I changed the name of images saved in my local directory. In my case, I have just restarted metro bundler, deleted the app, and restarted the app. Issue was fixed for me.
Try this:
npx react-native-asset
then:
react-native run-ios
This issue is caused basically when some packages or images are not bundled properly, it might be caused because of improper assets path or internet issue when installing packages or reload issue. The expo bundles into a standalone library so it can be available immediately.
This error does not provide any stack to debug since it does not properly have the bundled data even for error stack.
I have just face few bundled scenarios
Scenario 1 => While the expo is running and we install a new library on fly, few times during this importing the library might not get bundled properly, so it's better to stop the expo and re-run, or try reloading the error in app. This will some time resolve the issue, or if there is some error it will show up the error stack
Scenario 2 => You have a customised asset director or have changed the asset path in app.json file improperly.
Please let me know in comments if there are any other scenarios
I had a metro bundler terminal window opened and whenever I was running npm run ios , it wasn't starting a new metro server, the problem was that. I closed the metro bundler terminal window and ran npm run ios and it opened a started a new metro server and the error was gone
I had a same issue, then I did:
rm -rf node_modules,
npm install
and restarted the metro (npm start). It worked.
In Settings, go to Privacy > Local Network to see a list of every app that requested access. I solved by allowing my app to access to the local network. (Trying to run on physical iPhone device from my mac m1 on the same wifi).
Source
Make sure that when you restart the expo project you do so with expo start -c
-c throws out the cache, otherwise the problem persisted for me.

React-Native: Build error GeneratedInfoPlistDotEnv.h file not found

I had a old React-Native project which I wanted to give it a try again and when trying to run the project on iOS (Android works perfect) I get the error that Debug-iphonesimulator/GeneratedInfoPlistDotEnv.h file not found.
If I run the project from the command react-native run-ios, than the build will succeed.
What can cause this issue and how can it be fixed?
I have tried to fix it with the comments from this issue but no success.
React-Native verision: 0.47
Full error:
<built-in>:1:10: fatal error:
'/Users/myUser/Library/Developer/Xcode/DerivedData/Project-gcaxrvbcwgkfhkadevoqxcprxszw/Build/Products/Debug-iphonesimulator/GeneratedInfoPlistDotEnv.h' file not found
I fixed by copying file GeneratedInfoPlistDotEnv.h (in /ios/build/Build/Products/) to the path mentioned in the error message.
The path mentioned in error message for simulator is not same as real phone, you need to copy for a second time.
The development for React Native just like droped in a deep black hole, what you need to do is just climb and climb and climb...
Changing the Info.plist preprocessor prefix file to works for me ${CONFIGURATION_BUILD_DIR}/../GeneratedInfoPlistDotEnv.h
Image of code in Xcode 9
If you're coming from React version 0.60 and above, you should be referencing the package from GitHub instead of NPM. The author hasn't released auto-linking support on NPM yet, even though it's already merged!?
Try these steps after you unlink and uninstall the existing version of react-native-config. Remember to revert to default Info.plist preprocessor settings in XCode build settings.
yarn add https://github.com/luggit/react-native-config.git
cd ios && pod install
You don't have to add any other post-install scripts, just run the app like usual and it should work fine. Make sure you undo any other fixes before doing this.

Meteor cordova ios project pch errors

I've been working on a Meteor project using Cordova to build an iOS app. It was working very smoothly for a while and then all of a sudden I started getting this error:
❯❯❯ meteor run ios
Error while running for mobile platforms: Error running
/Users/chet/.meteor/packages/meteor-tool/.1.0.37.19du6bc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/cordova-scripts/cordova.sh
2014-12-23 13:35:00.970 xcodebuild[46060:3143193] error: InputFile /Users/chet/Code/meteor/5cmenu/.meteor/local/cordova-build/platforms/ios/5C Menu/5C
Menu-Prefix.pch 0 1418992636 959 33188... malformed line 9; 'InputFile' should have exactly five arguments
If I open the .xcodeproj in .meteor/local/cordova-build/platforms/ios/, the project runs just fine. However, its an old version of my meteor app.
I tried deleting .meteor/local, then meteor run ios. I get the same error. And when I opened the .xcodeproj, it worked when I tried running it.
I also tried meteor remove-platform ios then meteor add-platform ios. Then I ran meteor run ios. I get the same error, but again, when I opened the .xcodeproj, it worked.
Theres a similar [issue posted here](https://github.com/meteor/meteor/issues/3105
).
A couple things I've tried are deleting the Xcode DerivedData folder, and cleaning my Xcode build cache for the project by running cmd+shift+K which seems totally unnecessary for this problem.
I also found a similar issue here that said this is a "non-fatal error".
Any ideas how to fix this problem?
So one of the ways reset your Xcode build is with rm -rf .meteor/local/. Then meteor run ios-device will build a new project. However, when you do this, you end up with his PCH error because of some sort of caching.
You'll find a path in your error that looks something like this
/var/folders/x5/mdr8syvj7lsb_sg_pr0j7y_h0000gn/C/com.apple.DeveloperTools/6.1.1-6A2008a/Xcode/SharedPrecompiledHeaders/
Notice the SharedPrecompiledHeaders part. Delete the app that starts with your app name. Then do this all over
rm -rf .meteor/local/
meteor run ios-device
Works every time
You have a space in your path, which is being interpreted as another argument.
/Users/chet/Code/meteor/5cmenu/.meteor/local/cordova-build/platforms/ios/5C Menu/5C
More info here: https://github.com/meteor/meteor/issues/3105#issuecomment-75580362

Resources