React Native + ARKit = "React/RCTConvert.h not found" - ios

I am trying to use React Native with ARKit for the first time and I ran into a problem.
What I did:
(in Terminal)
react-native init myApp
cd myApp
npm install --save react-native-arkit
react-native link react-native-arkit
(in XCode)
Open myApp workspace under myApp/ios
Assign my Team
Trying to Build on a device
What I got:
React/RCTConvert.h' file not found
in color-grabber.m
I found a lot of references to the same problem online (dating back to 2017+), none of the fixes they offered seemed to work for me.
Truly appreciate any help!

Just want to provide an update if anyone is interested.
After a long array of manual updates to the settings I managed to fix most of the issues. However, given that the package is not supported, I gave up on it.
The way to go seems Viro React which is now open source and is pretty actively supported. Unfortunately, it is not suitable for my purposes (I need a very small footprint), so I will try using iOS native components instead.

Related

React native QRCode scanner integration problem

im trying to integrate react-native-qrcode-scanner into my project. I do all they say in the installation guide but get following error :
I see that this line of code inside this library fails :
return PermissionsIOS.requestPermission(
PermissionsIOS being imported as
const PermissionsIOS = NativeModules.ReactNativePermissions
So it seems like permissions was not loaded into the project.
Any ideas?
Ok, I found it. The thing is that by some strange reason react-native link react-native-permissions didnt work out. I've read installation on react-native-permissions's page. It says that one of 3 following must be done :
Installation via pods - made only worse
running react-native link react-native-permissions - didnt work in first place
Manual linkage with XCode
Only 3rd alternative did the trick for me.

How to resolve conflicts in `project.pbxproj` file while upgrading react native?

I am using Xcode 9.4 and current react native version #0.54.4 I want to upgrade the version to 0.55.4.
As I upgrade my project using react-native-git-upgrade, I see some un merged conflicts in the project.pbxproj. Some of the settings are my own that are conflicting with the changes in the new version.
I tried all the possible ways in which I could resolve the conflicts. But still X-code shows the error could not load the project, and it does not allow me to build my project.
How do I understand what those conflicts are referring to and how can I safely resolve the conflicts?
Unfortunately there is no magic way to resolve conflicts. I wish there was. The file is managed by Xcode and from personal experience I have found that you can easily mess it up performing merges.
Git is definitely your best-friend. Make sure that before you start any merge you are on a new branch and fully committed so that if you mess-up you can easily get back to your original version.
What I usually do is keep the original version of the project.pbxproj and then make the changes manually in Xcode. I know this doesn't sound ideal but it does mean you should be able to open the project in Xcode, though your project may not run - just yet.
If you’re unclear about which version to keep, I would keep ours as that is the original version of your project.pbxproj. From the documentation:
You can think of "ours" as "your team" and "theirs" as "the React Native dev team".
Then I would make the changes manually as detailed below. As that will show their changes and the should hopefully not be that many.
To help me find the changes that I have to make I find that React Native Upgrade Helper is an invaluable resource. There you can find a git diff of any two versions of react-native that you choose. (This saves you having to create two projects and then compare them yourself, a big timesaver.)
Currently you are upgrading from 0.54.4 to 0.55.4 this link shows the diff between those versions
https://react-native-community.github.io/upgrade-helper/?from=0.54.4&to=0.55.4
For additional help you could create a project in a specific react-native version, using the following will create a project for version 0.55.4.
react-native init newproject --version react-native#0.55.4
That way you can look inside the Xcode project to see what has been added, and where it was added from, as the git diff doesn't always tell where it came from.
I have never had much luck using react-native-git-upgrade and I have come to prefer doing it manually, as I have had much more success doing it that way.
After updating react native to version 0.55 from 0.51, everything seemed to function normally in the local mode. But the production build fails.
I fixed this by upgrading react native once again from 0.51, and keeping my changes instead of theirs almost all the time.
May be there should be more detailed explanation in the documentation regarding the kind of issues one run into, by picking the wrong changes.

React-Native with macos target

Trying to create a NEW project which targets -both- macos and ios/android seems to fail.
Steps:
Followed steps on react native website, using create-react-native-app to get a native application. It works fine.
Use react-native-macos init and macos to get the mac app - it also works fine.
Noticing that #1 uses an App.js and #2 uses some sort of index.platform.js model, I change the xcode project in #2 to look for App.js instead. This at least makes sure the same code is reached.
As the react-native-macos github page says to do, I merge #2 into #1.. (unclear whether should overwriting, used 'ditto' command)
Add the rn-cli.config.js file to root, as react-native-macos says to do
Missing modules when I try to run macos - fails to bundle.
It looks to me like the 'react-native' folder in the node modules is somehow screwing up the react-native-macos folder. I'm still trying a variety of things but it's been exhausting considering how easy 'merge into your existing project' sounds.
https://github.com/ptmt/react-native-macos <- what i want to merge in
You likely will not be able to use create-react-native-app and react-native-macos together without some trail and error. This is because create-react-native-app actually creates an Expo app which is built on top of react-native but tries to abstract away a lot of the native details from the end user. For example you can't use any native modules that are not shipped with Expo when using create-react-native-app. The documentation of react-native-macos is likely assuming you are using react-native init which creates a base react-native project that you have to handle building on your own instead of offloading the build process to Expo.

XCode - Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

Lately I've started to take up a course for learning swift to devolp iOS OS X and Watch OS apps. I'm taking this course on udacity. The first step is to download a project and put it in a folder on your desktop. I had to open the app and then run it, which should've worked. But not for me somehow. I hit run and the following error showed up (this is the complete error log):
Some poeple suggested that I should update my XCode but I already have. I currently have XCode 7.3! I'm quite new to this platform, that's also why I'm doing this course, so I don't really know what I have to do. Can someone please tell me what's going on here?
This is the result of a corrupted swift class. If you encounter a class looking similar to the following code:
Ôæ≠fiÔæ≠fiqcaJÔæ≠fihJ0ç硡ˇ2ç硡ˇ$5y$ġˇˇ% 7.ġˇˇÔæ≠fiÔæ≠fiP‚—ġˇˇfl‚ġˇˇ ˗ġˇˇ∞B‚ġˇˇÄ+€
Try to re-create the class or re-download it. This solved my problem and to me, it would look like the only solution possible for a corrupted class.
Delete derived data.
Windows->Projects->select your project and delete derived data
This worked for me for couple of projects which i downloaded from internet.
I do everything restarts Xcode, rebuild Project, adding toolChains lock unlock them,
so there are two possibilities
first, maybe you install the beta version of Xcode
or try this, this work for me->
I tried to run a project in Xcode12/Swift4, while the project was written on Xcode8/Swift3
so I install Xcode version 11.7 and run this work for me.
if you not done with 11.7 then install another version of Xcode and try the appreciated version
May this help you

IOS Broadcast Framework

Can someone point me in the right direction to find the tools to be able to build a really simple broadcasting app on ios.
I am looking to mimic what has been done here.
Been googling around for a while now and can't really find anything to get me started.
Found this:
http://olobonsoft.com/products
Can anyone help or tried to do something similar?
Never try but I know this project (for cine.io) on Github, check source code of project, probably will be not different that what you're looking for.
Example app : https://github.com/cine-io/cineio-broadcast-ios-example-app
Sample iOS application to demonstrate broadcasting and playback using
the cine.io Broadcast iOS SDK.
How to Use
Clone the repository. Create a cineio-settings.plist file based on the
SAMPLE-cineio- settings.plist file. You'll need to create a (free)
account at cine.io. Change into the Example directory: cd Example
Install the necessary CocoaPods: pod install Build and run the project
as you usually would, making sure to use the .xcworkspace file and not
the .xcproject file when building using xcodebuild or when opening
with Xcode.
project : https://github.com/cine-io/cineio-broadcast-ios

Resources