一、Swift-OC混編橋文件
1
2
3
二啸驯、Git修改密碼報(bào)錯(cuò) remote: Invalid username or password
git config --global user.name "yourname"
git config --global user.email "youremail"
三客扎、把數(shù)組保存到plist
存:
let paths = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0]
let plistPath = paths + "/areaForEShop.pist"
let plistUrl = URL.init(fileURLWithPath: plistPath)
array.write(to: plistUrl, atomically: true)
讀
讀上面存的
let paths = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0]
let plistPath = paths + "/areaForEShop.pist"
let array = NSArray.init(contentsOfFile: plistPath)
直接讀取plist文件
let plists = Bundle.main.path(forResource: "areaForEShop", ofType: "plist")!
let resultArray: NSArray =? NSArray.init(contentsOfFile: plists)!
四、CoreData
創(chuàng)建CoreData時(shí)罚斗,如果移動(dòng)CoreDataClass.swift和CoreDataProperties.swift時(shí)搞錯(cuò)徙鱼,在 TARGETS->Build Phases->Compile Sources中刪掉這兩個(gè).swift文件就好了。