missing required architecture x86_64 in file libCorePlot-CocoaTouch.a

后端 未结 9 765
春和景丽
春和景丽 2020-12-25 13:57

According to the Ray Wenderlich tutorial, I done the following :

Step 1 - I downloaded CorePlot_1.4.zip o

相关标签:
9条回答
  • 2020-12-25 14:26

    If you tried all above but still not work, try to set -ObjC -lCorePlot-CocoaTouch to 'Other Linker Flags' in 'Build Settings' or your project target.

    0 讨论(0)
  • 2020-12-25 14:28

    I followed the official document 'Using Core Plot In An Application' in Xcode 7.2.1 with iOS SDK 9.2. I got the same error even if the .a supported arm64, until I add the linker flag '-lCorePlot-CocoaTouch' in addition to '-OjbC'.

    0 讨论(0)
  • 2020-12-25 14:29

    I got same errors with Xcode7.3 + CocoaPod. And I fixed the issue with Other Linker Flags= $(inherited) .

    Of course, this setting is only valid with CocoaPod.

    0 讨论(0)
  • 2020-12-25 14:32

    Try:

    lipo -info libCorePlot-CocoaTouch.a
    

    It's showing that the library is built for armv7, armv7s and i386 (32bit simulator) and that's not including the 64bit simulator. You'll have to build the lib for 64bit simulator and after that you can use lipo to add the 64bit lib to libCorePlot-CocoaTouch.a.

    Output:

    Architectures in the fat file: libCorePlot-CocoaTouch.a are: armv7 armv7s i386
    

    PS: It's not going to work on iPhone 5S as well (no arm64).

    EDIT:

    Here are the steps you need to make in order to produce a binary that has both the arm64 and x86_64 architectures in it:

    1. download CorePlot_1.4 from https://code.google.com/p/core-plot/downloads/detail?name=CorePlot_1.4.zip&can=2&q=
    2. Open the Xcode project (CorePlot-CocoaTouch.xcodeproj) located in CorePlot_1.4/Source/framework
    3. Select "Standard architectures" for "architectures" and "Latest iOS (iOS 7)" for "Base SDK"
    4. Build the library (CMD+B)
    5. Go to CorePlot_1.4/Source/build/ in the terminal
    6. Run lipo -create ./Debug-iphoneos/libCorePlot-CocoaTouch.a ./Debug-iphonesimulator/libCorePlot-CocoaTouch.a -output core_plot_all.a
    7. Add the newly created lib (core_plot_all.a) to your project
    8. You're ready to go
    0 讨论(0)
  • 2020-12-25 14:33

    Simplest Solution that works for me: Go to your project > build setting > architecture. Change architecture as armv7 and delete others like armv6,etc like as given in the image below :-

    0 讨论(0)
  • 2020-12-25 14:35

    change the setting of Architecture of Xcode

    enter image description here

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