Skip to content
Home » Private: Blog » Creating a Xamarin Binding Library & iOS 11.2

Creating a Xamarin Binding Library & iOS 11.2

When creating and compiling the Binding Library by following the guide provided by Xamarin, and having set your iOS SDK to 11.2, you will most likely find that armv7 is no longer supported when executing the Makefile

clang: error: invalid iOS deployment version '-miphoneos-version-min=11.2',
iOS 10 is the maximum deployment target for 32-bit targets
[-Winvalid-ios-deployment-target]

** BUILD FAILED **
........
(8 failures)
make: *** [libLeanPlum-armv7.a] Error 65

To solve this issue, simply remove the support for armv7 as done below (remember to use tabs if you write the Makefile by hand):

XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
PROJECT_ROOT=./LeanPlum
PROJECT=$(PROJECT_ROOT)/LeanPlum.xcodeproj
TARGET=LeanPlum

all: lib$(TARGET).a

lib$(TARGET)-i386.a:
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator -configuration Release clean build
-mv $(PROJECT_ROOT)/build/Release-iphonesimulator/lib$(TARGET).a $@

lib$(TARGET)-arm64.a:
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch arm64 -configuration Release clean build
-mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@

lib$(TARGET).a: lib$(TARGET)-i386.a lib$(TARGET)-arm64.a
xcrun -sdk iphoneos lipo -create -output $@ $^

clean:
-rm -f *.a *.dll

Now you should be able to produce the Fat binaries.

// Dave

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

This page is under construction