I compile and run Apple's GenericKeyChain sample code. No problems there. Now I want to use both files KeychainItemWrapper.m and KeychainItemWrapper.h in my new project and I get lots of compilation errors. I see that Apple's sample code is using ARC. Other posting here direct people to disable ARC for this file. That did not work. I have link the Security Framework on my new project. My question is what should I do to get these two files compiled successfully on my new project. Why Apple sample code compiles with no problems. The compilation errors are mostly ARC Casting Rules and ARC restrictions as well as Semantic Issue of using "release".
Asked
Active
Viewed 648 times
1 Answers
0
try the following 2 methods:
Go to Build Setting -> Swift Compiler -> Objective-C Bridging Header and set the path to /"Your project name"-Bridging-Header.h ex path: myProject/myProject-Bridging-Header.h
Go to Build Phase -> Compile Source and pick the objective-c file (.m file) and set compiler flag to be "-fno-objc-arc"