Author Topic: Ch 12: Running the Database  (Read 7028 times)

zebing

  • Newbie
  • *
  • Posts: 8
    • View Profile
Ch 12: Running the Database
« on: February 09, 2015, 04:24:27 PM »
Hi, I've been slogging my way through the books and feel like I'm learning a ton. I hit a road block, and this time, I can't seem to get past it on my own. I'm on page 434 (kindle edition) and after setting up the deliveries scene for dynamic cells, I hit the run button and get an error. Funny thing is, I don't see any errors in the code I've been working on - maybe this is an issue others will run into as well. I can't move on in the book because running the app successfully is what creates the SQLite database.

Attached is the screenshot of the error I'm getting. I'm not sure how to read it.

Some ideas:
-My project has two storyboard files in it even though I don't remember creating two. Is this normal?
-On step 11 of page 432, a bunch of code is given to add to the tableView:cellForRowAtIndexPath method. That method was originally commented out in the DeliveriesViewController.m file. I removed the /* and */.

----------------------
Ld /Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Products/Debug-iphonesimulator/iDeliverMobileCD.app/iDeliverMobileCD normal x86_64
    cd /Users/macbookpro/Documents/SamplesXC/iDeliverMobileCD
    export IPHONEOS_DEPLOYMENT_TARGET=7.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Products/Debug-iphonesimulator -F/Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Products/Debug-iphonesimulator -filelist /Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Intermediates/iDeliverMobileCD.build/Debug-iphonesimulator/iDeliverMobileCD.build/Objects-normal/x86_64/iDeliverMobileCD.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework CoreData -framework MapKit -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Intermediates/iDeliverMobileCD.build/Debug-iphonesimulator/iDeliverMobileCD.build/Objects-normal/x86_64/iDeliverMobileCD_dependency_info.dat -o /Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Products/Debug-iphonesimulator/iDeliverMobileCD.app/iDeliverMobileCD

duplicate symbol _OBJC_IVAR_$_AppDelegate._window in:
    /Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Intermediates/iDeliverMobileCD.build/Debug-iphonesimulator/iDeliverMobileCD.build/Objects-normal/x86_64/AppDelegate-56423A27CBFF987.o
duplicate symbol _OBJC_METACLASS_$_AppDelegate in:
    /Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Intermediates/iDeliverMobileCD.build/Debug-iphonesimulator/iDeliverMobileCD.build/Objects-normal/x86_64/AppDelegate-56423A27CBFF987.o
duplicate symbol _OBJC_CLASS_$_AppDelegate in:
    /Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Intermediates/iDeliverMobileCD.build/Debug-iphonesimulator/iDeliverMobileCD.build/Objects-normal/x86_64/AppDelegate-56423A27CBFF987.o
duplicate symbol _main in:
    /Users/macbookpro/Library/Developer/Xcode/DerivedData/iDeliverMobileCD-aiqatxesbsezgkgtlothhfcthgrh/Build/Intermediates/iDeliverMobileCD.build/Debug-iphonesimulator/iDeliverMobileCD.build/Objects-normal/x86_64/main-3400EC9B1F509067.o
ld: 4 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

--------------------------

At the end of the output it also says:

*4 duplicate symbols for architecture x86_64
*Linker command failed with exit code 1 (use -v to see invocation)



zebing

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Ch 12: Running the Database
« Reply #1 on: February 10, 2015, 07:05:23 PM »
I went ahead and rebuilt everything from the beginning to resolve the error (if you can call that resolving it). Now I run the program and don't see the SQLite database anywhere. I see other posts where other people are running into the same issue with no solution so far.

kjmcneish

  • Administrator
  • *****
  • Posts: 719
    • View Profile
Re: Ch 12: Running the Database
« Reply #2 on: February 28, 2015, 02:49:52 AM »
Yes, the Sqlite files are in a new location for Xcode 6:

Library/Developer/CoreSimulator/Devices/<Unique Device ID>/data/Containers/Data/Application/<Application ID>/Documents.

All the best!
Kevin