Reputation: 1785
I have been building a react native app using android only. Ive now managed to get hold of a mac so i can start testing app on ios. I uploaded project to github from my windows computer....then downloaded to my mac.
Im trying to build app using Xcode....however Im getting the 2 errors below:
No such file or directory: /xxx/myAppName/ios/RnDiffApp/main.m
No such file or directory: /xxx/myAppName/ios/RnDiffApp/AppDelegate.m
Interesting thing is that I see no folder called RnDiffApp
in path /xxx/myAppName/ios/
.....however I do the see the 2 files mentioned at the following paths:
/xxx/myAppName/ios/myAppName/main.m
/xxx/myAppName/ios/myAppName/AppDelegate.m
...so in summary, the 2 "missing" files are indeed present....however they are in the folder path /xxx/myAppName/ios/myAppName/
....instead of path /xxx/myAppName/ios/RnDiffApp/
, which apparently is where build tool is looking for them
Although interestingly, the folder path structure looks different in Finder (see below)....to what is does in Xcode Project navigator (further below). App is called xs
Can anyone help?
Upvotes: 4
Views: 3134
Reputation: 1556
I suppose the name RNDiffApp
comes from rn-diff-purge
repo. Xcode does not take the project files from file system, it takes the files from .xcodeproj file. At the start I would recommend you to delete RNDiffApp reference from the project and add your files references.
Step 1: Delete RnDiffApp folder. Make sure you click on Remove References after.
Step 2:
Add your files to project.
Click on Add Files to "Your project" and select your project files folder. Make sure Copy items if needed
and Create groups
are checked
Upvotes: 1
Reputation: 2474
You need to open the xs.xcworkspace
in xCode rather than the xs.xcodeproj
file. The xs.xcworkspace
will include your pod modules and should resolve the path issues.
Upvotes: 0