XCode8添加自定义framework运行真机出现dyld: Library not loaded: @rpath的解决方法

使用XCode创建并添加自定义framework的时候,可能会报如下的错误:

dyld: Library not loaded: @rpath/JPushLib2.framework/JPushLib2 Referenced from: /var/containers/Bundle/Application/D2D0B19D-F3CC-4AF9-8EEC-BAA17BCAFE33/JPush-HTTP.app/JPush-HTTP
** Reason: image not found**

假如自定义的framework名称为JPushLib2.framework,需要在运行工程的TARGETS -> Build Phases -> Link Binary With LibrariesJPushLib2.frameworkstatusrequired改为Optional

修改配置

你可能感兴趣的:(XCode8添加自定义framework运行真机出现dyld: Library not loaded: @rpath的解决方法)