2
votes

I'm trying to incorporate OmniGroup's frameworks into a project. I'm very new to building with these kinds of dependcies so I've been fumbling my way through this. What I've done so far it.

  1. Created new Xcode project for iOS (iPad) using the Single View Application template.
  2. Edited the Schema and unchecked Parallelize Build and Find Implicit Dependencies.
  3. Added the 'Configurations' directory from the OmniGroup repository to my project.
  4. Created a lib directory in my project's repository.
  5. Copied the OmniBase directory to my lib directory.
  6. Created an Omni Frameworks group in Xcode.
  7. Dragged the lib/OmniBase/OmniBase.xcodeproj file to the Omni Frameworks group.
  8. In my project's Build Phases tab I added 'libOmniBase.a' in the Link Binary With Libraries section.
  9. ⌘B to build

Yes, I know OmniBase is useless by itself. I'm just trying to build the minimum amount first and add on from there. But I can't get OmniBase to build. I get one error...

Ld /Users/mluton/Library/Developer/Xcode/DerivedData/CoreTextWithOmni2-dzbwnmvzfbuyhzadnmwrvmfmzyoa/Build/Products/Debug-iphoneos/CoreTextWithOmni2.app/CoreTextWithOmni2 normal armv7 cd /Users/mluton/dev/ios-recipes/CoreTextWithOmni2 setenv IPHONEOS_DEPLOYMENT_TARGET 6.1 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" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/mluton/Library/Developer/Xcode/DerivedData/CoreTextWithOmni2-dzbwnmvzfbuyhzadnmwrvmfmzyoa/Build/Products/Debug-iphoneos -F/Users/mluton/Library/Developer/Xcode/DerivedData/CoreTextWithOmni2-dzbwnmvzfbuyhzadnmwrvmfmzyoa/Build/Products/Debug-iphoneos -filelist /Users/mluton/Library/Developer/Xcode/DerivedData/CoreTextWithOmni2-dzbwnmvzfbuyhzadnmwrvmfmzyoa/Build/Intermediates/CoreTextWithOmni2.build/Debug-iphoneos/CoreTextWithOmni2.build/Objects-normal/armv7/CoreTextWithOmni2.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.1 /Users/mluton/Library/Developer/Xcode/DerivedData/CoreTextWithOmni2-dzbwnmvzfbuyhzadnmwrvmfmzyoa/Build/Products/Debug-iphoneos/OmniBase/OmniBase -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/mluton/Library/Developer/Xcode/DerivedData/CoreTextWithOmni2-dzbwnmvzfbuyhzadnmwrvmfmzyoa/Build/Products/Debug-iphoneos/CoreTextWithOmni2.app/CoreTextWithOmni2

clang: error: no such file or directory: '/Users/mluton/Library/Developer/Xcode/DerivedData/CoreTextWithOmni2-dzbwnmvzfbuyhzadnmwrvmfmzyoa/Build/Products/Debug-iphoneos/OmniBase/OmniBase'

I've tried comparing my project to the TextEdit example workspace but I haven't run across any solutions yet. I know there's probably some step or setting I'm missing. Hopefully, this is obvious to someone reading this.

1
I also realize this is probably the worst possible day to be asking an Xcode question as the best and brightest are awaiting the imminent WWDC'13 keynote.Michael Luton

1 Answers

2
votes

After examining this some more I finally got it to build. Here's the additional steps involved.

  • Copied the Script directory from the OmniGroup repository to my project.
  • Added a Build Phase. Run shell script Scripts/CopyLibraryResources. Ordered my Build Phases the same as in the TextEdit example. Target Dependencies, Compile Sources, Link Binary with Libraries, Copy Bundle Resources and Copy Library Resources which is the shell script build phase I added in the previous step.
  • Converted my project to a workspace.
  • Add my original project and the FixStringsFile project to the workspace.
  • Edit the scheme. Under build add FixStringsFile as a dependency. Made sure it was at the top of the list. Add any other library (in this case OmniBaseTouch) as a build dependency as well. Place them after FixStringsFile and Before the application target.
  • ⌘B to build. No Issues!

PS: In both projects I edited Configurations/Target-Mac-Common.xcconfig and commented out OMNI_MAC_CODE_SIGN_IDENTITY = Mac Developer: since I'm not in the Mac Developer program.