xcode7-beta5

Are inout variables of protocol type prohibited?

给你一囗甜甜゛ 提交于 2021-02-07 22:12:09
问题 The following code: protocol SomeProtocol {} class SomeClass: SomeProtocol {} private func doSomethingWith(inout someVar: SomeProtocol) {} private var someGlobalVar = SomeClass() // inferring SomeClass's type doSomethingWith(&someGlobalVar) produces the following error: Cannot invoke 'doSomethingWith' with an argument list of type '(inout SomeClass)' Changing the penultimate line to private var someGlobalVar: SomeProtocol = SomeClass() resolves the error. Subj. 回答1: When you assign a

how to add armv7s architecture to static library in xcode 7 / ios 9?

前提是你 提交于 2020-01-03 07:37:49
问题 Looks like after upgrading to xcode 7 beta 5 and iOS 9.0 beta 5, I can't create a static library that includes an armv7s slice. lipo -info staticLibraryName says: Architectures in the fat file: staticLibraryName are: armv7 i386 x86_64 arm6. Adding armv7s to build settings alongside $(ARCHS_STANDARD) and setting Build Active Architectures Only to No doesn't not seem to do the trick like it did in xcode 6. Any one else getting this ? Any way to produce the armv7s slice ? If I release a static

Command /Applications/Xcode-beta.app/Contents/Developer/usr/bin/actool failed with exit code 255

谁说我不能喝 提交于 2020-01-01 04:22:10
问题 It happens in new Xcode7 beta: CompileAssetCatalog /Users/admin/Library/Developer/Xcode/DerivedData/InstaAd-ddgdnbxlpxipirebpndfmgrxspel/Build/Products/Debug-iphoneos/InstaAd.app InstaAd/Images.xcassets cd /Users/admin/Documents/git/InstaAdIOS/InstaAd export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode-beta.app

Using Object Initializers in Swift to replace AllocWithZone

爱⌒轻易说出口 提交于 2019-12-23 16:23:28
问题 I recently updated my Xcode from Xcode 7 beta 4 to Xcode 7 beta 5 and began to have an error that wasn't present before. That being: "AllocWithZone is unavailable in Swift: use Object Initializers instead." Here is the code where the error is found: public func copyWithZone(zone: NSZone) -> AnyObject { let copy = self.dynamicType.allocWithZone(zone) as ChartDataSet copy.colors = colors copy.label = self.label return copy } What do I substitute in place of ".allocWithZone" so that it utilizes

Xcode 7 will NOT build a valid Archive from the same project that builds a valid archive in Xcode 6

老子叫甜甜 提交于 2019-12-18 12:24:44
问题 When using Xcode 7b5 to build my app that contains a Today Extension I cannot create a valid archive. When I make an archive the build succeeds and then in Organizer it shows up under "Other Items" instead of under "iOS Apps". If I close the project and open up the same project in Xcode 6.3.2 when I make the archive it shows up under "iOS Apps". I compared the archives and the one thing I noticed is that my Today Widget is being placed outside of the Applications directory. The structure

How to unit-test this custom UITextField in Swift?

别等时光非礼了梦想. 提交于 2019-12-12 22:08:45
问题 I have created a custom UITextField like this import Foundation import UIKit class NoZeroTextField: UITextField, UITextFieldDelegate { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.delegate = self } func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool { if (string == "0" ) { //ignore input return false } return true } } I am trying to write unit test for the class but the problem is with

RestKit with cocoapod with use_frameworks! can't use AFNetworkReachability

独自空忆成欢 提交于 2019-12-06 05:56:19
问题 My pod file looks like this: source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! pod 'RestKit' pod 'CocoaLumberjack' On top of my App delegate I added: #import <RestKit/RestKit.h> In the application:didFinishLaunchingWithOptions: I added this: RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[NSString class]]; So far it compiles fine, then I added: AFHTTPClient* client = [[AFHTTPClient alloc] initWithBaseURL:[[NSURL alloc] initWithString:@"asdf"]];

Command /Applications/Xcode-beta.app/Contents/Developer/usr/bin/actool failed with exit code 255

让人想犯罪 __ 提交于 2019-12-03 11:09:28
It happens in new Xcode7 beta: CompileAssetCatalog /Users/admin/Library/Developer/Xcode/DerivedData/InstaAd-ddgdnbxlpxipirebpndfmgrxspel/Build/Products/Debug-iphoneos/InstaAd.app InstaAd/Images.xcassets cd /Users/admin/Documents/git/InstaAdIOS/InstaAd export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode-beta.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency

Xcode 7 SceneKit object's position property does not update when moved?

血红的双手。 提交于 2019-11-28 11:50:44
问题 So I'm making a game and in said game, you will use a DPad to move your ball around the scene. I'm using Xcode 7 Beta 5 though the same problem existed in beta 4. Here is the code of a test view controller: class TestController: UIViewController,DPadDelegate { @IBOutlet var scnView:SCNView! @IBOutlet var dpad:DPad! var timer:NSTimer? var update:NSTimer? var colors = [UIColor.blueColor(),UIColor.redColor(),UIColor.whiteColor(),UIColor.yellowColor(),UIColor.cyanColor(),UIColor.orangeColor()

the behavior of the UICollectionViewFlowLayout is not defined, because the cell width is greater than collectionView width

◇◆丶佛笑我妖孽 提交于 2019-11-27 19:08:28
问题 2015-08-18 16:07:51.523 Example[16070:269647] the behavior of the UICollectionViewFlowLayout is not defined because: 2015-08-18 16:07:51.523 Example[16070:269647] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values. 2015-08-18 16:07:51.524 Example[16070:269647] The relevant UICollectionViewFlowLayout instance is , and it is attached to ; animations = { position=; bounds.origin=;