Xcode not seeing changes in #import ""

Discussion in 'iOS Programming' started by 1458279, Mar 23, 2015.

  1. 1458279 Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #1
    I have a .h/.m that I #import into another .m file. Everything was working fine, then I made some changes in the .h that is being imported and the changes were not seen.

    So I cleaned the project, that didn't work. I removed the .h/.m from the project, created a new set with nothing and still the .m was seeing the old class structure.

    Finally, I deleted the files and #import and created an entirely new file name and created the class in there. --- This is the only thing I could get to work.

    This seems cumbersome to do, esp as a project grows larger. Is there something I'm missing here, or is this just the way Xcode works?

    I'm guessing it has to do with caching of precompiled files or something, but there should be some way to tell Xcode to redo everything.

    BTW, I also found you can't drag-n-drop classes from one project to another, that gave me a link error.

    Ver 4.5.2
     
  2. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    Does Swift have these kinds of issues? I wouldn't know - seeing Apple unveil Swift + Unity 5 compiling to WebGL made me decide I don't want to bother with native anymore.
     
  3. waterskier2007 macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #3
    When you say from one project to another, you mean from the project navigator in the sidebar? I have done this countless times and have never had a problem. Just dragging over the.h/.m files...
     
  4. 1458279 thread starter Suspended

    1458279

    Joined:
    May 1, 2010
    Location:
    California
    #4
    Yes, that's what I did... grabbed the .h/.m and dropped it into another project and selected 'copy'. It gave me a linker error. So I deleted them, created the same files from new, copy/paste the code in and it worked.

    It's interesting that I've done this before without this error.

    My guess about the other error is that it's stuck in cache or something.

    The other error really sucks, because it's assumed that you'd be making classes and modifying those classes over time. When I did exactly that, the new mods weren't being seen in all the files.

    I added new properties to the .h which showed up in the .m but NOT in the other .m where the class was being used.

    Deleting the files didn't help, I had to create brand new files with different names. --- Strange.
     

Share This Page