PLCrashReporter in XCode 4 - won't compile in Simulator

后端 未结 3 602
终归单人心
终归单人心 2020-12-16 03:58

I must be doing something totally stupid here, but I can\'t get the PLCrashReporter framework included in my project. Here are the steps I took to get the framework:

相关标签:
3条回答
  • 2020-12-16 04:38

    I had the same issue and was able to resolve it. Here are the steps I completed...

    1. Download the PLCrashReporter source release and unzip.
    2. Open the PLCrashReporter xcode project. This project is setup to use an old SDK, update all the required SDKs for each target to get rid of the warnings. This is also required to compile in the next step.
    3. Navigate to the CrashReporter-iPhoneSimulator Target. Under the Build Settings: a) set "Perform Single-Object Prelink" to "No", b) set "Mach-O Type" to "Static Library".
    4. Select CrashReport-iPhoneSimulator : [IOS simulation (ie iPhone 4.3 Simulator)] and click build.
    5. Navigate to your build directory for the PLCrashReporter. For me, it was /Users/username/Library/Developer/Xcode/DerivedData/CrashReporter-(random characters)/Build/Products/Debug-iphonesimulator
    6. Copy the libCrashReporter-iphonesimulator.a from the build directory in step 5 to the iphone application project directory you want to add the crash reporter to.
    7. Open the your iphone application project in xcode.
    8. Download the PLCrashReporter binary release and extract the framework to a local directory.
    9. Add the CrashReporter framework to your project using this SO post.
    10. Following the same procedure as step 9, add the libCrashReporter-iphonesimulator.a static library to the "Link Binary with Libraries" section of the build phases. No *.framework directory is needed when adding a static library.
    11. Review the "Link Binary with Libraries" in the Target. Make sure the libCrashReporter-iphonesimulator.a is listed above the CrashReporter framework. You can drag and drop to reorder.

    I hope this helps.

    0 讨论(0)
  • 2020-12-16 04:43

    Don't forget to include

    libstdc++.dylib

    in "Link Binary With Libraries".

    0 讨论(0)
  • 2020-12-16 04:48

    For anyone else looking for this information:

    I followed the same steps given above however I was getting errors. I deleted the static library and only included the framework (which you can get from their dmg).

    It worked perfectly for me. I think the process of creating static library by building the project was old (before they created a framework).

    Thanks.

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