1

As the title says when I run my app on a iphone5 it crashes saying:

dyld: Library not loaded: @rpath/SwiftProtobuf.framework/SwiftProtobuf
Referenced from: /var/containers/Bundle/Application/484280D4-A568-4325-A58D-154797B314E7/MDProject.app/MDProject
Reason: image not found

I'm new to xcode so I feel I'm missing something simple when I have to add the SwiftProtobuf library to the project.

I've followed all the steps suggested in the SwiftProtobuf readme (https://github.com/apple/swift-protobuf): I've created my .proto file and compiled it with the suggested protoc command and added the result .pm.swift file inside my project. I also copied the compiled swift-protobuf project folder inside my project and added SwiftProtobuf.xcodeproj in my build dependencies (Project > Build Phases > Target Dependencies).

By doing like this xcode doesn't give any error but crashes with that error code at runtime. I don't have a .framework file inside swift-protobuf project folder and that's probably the cause.

xcode version: 10.1, swiftprotobuf version: 1.5.0, swift 4.2, iphone5

LowRez
  • 125
  • 2
  • 14
  • Have you succeeded in your attempts? I'm experiencing the same problem. – Darkseid Jul 29 '19 at 13:29
  • @Darkseid In project settings under build phases select the '+' sign and add a Copy File Phase. As destination pop-up select Framework and drag the SwiftProtobuf.framework file in. – LowRez Jul 29 '19 at 20:58
  • This didn't work for me, but it helped when I added the framework in Embedded Binaries. Thanks, though! – Darkseid Jul 30 '19 at 10:19

0 Answers0