ios10

Your account already has a signing certificate for this machine but it is not present in your keychain

烈酒焚心 提交于 2019-12-02 22:12:39
I get this error, verbatim, when trying to build and install to a device. This is my environment: Xcode 8 El Capitan Has anyone run into this problem? How did you solve it? Thank you Go to Xcode Preferences -> Accounts tab -> Double-click your team name -> Click the + at the bottom left of the dialog box that appears -> Select iOS Development . This will create a new development certificate that will allow you to install and test on your device. go to your apple developer site and download the signing certificate. Once downloaded you should be able to click and it will auto do its thing and

How to resize the collection view cells according to device screen size?

瘦欲@ 提交于 2019-12-02 21:49:54
I noticed that the cells would always follow the definition in size inspector. Even if I have already applied UICollectionViewDelegateFlowLayout. So that's how it looks. But I want the cells to rather look like how it was on a smaller iphone screen. Marat Ibragimov Swift func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let height = view.frame.size.height let width = view.frame.size.width // in case you you want the cell to be 40% of your controllers view return CGSize(width: width * 0.4,

Sound issues fixes for iOS 10 Push Notifications

眉间皱痕 提交于 2019-12-02 21:09:32
问题 I’ve implemented push notifications for our app. on iOS 9, the sound words fine. on iOS 10, it’s very unpredictable. Fresh install from Xcode on iOS 10.0.2 would bring up my custom sound. reinstall would bring up default sound. I don’t know exactly when but at times I also get no sound. reading from here and many others my conclusion is that it works after a hard reboot. 2 questions: Has Apple completely fixed this issue in any version? If so what version? After a hard reboot, would the

NSKeyedArchiver does not work in Swift 3 ( XCode 8)

坚强是说给别人听的谎言 提交于 2019-12-02 20:45:43
I have migrated my project to Swift 3 and NSKeyedArchiver does not work. I actually have a runtime error when trying to decode object like this: let startDayTime = aDecoder.decodeObject(forKey: Key.startDayTime) as! Int It worked perfectly in Swift 2.2 in Xcode 7.3. Has anybody else faced such troubles? P.S. I have this error on both Simulator and Device. UPDATE: I solved this problem by using decodeInteger(forKey key: String) instead of decodeObject(forKey key: String) . By some reason AnyObject does not cast to Integer in Swift 3 though it did in Swift 2.2 It appears that this only happens

How to give permission to access phone Addressbook in ios 10.0?

∥☆過路亽.° 提交于 2019-12-02 20:15:48
问题 This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data. I added to the .plist NSContactsUsageDescription doesn't work - device version:10.0 KTSContactsManager *addressBookManager = [KTSContactsManager sharedManager]; addressBookManager.delegate = self; addressBookManager.sortDescriptors = @[[NSSortDescriptor

Callback for MSSticker Peels in iOS 10 iMessage sticker app

六月ゝ 毕业季﹏ 提交于 2019-12-02 18:45:00
I'm experimenting with sticker iMessage apps in iOS 10 and I'm running into an issue with the override func didStartSending(_ message: MSMessage, conversation: MSConversation) method in MSMessagesAppViewController . When "peeling" a sticker from an MSStickerView , I would expect to receive some sort of callback on the didStartSending method. But it appears this is not the case. Does anyone know if this is the expected behavior and/or if there's another way to subscribe to callbacks for when these stickers are peeled, dragged, and dropped into the MSConversation ? I realize that didStartSending

Deleting all data in a Core Data entity in Swift 3

亡梦爱人 提交于 2019-12-02 17:28:01
Is there a way to do a batch delete of all data stored in all of the entities in core data? I read somewhere that in iOS 9 or 10 that apple introduced a way to do batch deletes, but I can't seem to find any good information on it. Ultimately, I just need a function that goes through an entity, and deletes all of the data in it. Seems like it should be simple enough, but documentation/tutorials for it have proven exceedingly difficult to find. Any thoughts? Edit I added the following code into an IBAction attached to a button: @IBAction func clearAllData(_ sender: AnyObject) { let fetch =

Core Data iOS10: viewContext not receiving updates from newBackgroundContext() with NSFetchResultController

半城伤御伤魂 提交于 2019-12-02 16:16:23
In my application, I have a NSFetchResultController to load Core Data objects in a UITableView. The fetch request associated with this FRC uses the new viewContext property available for the NSPersistentContainer (iOS10). When I select a cell, I pass the Core Data object to a new ViewController. This new VC still uses the viewContext. From this ViewController, I can update the Core Data object from ViewControllers presented modally. To do so, I use newBackgroundContext() for the modal ViewControllers. I can save the update Core Data object without any issue. The problem is that the FRC is not

Is there a way to open urls received in a push notification without opening the app in ios 10?

╄→尐↘猪︶ㄣ 提交于 2019-12-02 14:53:13
问题 I am trying to open a url that is passed in a push notification in ios 10. So far I haven't found a way to open a the url without opening the app. Is there a way to open urls received in a push notification without opening the app? I have found a work-around to open the url (the work-around works for ios <10), but then again the app opens up first. Update: I've noticed that for the device (iOS 10.0) The following mentohds get involked application

Difficulties converting to Swift 3

白昼怎懂夜的黑 提交于 2019-12-02 14:12:09
After converting from Swift 2 to Swift 3 (even after converting edit-> convert -> to current swift syntax) I am getting lots of errors. Especially: I am shown total 90 errors for my project which was working fine in Swift 2 before i downloaded this beta Xcode 8.0 and converted to Swift 3 Is this a conversion mistake I am making? Most of them are easy fixes, simply by tapping the red button, and having Xcode fix it for you! Others include: CGRect Swift 2: let frame = CGRectMake(0, 0, 20, 20) Swift 3: let frame = CGRect(x: 0, y: 0, width: 20, height: 20) CGPoint Swift 2: let point = CGPointMake