Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tvOS support #268

Closed
bruceflowers opened this issue Sep 16, 2015 · 11 comments
Closed

tvOS support #268

bruceflowers opened this issue Sep 16, 2015 · 11 comments

Comments

@bruceflowers
Copy link

I would love to be able to use PromiseKit in a tvOS project... Is there any plan to add support for this in the near future?

@wovencharlie
Copy link

+1

@mxcl
Copy link
Owner

mxcl commented Sep 16, 2015

Does it not work? If not, what prevents it working?

@dbachrach
Copy link
Contributor

We've got promises working in tvOS as is.

@bruceflowers
Copy link
Author

I'm trying to build the swift2-beta5 branch (a413bba) using carthage update --platform tvOS.

Perhaps there's a more current swift2 branch I didn't see, or maybe I'm missing something else?

Anyway, this is the output I get:

carthage update --platform tvOS
*** Fetching PromiseKit
*** Fetching OMGHTTPURLRQ
*** Checking out PromiseKit at "a413bbad4c539dadf36312d471e932e0ce980fd4"
*** Checking out OMGHTTPURLRQ at "3.0.0"
*** xcodebuild output can be found in /var/folders/66/7ttbxjv94md42tvryd7ww0fc0000gn/T/carthage-xcodebuild.ehAk9Q.log
*** Skipped building OMGHTTPURLRQ due to the error:
Dependency "OMGHTTPURLRQ" has no shared framework schemes for any of the platforms: tvOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/mxcl/OMGHTTPURLRQ/issues/new
*** Skipped building PromiseKit due to the error:
Dependency "PromiseKit" has no shared framework schemes for any of the platforms: tvOS

@dbachrach
Copy link
Contributor

Hmmm. We integrated with cocoapods and used that branch.

@bruceflowers
Copy link
Author

What version of CocoaPods?

I ask because it looks like tvOS support was worked on, but only lives in this PR right now:
CocoaPods/CocoaPods#4152

But it doesn't look like it's been merged in...

@dbachrach
Copy link
Contributor

We are on cocoa pods 0.38.2, and here's our podfile:

platform :ios, '8.0'
use_frameworks!

inhibit_all_warnings!
pod 'PromiseKit'

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SUPPORTED_PLATFORMS'] = ['appletvos', 'appletvsimulator'];
        end
    end
end

This doesn't use the new tvOS branch, and just manually updates the build settings to support tv and tv simulator.

@bruceflowers
Copy link
Author

I've got problems with some other pods not being compatible with use_frameworks!, so it's Carthage for any swift libraries in the project. But your fix is interesting!

@JALsnipe
Copy link

@dbachrach has a great solution, but also causes PromiseKit to import some UIKit extensions that are unavailable on tvOS. I modified his Podfile to import only the modules I needed:

# https://github.com/mxcl/PromiseKit/issues/268

platform :ios, '8.0'
use_frameworks!

inhibit_all_warnings!
pod 'PromiseKit/CorePromise'
pod 'PromiseKit/Foundation'
pod 'PromiseKit/SystemConfiguration'

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SUPPORTED_PLATFORMS'] = ['appletvos', 'appletvsimulator'];
        end
    end
end

@lagerkoller
Copy link

it does not seem like this still works in the current version of cocoa pods (1.0.0.beta.2). my podfile requires this as the platform: 'platform :tvos, '9.0''

so this does not work:

platform :tvos, '9.0'
use_frameworks!

target 'XYZ' do  
  inhibit_all_warnings!
  pod 'PromiseKit'

  post_install do |installer|
      installer.pods_project.targets.each do |target|
          target.build_configurations.each do |config|
              config.build_settings['SUPPORTED_PLATFORMS'] = ['appletvos', 'appletvsimulator'];
          end
      end
  end
end

any ideas on how this could work in the current cocoa pods version?

@nathanhosselton
Copy link
Contributor

The latest version (3.0.2, just released) includes proper tvOS support so the workarounds mentioned here should no longer be necessary. Please test and report back. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants