kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 473 forks source link

[NSConcreteMapTable relativePath] problem with Xcode 5 & iOS 7 #149

Open bliljerk101 opened 10 years ago

bliljerk101 commented 10 years ago

Hi,

I have had this issue ever since updating to Xcode 5.. I thought it might be because of the Mk 7 that I was using, so I updated to Mk 8 and I am still having the issue (if anything, it may be worst - will let you know later after I get this elephant of a problem solved first).

I am using the "real framework" setup for an embeddedframework. Prior to my update, everything worked very well. Inside my embeddedframework, I include 3 storyboards, a bunch of images, and a link to another "real framework" that I made.

Since the update, I have been having problems with the storyboards. The error I get is unreadable, but what I can make out is [NSConcreteMapTable relativePath] Exception while running ibtool. Attached is an image.

When I say it is "unreadable", I mean that Xcode crashes when I click on the error. It crashes both on Mk 7 and after I updated to Mk 8.

I have yet to find a "real solution" to this. I tried using a .framework instead of .embeddedframework and including my storyboards and resources into the project utilizing. I can get it to "build" like this, but I end up with a lot of other problems due to the complexity of my original .ebmeddedframework. It also kills my work time, because updates are very slow when having to recompile everything in stages between the frameworks and constantly have to move resources back & fourth. It was very fast and easy before.

Has anybody else had this problem? Are there any "real solutions" to the problem? I would really like to use the .embeddedframework again. It was a brilliant tool for me.

bliljerk101 commented 10 years ago

Sorry forgot to attach the image. Here it is (this is all I can get to without Xcode crashing). screen shot 2013-10-18 at 6 20 33 pm

hugweb-zz commented 10 years ago

Same issue. You found a solution?

bliljerk101 commented 10 years ago

No solution yet. I haven't been working on the same framework for the last few months, so I haven't had time to really work through it.

The only definite solution is to break up the framework and separate the bundle resources entirely. I really don't want to do that. Apart from obvious downsides, it's a ton of additional work.

On Jan 28, 2014, at 7:37 AM, hugweb notifications@github.com wrote:

Same issue. You found a solution?

— Reply to this email directly or view it on GitHub.

hugweb-zz commented 10 years ago

Yes it doesn't interest me either, the goal being to encapsulate all !!

mickmgit commented 10 years ago

we found that Xcode is crashing when it has to deal with a compiled storyboard in the framework, but that it is fine with an uncompiled storyboard. not only that, but Xcode then compiles the storyboard before adding it to the bundle of the app it's building.

so i just added this code to the 3rd script, (we aren't up to date with the latest, so you'll need to do this in the single python script if you are). this is very simple, but it does the trick.

do this after line 108, after the universal static library is created:

declare -a STORY_BOARDS STORY_BOARDS=$(find "${BUILT_PRODUCTS_DIR}" -name "*.storyboardc") for filename in "${STORY_BOARDS[@]}" do echo rm -rf filename rm -rf $filename done

if [[ ${STORY_BOARDS[0]} ]] then DIR=$(dirname ${STORY_BOARDS[0]}) STORY_BOARDS=$(find "${SRCROOT}" -name "*.storyboard") for filename in "${STORY_BOARDS[@]}" do echo cp -a "$filename" "$DIR" cp -a "$filename" "$DIR" done fi

pulsifer-work commented 10 years ago

It may be that XCode has updated the storyboard to the new format and this is causing the problem. You have to be careful when touching storyboards in Xcode 5.1 with auto-layout enabled. It can auto-upgrade the storyboard. If you are trying to support iOS6 and iOS7, this is a typical problem that you can run into.

Regards,

Dean Pulsifer

Believe in yourself, say what you mean, do what you say

On Thu, Apr 24, 2014 at 5:49 PM, Mickey Mestel notifications@github.comwrote:

we found that Xcode is crashing when it has to deal with a compiled storyboard in the framework, but that it is fine with an uncompiled storyboard. not only that, but Xcode then compiles the storyboard before adding it to the bundle of the app it's building.

so i just added this code to the 3rd script, (we aren't up to date with the latest, so you'll need to do this in the single python script if you are). this is very simple, but it does the trick.

do this after line 108, after the universal static library is created: Find any *storyboardc files and remove them. Bug in Xcode where it crashes when dealing with a compiled storyboard when building a project with this framework included.

declare -a STORY_BOARDS STORY_BOARDS=$(find "${BUILT_PRODUCTS_DIR}" -name "*.storyboardc") for filename in "${STORY_BOARDS[@]}" do echo rm -rf filename rm -rf $filename done Strangely enough, if the storyboard exists and is uncompiled, Xcode will compile it when compiling the project. So just find all the storyboards whose compiled counterpart we removed above, and replace the compiled version with the uncompiled version.

if [[ ${STORY_BOARDS[0]} ]] then DIR=$(dirname ${STORY_BOARDS[0]}) STORY_BOARDS=$(find "${SRCROOT}" -name "*.storyboard") for filename in "${STORY_BOARDS[@]}" do echo cp -a "$filename" "$DIR" cp -a "$filename" "$DIR" done fi

Reply to this email directly or view it on GitHubhttps://github.com/kstenerud/iOS-Universal-Framework/issues/149#issuecomment-41336958 .

mickmgit commented 10 years ago

interesting. i hadn’t thought of playing with the storyboard itself. ours doesn’t use autolayout, as we imported a lot of existing code and nibs.

this solves the problem completely, and although it is a hack, it is a hack that doesn’t seem to have any side effects.

i’ll play around with this, but will use this workaround in the meantime.

It may be that XCode has updated the storyboard to the new format and this is causing the problem. You have to be careful when touching storyboards in Xcode 5.1 with auto-layout enabled. It can auto-upgrade the storyboard. If you are trying to support iOS6 and iOS7, this is a typical problem that you can run into.

Regards,

Dean Pulsifer

Believe in yourself, say what you mean, do what you say

On Thu, Apr 24, 2014 at 5:49 PM, Mickey Mestel notifications@github.comwrote:

we found that Xcode is crashing when it has to deal with a compiled storyboard in the framework, but that it is fine with an uncompiled storyboard. not only that, but Xcode then compiles the storyboard before adding it to the bundle of the app it's building.

so i just added this code to the 3rd script, (we aren't up to date with the latest, so you'll need to do this in the single python script if you are). this is very simple, but it does the trick.

do this after line 108, after the universal static library is created: Find any *storyboardc files and remove them. Bug in Xcode where it crashes when dealing with a compiled storyboard when building a project with this framework included.

declare -a STORY_BOARDS STORY_BOARDS=$(find "${BUILT_PRODUCTS_DIR}" -name "*.storyboardc") for filename in "${STORY_BOARDS[@]}" do echo rm -rf filename rm -rf $filename done Strangely enough, if the storyboard exists and is uncompiled, Xcode will compile it when compiling the project. So just find all the storyboards whose compiled counterpart we removed above, and replace the compiled version with the uncompiled version.

if [[ ${STORY_BOARDS[0]} ]] then DIR=$(dirname ${STORY_BOARDS[0]}) STORY_BOARDS=$(find "${SRCROOT}" -name "*.storyboard") for filename in "${STORY_BOARDS[@]}" do echo cp -a "$filename" "$DIR" cp -a "$filename" "$DIR" done fi

Reply to this email directly or view it on GitHubhttps://github.com/kstenerud/iOS-Universal-Framework/issues/149#issuecomment-41336958 .

— Reply to this email directly or view it on GitHub.