Software Archive
Read-only legacy content
17061 Discussions

iOS: Build error: Cannot compile plugin because Auto Layout is required

Jannes_D_
Beginner
530 Views

When trying to build the app targeting iOS 6 and above, it aborts with an error:

CompileXIB [myproject].de/Resources/DatePicker.xib
    cd .../[myproject]app/platforms/ios
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Developer/android-sdk-macosx/tools:/usr/local/ant/bin"
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --target-device iphone --target-device ipad --errors --warnings --notices --module [myproject]_de --minimum-deployment-target 6 --output-partial-info-plist .../[myproject]app/platforms/ios/build/[myproject].de.build/Release-iphoneos/[myproject].de.build/DatePicker-PartialInfo.plist --auto-activate-custom-fonts --output-format human-readable-text --compile .../[myproject]app/platforms/ios/build/device/[myproject].de.app/DatePicker.nib .../[myproject]app/platforms/ios/[myproject].de/Resources/DatePicker.xib
/* com.apple.ibtool.document.errors */
.../[myproject]app/platforms/ios/[myproject].de/Resources/DatePicker.xib:CHZ-tf-She: error: Auto Layout on iOS Versions prior to 6.0
.../[myproject]app/platforms/ios/[myproject].de/Resources/DatePicker.xib:SUg-U1-bKY: error: Auto Layout on iOS Versions prior to 6.0
.../[myproject]app/platforms/ios/[myproject].de/Resources/DatePicker.xib:xq4-6B-F5W: error: Auto Layout on iOS Versions prior to 6.0
.../[myproject]app/platforms/ios/[myproject].de/Resources/DatePicker.xib:1: error: Auto Layout on iOS Versions prior to 6.0
.../[myproject]app/platforms/ios/[myproject].de/Resources/DatePicker.xib:b2J-jW-BgT: error: Auto Layout on iOS Versions prior to 6.0
.../[myproject]app/platforms/ios/[myproject].de/Resources/DatePicker.xib:FEs-Wn-Ur2: error: Auto Layout on iOS Versions prior to 6.0

The Plugin is from https://github.com/VitaliiBlagodir/cordova-plugin-datepicker

It works when setting the target to iOS 7 and above. Is this a problem caused by XDK or by the Plugin? Is there any directive I can add to my intelxdk.config.additions.xml to solve this problem?

Any ideas?

0 Kudos
2 Replies
Elroy_A_Intel
Employee
530 Views

This appears to be an issue with the plugin itself. As mentioned in the error, the plugin is attempting to use auto-layout constraints which allows the datepicker to be sized appropriately on devices of varying screen sizes. I recommend posting an issue to the plugin's developer Github repo.

0 Kudos
Elroy_A_Intel
Employee
530 Views

Auto-Layout was introduced in iOS 6 but the developer may not have handled all the necessary cases.

0 Kudos
Reply