1

I have recently met the need to have a bundle inside my iPhone app. In order to make my problem as clear as possible, I have decided to create a small empty app just for the sake of the explanation.

Here is a step by step way to reproduce precisely my problem. I am using Xcode version 5.0 (5A1413).

  1. Open Xcode, create a new project, iOS Application, Single View Application, click Next.
  2. Call it InBundleTestApp. Leave the default settings the way they are and click Next.
  3. Choose whatever folder you want and click Create.
  4. Once Xcode is opened, click Add Target and choose Bundle, then click Next.
  5. Call it InnerBundle and leave the default settings for the rest.
  6. Click Finish.
  7. Go to the Build Phases tab of the InBundleTestApp target.
  8. Add InnerBundle.bundle to the "Copy Bundle Resources" list.
  9. Go to the Build Settings tab of the InnerBundle target.
  10. Change the Base SDK from Latest OS X (OS X 10.8) to Latest iOS X (iOS 7.0).
  11. Set InnerBundle as the active target. Compile InnerBundle by hitting Command-B.
  12. Set InBundleTestApp as the active target and compile it by hitting Command-B.
  13. Archive InBundleTestApp by choosing Product/Archive in the menu.

We get the following in the debugger:

CpResource /Users/neptune/Library/Developer/Xcode/DerivedData/InBundleTestApp-arelnznnammspkgauywlbunqsaot/Build/Intermediates/ArchiveIntermediates/InBundleTestApp/BuildProductsPath/Release-iphoneos/InnerBundle.bundle /Users/neptune/Library/Developer/Xcode/DerivedData/InBundleTestApp-arelnznnammspkgauywlbunqsaot/Build/Intermediates/ArchiveIntermediates/InBundleTestApp/InstallationBuildProductsLocation/Applications/InBundleTestApp.app/InnerBundle.bundle

cd /Users/neptune/Documents/InBundleTestApp

setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /Users/neptune/Library/Developer/Xcode/DerivedData/InBundleTestApp-arelnznnammspkgauywlbunqsaot/Build/Intermediates/ArchiveIntermediates/InBundleTestApp/BuildProductsPath/Release-iphoneos/InnerBundle.bundle /Users/neptune/Library/Developer/Xcode/DerivedData/InBundleTestApp-arelnznnammspkgauywlbunqsaot/Build/Intermediates/ArchiveIntermediates/InBundleTestApp/InstallationBuildProductsLocation/Applications/InBundleTestApp.app

error: /Users/neptune/Library/Developer/Xcode/DerivedData/InBundleTestApp-arelnznnammspkgauywlbunqsaot/Build/Intermediates/ArchiveIntermediates/InBundleTestApp/BuildProductsPath/Release-iphoneos/InnerBundle.bundle: No such file or directory

Now my question is: why do we get this error? What did I do wrong in the 13 steps above?

Michel
  • 10,303
  • 17
  • 82
  • 179
  • In order to simplify the question I did not want to get into those details and made a special test project (to show only the problem). Since you ask: I got into this issue when using core data in a static library. It works perfectly on the device, but runs into trouble when Product/Archive. This is for your information but take it as irrelevant to the question. – Michel Dec 29 '13 at 09:28
  • look here http://stackoverflow.com/questions/1711586/core-data-in-a-static-library-for-the-iphone – Retro Dec 29 '13 at 09:32
  • I have read this post and a few others similar before, which helped me make things work the way I want on my device. The main document I used being http://nachbaur.com/blog/smarter-core-data. But now I can't archive; I presume this is only a small problem which I isolated to make the present post with its simple question. – Michel Dec 29 '13 at 15:33

0 Answers0