Photos app in ios 7.1 simulator not working

心不动则不痛 提交于 2019-12-12 15:35:52

问题


i clean installed os x Yosemite yesterday and installed xcode 6. but unfortunately my old project require ios 7.1 so i delete xcode 6 and installed xcode 5.1.1. everything seems to be working fine but when i click on Photos app in simulator, it stuck on white screen as screen shows first when lunching app. I tried to reset content & setting but no luck. then i uninstall xcode completely including ~/Library/Caches/com.apple.dt.Xcode, ~/Library/Developer, ~/Library/Application Support/iPhone Simulator directory and files manually and reinstalled xcode 5.1.1 but problem with Photos app not solved. So please help me to solve this problem. do i missed something?, do i have to completely erase and reinstall mac to get working again or there is a compatibility problem in Yosemite with xcode 5.1.1. Also i know that i can install 7.1 simulator in xcode 6 but it will require some extra changes in my code as xcode 6. ios 8 simulator in xcode 6 has no problem like this. (sorry i am new here and i can't attach screenshot because don't have 10 points)

error was : Oct 30 11:34:38 CS02-MAC.local SpringBoard[4941] : BBServer: data provider "com.apple.mobileslideshow" has been unresponsive for 60 seconds. Oct 30 11:34:46 CS02-MAC.local assetsd[4998] : PLMigrationLog Failed to fetch path to uuid mappings 21 unable to open database file Oct 30 11:34:46 CS02-MAC.local assetsd[4998] : PLMigrationLog No store file to move aside at "/Users/css/Library/Application Support/iPhone Simulator/7.1/Media/PhotoData/Photos.sqlite" Oct 30 11:34:46 CS02-MAC.local assetsd[4998] : PLMigrationLog Failed to open store /Users/css/Library/Application Support/iPhone Simulator/7.1/Media/PhotoData/Photos.sqlite with options { NSPersistentStoreFileProtectionKey = NSFileProtectionNone; NSReadOnlyPersistentStoreOption = 1; NSSQLitePersistWALOption = 1; NSSQLitePragmasOption = { "journal_mode" = WAL; }; }. Requires new rebuilt database (Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)") Oct 30 11:34:46 CS02-MAC.local assetsd[4998] : *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This NSPersistentStoreCoordinator has no persistent stores. It cannot perform a save operation.'


回答1:


Problem solved. I open the log by Debug->Open system log and investigate the problem and came to know that the file 'Photos.sqlite' was not found. I manually copied that file from another mac to '▸ Users ▸ [username] ▸ Library ▸ Application Support ▸ iPhone Simulator ▸ 7.1 ▸ Media ▸ PhotoData'. After that Photos app working properly. Hope this will help someone.




回答2:


Another, easier method (especially if you don't have the file elsewhere), is that you can also just create a blank file called Photos.sqlite and place it in ▸ Users ▸ [username] ▸ Library ▸ Application Support ▸ iPhone Simulator ▸ 7.1 ▸ Media ▸ PhotoData

(eg: run this from the terminal:) touch "/Users/[username]/Library/Application Support/iPhone Simulator/7.1/Media/PhotoData/Photos.sqlite"

That worked for me.



来源:https://stackoverflow.com/questions/26623400/photos-app-in-ios-7-1-simulator-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!