Coder Social home page Coder Social logo

CarPlay about devicekit HOT 4 CLOSED

devicekit avatar devicekit commented on July 24, 2024
CarPlay

from devicekit.

Comments (4)

dennisweissmann avatar dennisweissmann commented on July 24, 2024

Hey, yeah I'm reeeeeeaally sorry for that 🙊🙏, it was a mistake to include them during the beta - I hope that won't happen again ... Does that error still occur with Xcode 7.3 and a changed base SDK of 9.3?

from devicekit.

SentoCrespo avatar SentoCrespo commented on July 24, 2024

I was in 7.2.1, I'll come back when I update it :)

from devicekit.

SentoCrespo avatar SentoCrespo commented on July 24, 2024

It always take sooo long to update Xcode, I love it <3

Tested version 0.3.1 against Xcode 7.3, working ok.

Maybe it's good to check SDK version wherever CarPlay appears so it doesn't fail when compiling.
But I leave this decision to the father of the framework.

from devicekit.

dennisweissmann avatar dennisweissmann commented on July 24, 2024

That's exactly what I'm trying to do but haven't found a solution yet ... The if #available(iOS 9.3) thingy won't work ... If you know what to do please feel free!!

What I tried is

  @available(iOS 9.3, *)
  case CarPlay
  ...

       private init() {
          if #available(iOS 9.3, *) {
            switch UIDevice.currentDevice().userInterfaceIdiom {
            case .Pad:          self = .Pad
            case .Phone:        self = .Phone
            case .TV:           self = .TV
            case .CarPlay:      self = .CarPlay
            case .Unspecified:  self = .Unspecified
            }
          } else {
            switch UIDevice.currentDevice().userInterfaceIdiom {
            case .Pad:          self = .Pad
            case .Phone:        self = .Phone
            case .TV:           self = .TV
            case .Unspecified:  self = .Unspecified
            default:            self = .Unspecified // I think this is needed because Apple's `CarPlay` case is annotated as `@available(iOS 9.0, *)` but is only available in iOS 9.3 and later.
            }
          }
        }

That works fine if I link against 9.3, but not if I link against 9.2, which renders the whole if #available thing useless ... If you have any ideas please let me know or send a pull request!

from devicekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.