I’m at Chapter 6 trying to setup Vapor. I don’t get where I should find PushNotifications project? Here is the quote:
“Open the projects/starter folder, where you’ll find a starter project called PushNotifications which has the base configuration already taken care of for Vapor. It has been modified to use PostgreSQL as the database instead of SQLite and contains empty files for your model and a controller so that Vapor knows about them.”
Hi @suholet, did you download the project material with the book or just the PDF? If you grab the accompanying files you’ll see a directory called 06-server-side-pushes and in there is a ‘starter’ directory. That has the Xcode project that is being referred to.
@tomtom it’s there but because it’s Vapor based you don’t yet have a .xcodeproj file. You need to run the vapor xcode -y command showin in the “Setting up Vapor” part of the chapter to build the project.
Thanks I did that once on one Mac and it worked yesterday for the life of me I could not. Since it had been a week or so I couldn’t remember how it worked. Eventually I gave up and just copied the working one to the other machine. Also the book has the paths as “Open the projects/starter folder” and that path doesn’t really exist. So you are left guessing.
Anyway many thanks for getting back. I really appreciate it. I have used push before but it was in 2008 so I wanted to see what is new. So far I am just doing setup so I a=m frustrated when it does not work since this is stuff I have done before. I am interested in Vapor now, so thanks for that
I am running into an issue running the command: $ vapor xcode -y
The error produced is:
Error: backgroundExecute(code: 1, error: “The file /Users/johntyler/Dev/rw_push/*.xcodeproj does not exist.\n”, output: “”)
Based on the book and this forum post, I believe am using the right files:
The files I am using are in this location:
Push_Notifications_by_Tutorials_v1<U+2069> ▸ <U+2068>06-server-side-pushes<U+2069> ▸ <U+2068>starter<U+2069>
I made a full copy into my dev folder which is located here:
Users<U+2069> ▸ <U+2068>johntyler<U+2069> ▸ <U+2068>Dev<U+2069> ▸ <U+2068>rw_push<U+2069>
NOTE: The terminal session notes below provide file listing results so you can see for yourself whether the files are as expected.
UPDATE:
After doing some more digging on this issue, I came across the following article on the Vapor GitHup repository.
The article described what I was running into exactly! Note the comment about HomeBrew “borking” the person’s Xcode setup.
After triple checking the recommended procedure… I updated my environment as described in the article.
[ I can understand this might give some readers pause and with good reason, however, since I recently rebuilt my machine and found the process sort of cathartic, refreshing, and fun, I figured, “what the heck” ].
After the environment update, I re-ran the command:
$ vapor xcode -y
After some time, and a rather satisfying bouncy period character progress display, the project was built and Xcode launched the project as expected… WOOT!!
Problem solved, onto the next sections of the book!!