Swift 1.2 compatibility #8

Closed
opened 2025-12-29 18:27:51 +01:00 by adam · 2 comments
Owner

Originally created by @kwhitaker on GitHub (Apr 9, 2015).

Hello,

I updated XCode to 6.3 today, which includes Swift 1.2, and that seems to have broken Armchair. Several of the errors I think I was able to fix myself (implicitly casting NSString into String is no longer allowed, it seems), but I'm getting a few errors which, frankly, I'm not knowledgable enough to fix.

All of these are in Armchair.swift, so far.

  1. public class StandardUserDefaults: ArmchairDefaultsObject renders "Type StandardUserDefaults does not conform to protocol ArmchairDefaultsObject.
  2. private var userDefaultsObject:ArmchairDefaultsObject? = StandardUserDefaults() renders "StandardUserDefaults is not convertibel to ArmchairDefaultsObject?"
  3. let currentVersion = NSBundle.mainBundle().objectForInfoDictionaryKey(kCFBundleVersionKey) as? NSString renders "Type of expression is ambiguous without more context."

I'm going to do my best to get some answers for these, but I thought it might be helpful for you to know (and maybe you have some quick solutions).

Originally created by @kwhitaker on GitHub (Apr 9, 2015). Hello, I updated XCode to 6.3 today, which includes Swift 1.2, and that seems to have broken Armchair. Several of the errors I _think_ I was able to fix myself (implicitly casting `NSString` into `String` is no longer allowed, it seems), but I'm getting a few errors which, frankly, I'm not knowledgable enough to fix. All of these are in Armchair.swift, so far. 1. `public class StandardUserDefaults: ArmchairDefaultsObject` renders "Type StandardUserDefaults does not conform to protocol ArmchairDefaultsObject. 2. `private var userDefaultsObject:ArmchairDefaultsObject? = StandardUserDefaults()` renders "StandardUserDefaults is not convertibel to ArmchairDefaultsObject?" 3. `let currentVersion = NSBundle.mainBundle().objectForInfoDictionaryKey(kCFBundleVersionKey) as? NSString` renders "Type of expression is ambiguous without more context." I'm going to do my best to get some answers for these, but I thought it might be helpful for you to know (and maybe you have some quick solutions).
adam closed this issue 2025-12-29 18:27:51 +01:00
Author
Owner

@coneybeare commented on GitHub (Apr 10, 2015):

Thanks for digging in. I am not going to be able to work on Armchair for a bit, so any PR's would be much appreciated. Thanks for the heads up.

@coneybeare commented on GitHub (Apr 10, 2015): Thanks for digging in. I am not going to be able to work on Armchair for a bit, so any PR's would be much appreciated. Thanks for the heads up.
Author
Owner

@nickoneill commented on GitHub (Apr 11, 2015):

Added in #12

@nickoneill commented on GitHub (Apr 11, 2015): Added in #12
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Armchair#8