iOS-Universal-Framework icon indicating copy to clipboard operation
iOS-Universal-Framework copied to clipboard

Error during "create product structure" phase

Open bigsprocket opened this issue 11 years ago • 7 comments

I have a framework with resources, so I'm creating an embedded framework, using the mk8 script (config_framework_type = 'embeddedframework' at the top of the script).

It builds fine as Archive. And, it builds fine as a debug build for the simulator -- once. Because the embedded version leaves a .framework file in the build dir as a symlink, attempting to build a second time causes this error:

/bin/mkdir -p /MyBuildDir/MyProductName.framework/Versions/A error: (null)

It appears that Xcode does a strip phase as the very last thing after a build (so the .framework file must remain there), and the "create product structure" phase is the very first phase (you can't put anything before it), so I can't see a way to work around this problem.

Xcode 5.0.2, OS X Mavericks, and framework script mk8.

bigsprocket avatar Nov 21 '13 16:11 bigsprocket

You can try delete the DerivedData in Organizer Window of Xcode.

xiaowei4895 avatar Nov 25 '13 08:11 xiaowei4895

Thanks for the suggestion. Unfortunately, DerivedData is a separate location from the Build Products, so this doesn't do anything. I can delete the file manually via Finder just as easily as opening Organizer to do this, anyway. I'm looking for a more elegant solution that fits in with how Xcode does its builds.

bigsprocket avatar Nov 25 '13 15:11 bigsprocket

I add a "rm" command in script to delete the framework symlink after embededframework built success. It seems work fine.

At the end of "build_embedded_framework" funtion, add below code:

================================================================================

Remove framework symlink. If not remove, embeddedframework will build fail at next time.

import subprocess
subprocess.call (["rm", fw_path])

================================================================================

xiaowei4895 avatar Nov 27 '13 09:11 xiaowei4895

xaiwei4895, As mentioned in the issue you logged (#159), this will cause you to miss the strip phase. That symlink is needed for Xcode's final act, but needs to be gone before the first act of the next build. Frustrating.

bigsprocket avatar Nov 27 '13 16:11 bigsprocket

Did you submit a pull request for your branch? This issue and #159 are still open issues for the public project. This is still a problem in whats available on the main project. It is often not a real problem for those who archive exclusively for distribution, but when running tests or debugging you hit this wall. Clearing Derived Data normally fixes it but doing that everytime between builds is quite painful for quick debugging or testing.

EmperiorEric avatar Jan 28 '14 20:01 EmperiorEric

It is already committed to main project. If you still have problem, you may check the script in your project is latest or not. You may need to reinstall the iOS universal framework and recreate the framework project. ÔÚ2014Äê1ÔÂ29ÈÕ 04:03:35, "Ryan Poolos" [email protected]дµÀ£º

Did you submit a pull request for your branch? This issue and #159 are still open issues for the public project. This is still a problem in whats available on the main project. It is often not a real problem for those who archive exclusively for distribution, but when running tests or debugging you hit this wall. Clearing Derived Data normally fixes it but doing that everytime between builds is quite painful for quick debugging or testing.

¡ª Reply to this email directly or view it on GitHub.

xiaowei4895 avatar Jan 28 '14 22:01 xiaowei4895

Alright, I didn't realize there was an update. Perhaps this ticket should be closed then. Along with #159

EmperiorEric avatar Jan 29 '14 13:01 EmperiorEric