[iOS embedded targets] Require arm64 for device builds.

http://hipbyte.myjetbrains.com/youtrack/issue/RM-559
This commit is contained in:
Eloy Durán
2014-10-13 14:26:33 +02:00
committed by Watson
parent fde9580e7f
commit ef6f52f574
3 changed files with 35 additions and 4 deletions

View File

@@ -42,12 +42,11 @@ module Motion; module Project;
def local_platform; 'iPhoneSimulator'; end
def deploy_platform; 'iPhoneOS'; end
# App Extensions are required to include a 64-bit for App Store submission.
def archs
@archs ||= begin
# By default, do not build with 64-bit, as it's still experimental.
archs = super
archs['iPhoneSimulator'].delete('x86_64')
archs['iPhoneOS'].delete('arm64')
archs
end
end

View File

@@ -42,12 +42,11 @@ module Motion; module Project;
def local_platform; 'iPhoneSimulator'; end
def deploy_platform; 'iPhoneOS'; end
# Frameworks are required to include a 64-bit for App Store submission.
def archs
@archs ||= begin
# By default, do not build with 64-bit, as it's still experimental.
archs = super
archs['iPhoneSimulator'].delete('x86_64')
archs['iPhoneOS'].delete('arm64')
archs
end
end

View File

@@ -494,11 +494,44 @@ EOS
attr_accessor :targets
# App Extensions are required to include a 64-bit slice for App Store
# submission, so do not exclude `arm64` by default.
#
# From https://developer.apple.com/library/prerelease/iOS/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html:
#
# NOTE ABOUT 64-BIT ARCHITECTURE
#
# An app extension target must include the arm64 (iOS) or x86_64
# architecture (OS X) in its Architectures build settings or it will be
# rejected by the App Store. Xcode includes the appropriate 64-bit
# architecture with its “Standard architectures” setting when you create a
# new app extension target.
#
# If your containing app target links to an embedded framework, the app
# must also include 64-bit architecture or it will be rejected by the App
# Store.
#
# From https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW5
#
# A containing app that links to an embedded framework must include the
# arm64 (iOS) or x86_64 (OS X) architecture build setting or it will be
# rejected by the App Store.
#
def target(path, type, opts={})
unless File.exist?(path)
App.fail "Could not find target of type '#{type}' at '#{path}'"
end
unless archs['iPhoneOS'].include?('arm64')
App.warn "Device builds of App Extensions and Frameworks are " \
"required to have a 64-bit slice for App Store submissions " \
"to be accepted."
App.warn "Your application will now have 64-bit enabled by default, " \
"be sure to properly test it on a 64-bit device."
archs['iPhoneOS'] << 'arm64'
end
case type
when :framework
opts[:load] = true unless opts[:load] == false