0

I currently have an Xcode project that uses storyboard and I have an Xcode project in which I followed a tutorial and made a simple weather view controller. This Weather view controller uses CocaPods and requires that I use .xcworkspace whereas in my previous Xcode project (the one in which I am making via storyboard) I have been using the .xcodeproj file. I am trying to bring the weather view controller project into my storyboard Xcode project. Hopefully, I will have a button on one particular view controller link to the Weather View Controller that was initially created in another application.

I have asked a previous question in regards to a project like this but with no luck. The previous question can be seen here: combining-two-xcode-projects-one-with-code-and-one-without

In order to test the one answer I as given on that previous question I went about and created a blank Xcode Project from scratch, uploaded all of the .h and .m files, and then went into terminal (I am using mac) and programmatically the pods. The pods installed perfectly. I then put down a button and used the IBAction mentioned in the question I posted the link to above:

//When the button is tapped
-(IBAction)buttonTapped:(id)sender
{
    //initialize the code only controller
     WXController *WXController = [[WXController alloc] init]

    //present the view
    [self presentViewController:WXController animated:YES completion:nil];
}

I then ran the project and came across this error that highlighted this piece of code:

WXController *WXController = [[WXController alloc] init]

The error stated:

"No Visible @Interface for 'WXController' declares the selector alloc"

Just to make sure nothing else worked, I also tried to open the same project with .wcworkspace and came across the same error which I wasn't able to figure out.

I figured it must have been a button with the linking of the view controller with the button so not only did I post prior to this but I also did my own research and didn't have any luck as well. I checked out these posts:

  1. How to combine two projects into one project

  2. Loading a storyboard from a different Xcode project

Just to make the question I'm asking more clear, I included a link to the Weather Xcode Application I am trying to link to my storyboard application. You should be able to open the application here: Link

I was wondering: What exactly am I doing wrong that is providing me with the "No Visible @Interface for 'WXController' declares the selector alloc" error and even if this is fixed, am I missing something or should the view controller display properly.

Also, I have previously been using the .xcodeproj for my storyboard Xcode application. Is it necessary that once I bring this Weather view controller in, I must switch to .wcworkspace? and if so, what is the difference/ positive/ negatives of each?

Community
  • 1
  • 1
Ryan E
  • 45
  • 1
  • 10
  • Your pointer is wrong. The issue is the capital W. Change it to: WXController *wxController = [[WXController alloc] init]; – CW0007007 Jul 28 '14 at 06:30
  • @CW0007007 I changed the first two letters and that seemed to get rid of that initial problem but after doing that I ran into one more: "ld: 8 duplicate symbols for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) " – Ryan E Jul 28 '14 at 07:06
  • http://stackoverflow.com/questions/15520921/6-duplicate-symbols-for-architecture-i386 – CW0007007 Jul 28 '14 at 07:07
  • You've got duplicate files somewhere. – CW0007007 Jul 28 '14 at 07:08

0 Answers0