Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode is not loading the .xcappdata into the app

I want to preload the app in the simulator with a set of data (a core data app) downloaded from my iPhone 5s. The steps I took were:

  1. Run the app on my device connected to Xcode
  2. Download my data through the devices panel.
  3. Name the .xcappdata "simple.xcappdata" and pulled it into my Xcode project
  4. Select "simple.xcappdata" as the Application Data in the scheme I´m running
  5. Running the app, I have no data in the list view.

The steps I took are outline here: http://corporationunknown.com/blog/2014/07/10/preloading-development-data-into-your-ios-app/

Is this a known bug in Xcode, am I doing something wrong, missing something?

I verified that the .xcappdata contains entries in the sqlite database. I´m running Version 6.3 (6D570) of XCode. iOS 8.3 SDK. The app is in the store, so I know the list view and core data stack to be working.

Scheme

like image 637
user1777136 Avatar asked Apr 18 '15 12:04

user1777136


2 Answers

It seems to be a bug in Xcode 6.

The person writing to blog that you used as reference updated the blog with this:

Update 2015-04-20: This worked great in Xcode 5. Unfortunately Xcode 6 (through 6.3 as of this writing) does not behave as described for the Simulator (it does load a device just fine). Versions <6.3 will tell you “The application data package will be installed the next time you run your app in the Simulator”—every time. Version 6.3 will just silently fail to load the package. I have reported this as rdar://20622011 / Open Radar

like image 73
pteofil Avatar answered Oct 19 '22 08:10

pteofil


I don't know if it is a bug, but it works on the device (I am using Xcode 6.4). In the simulator, there is no error message nor message indicating it works only on device.

like image 24
onekiloparsec Avatar answered Oct 19 '22 07:10

onekiloparsec