dyld: Symbol not found: _kABPersonAddressCityKey XCODE 8 issue

妖精的绣舞 提交于 2019-12-22 05:49:25

问题


Hi My code was running perfectly in xcode 7.x.x

As soon as i updated my xcode i am getting this issue please give me the solution for this.

Details :

dyld: Symbol not found: _kABPersonAddressCityKey Referenced from: /var/containers/Bundle/Application/0A16B18D-CB72-4FCA-94F7-422AFD1411AD/ABCD.app/ABCD Expected in: /System/Library/Frameworks/PassKit.framework/PassKit in /var/containers/Bundle/Application/0A16B18D-CB72-4FCA-94F7-422AFD1411AD/ABCD.app/ABCD


回答1:


Add PassKit.framework to your Link Binary With Libraries in your Build Phases and set its Status to Optional




回答2:


There are two things that might fix your problem:

1- Open your target -> Build Phases -> Link Binary With Libraries -> Add AddressBook.framework

2- AddressBook framework was deprecated in iOS 9. Apparently your app will crash if you compile the code on Xcode 8 and run on a iOS 9 or lower device.

I recommend migrating to Contacts framework and/or have preprocessor macros that don't include the AddressBook framework code when built on iOS 10.

Source: https://github.com/OceanLabs/iOS-Print-SDK/issues/257




回答3:


Paul Senabre's solution worked for me, thank you, thank you, thank you! This has been driving me nuts!

Adding PassKit.framework solved but problem, but make sure to add it for all of your targets! When you add it, it only affects your current target. BTW, my app with a target of iOS-8 ran fine with iOS-10 in Xcode-8, but would crash with anything previous to iOS-10.



来源:https://stackoverflow.com/questions/39485826/dyld-symbol-not-found-kabpersonaddresscitykey-xcode-8-issue

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