Posts

Showing posts with the label cocoa

Link private key from secure enclave to provisioning profile

Link private key from secure enclave to provisioning profile I need to link my private key stored in the secure enclave to a certificate in a provisioning profile. Does anyone have experience with that and can help me out how to do that? As of now my knowledge is that this is quite hard to achive, because the private key in the secure enclave only can accessed from the application which have created the key pair. But I definitely need a solution for this. Otherwise I'm not able to connect to the WPA2 Enterprise network and use our vpn. The best solution for me would be, if there is a solution written in swift, because I create my key pair in swift and so I don't have different languages in my project. But if anyone has a solution in another language, I can change my project language. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and coo...

How to initialize an empty mutable array in Objective C

How to initialize an empty mutable array in Objective C I have a list of objects (trucks) with various attributes that populate a tableview. When you tap them they go to an individual truck page. There is an add button which will add them to the favorite list in another tableview. How do I initialize an empty mutable array in Cocoa? I have the following code: -(IBAction)addTruckToFavorites:(id)sender:(FavoritesViewController *)controller { [controller.listOfTrucks addObject: ((Truck_Tracker_AppAppDelegate *)[UIApplication sharedApplication].delegate).selectedTruck]; } You shouldn't make the controller's mutable array public like that. The controller should only make an immutable array available to other objects; for adding a new truck, you should add a method to the controller that does that. Then, instead of getting the listOfTrucks and directly changing it without the controller's knowledge, you tell the controller to make the change. ...