You Won't Believe What Got Broken In AppleTV Beta 3

Originator:info
Number:rdar://22993940 Date Originated:06-Oct-2015 11:10 AM
Status:Open Resolved:
Product:iOS SDK Product Version:Xcode 7.1 beta 3 (Apple TV)
Classification:Serious Bug Reproducible:Always
 
Summary:
Surprise: something else is broken!
In this episode of “What’s broken in Appleland?” we’ll cover the mysterious case of building AppleTV frameworks.

Steps to Reproduce:
- Create a project (I recommend googling for StackOverflow posts that explain how to do this)
- Add an AppleTV framework target.
- Compile target in Release mode from the command line (using Carthage, for example).

Expected Results:
- Build succeeds, although this .framework is completely useless (see rdar://22967941 for more details)

Actual Results:
- SURPRISE!! It doesn’t. Xcode spits out tons of errors like:
  - /Applications/Xcode-beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator9.0.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
#error Unsupported architecture
  - /Applications/Xcode-beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator9.0.sdk/usr/include/_types.h:42:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_wctype_t;
  - ld: warning: Auto-Linking supplied '/Applications/Xcode-beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator9.0.sdk/usr/lib/libobjc.dylib', file was built for x86_64 which is not the architecture being linked (arm64): /Applications/Xcode-beta.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator9.0.sdk/usr/lib/libobjc.dylib

Regression:
This worked in beta 2… (though everything that was previously broken is still broken!)

Notes:
I have no idea if this is a known issue because at the time of this writing the release notes have not been published yet.

Duplicates

Number Status Originator Product Title
rdar://23973685 Duplicate/22993940 google.j Developer Tools Regression: xcodebuild no longer infers destination platform from -sdk parameter

Comments

Workaround

I have the same problem compiling a brand new project for iphonesimulator using similar parameters.

I looks like the ARCH and PLATFORM_NAME variables are incorrectly set even though we're specifying -sdk iphonesimulator. My current work around is to specify PLATFORM_NAME=iphonesimulator on top of the -sdk iphonesimulator flag.

Waiting to hear more from my bug report to Apple.

By roberto.andrade at Dec. 11, 2015, 9:50 p.m. (reply...)

You can reproduce this following these steps too: - git clone git@github.com:Anviking/Decodable.git - cd Decodable - 
xcodebuild -sdk appletvsimulator -project Decodable.xcodeproj -configuration Release -scheme Decodable-tvOS ONLY_ACTIVE_ARCH=NO clean build

Note that it does compile fine with - sdk appletvos


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!