libsqlite3.dylib and libz.dylib missing in Xcode 7. How do I use Parse?

后端 未结 5 1471
醉梦人生
醉梦人生 2020-12-23 16:58

How do I use Parse if libz.dylib and libsqlite3.dylib are missing in Xcode 7 but the .tbd version exists. I am just trying to setup Push Notifications. How do I get this to

相关标签:
5条回答
  • 2020-12-23 17:30

    In XCode 7 the *.dylib files are now *.tbd files, just search for the library you want and change the extension to .tbd

    Example:

    libz.dylib      -> libz.tbd
    libstdc++.dylib -> libstdc++.tbd
    

    Thanks

    0 讨论(0)
  • 2020-12-23 17:40

    I don't think adding dylib files manually is the right way. Parse documentation is not updated for XCode 7: .dylib files are now .tbd files! You can add these files using Build Phases > Link binary with libraries panel and selecting these files from the list, searching for libz and libsqlite3 (without the extension). You can find quick info here about tbd files : Why Xcode 7 shows *.tbd instead of *.dylib?

    0 讨论(0)
  • 2020-12-23 17:44

    step 1 (as described by StanislavK):

    Go to Build Phases > Link Binary with Libraries > + > Add other
    While in the file selection window press: "CMD"+Shift+G (i.e. Go to folder) and type /usr/lib/
    From /user/lib find and add : libz.dylib and libsqlite3.dylib

    step 2: open your terminal (for mac)

    cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib
    
    sudo ln -s /usr/lib/libsqlite3.dylib libsqlite3.dylib
    sudo ln -s /usr/lib/libz.dylib libz.dylib
    

    That works for me.

    0 讨论(0)
  • 2020-12-23 17:53

    In tracking down a solution to this on the mac developer forum, this seemed to be the popular answer:

    This is a known issue in the Xcode 7 beta. To work around this issue for now, please: Delete all references to .tbd files from either your linked libraries phase, or from the copied bundle resources phase (where they sometimes will be added). Add the library you want to link manually to the "Other Linker Flags" build settings, by adding the argument: -l for each library you want to link (for example, add "-lsqlite3" (without quotes)). For those who are curious, the .tbd files are new "text-based stub libraries", that provide a much more compact version of the stub libraries for use in the SDK, and help to significantly reduce its download size.

    In addition to this, I found that this worked verbatim for the sqlite3 example. But for libz.dylib you simply need to type -lz

    And from there I was able to build successfully on the simulator, I have yet checked on a device running iOS9

    0 讨论(0)
  • 2020-12-23 17:54

    As for Xcode 7 b4: To add Parse support into existing project, follow the Parse "Set up the SDK" for existing project and to add the libz and libsqlite3 libs, use:

    • Go to Build Phases > Link Binary with Libraries > + > Add other
    • While in the file selection window press: "command"+shift+G (i.e. Go to folder) and type /usr/lib/
    • From /user/lib find and add : libz.dylib and libsqlite3.dylib

    Please note!: Also make sure ATS works for you - this is new in iOS9!, see more info for example at NSURLSession "HTTP load failed kCFStreamErrorDomainSSL, -9813 ; Self signing certificate

    0 讨论(0)
提交回复
热议问题