xcode7

How to mock data in UITest on Xcode 7?

╄→гoц情女王★ 提交于 2019-12-18 11:31:58
问题 Someone has tried to include mock data with the new Xcode 7 UI tests? Have you used an specific framework? How have you managed targets? 回答1: I think there are a lot of ways to approach this one - the difficulty is that Apple has intentionally designed UITests to run entirely separate from the app under test. That said, there are a few hooks you can use to coordinate logic in the app with logic in your tests to feed in mock data or alter the behavior of your app in any way. The two I have

Getting Framework related warning in Xcode 7.0

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 10:37:23
问题 error I'm receiving is this directory not found for option '-F/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks' I have no idea why this is coming is this related to framework ? 回答1: I get rid of these by finding the target(s) that generated the error, then removing/deleting the (odd) path in the "Framework Search Paths" build setting: 回答2: What solves this for me is to create a new scheme.

Is it possible for Swift to inherit from an lightweight generic Objective-c Class?

若如初见. 提交于 2019-12-18 09:19:02
问题 I have two classes, the base class is in Obj-c and the subclass is in Swift. The Obj-c class uses new XCode 7's lightweight generic feature defined as follows: @interface BaseController<T: SFObject *> : UIViewController @property(nonatomic, strong) T model; @end That works fine for Obj-c subclasses. Now for Swift if I define the generic type as I usually do I get the following error: Cannot specialize non-generic type 'BaseObjcController'. My second class is defined as follows: class

UIApplication.sharedApplication() is unavailable

[亡魂溺海] 提交于 2019-12-18 07:36:42
问题 I just upgraded from XCode 6.4 to Xcode 7 GM and get started to change the code to be compliant with Swift 2. I could not come over the following errors. The project is a keyboard extension and the snippet is from the containing app. let s = "https://itunes.apple.com/" UIApplication.sharedApplication().openURL(NSURL(string : s)!) Error 1: 'sharedApplication()' is unavailable: Use view controller based solutions where appropriate instead. Error 2: 'openURL' is unavailable. This might be

Xcode 7 GM can't commit (GIT)

隐身守侯 提交于 2019-12-18 04:31:58
问题 Whenever I try to commit, using source control in Xcode, I get an error that I need to configure my email address and name (it seems to read my email address incorrectly). I went to the Terminal, and entered them (again). The error didn't go away. I can commit normally in Terminal, but not in Xcode. Is there a way to fix it? Or enter the configuration info directly in Xcode? This is the error message: *** Please tell me who you are. Run git config --global user.email "you@example.com" git

How to create ipa without Apple Developer Program in Xcode7

萝らか妹 提交于 2019-12-17 23:25:24
问题 What i am trying to do is create an ipa using Xcode7 for ad hoc distribution. I haven't done it earlier, this is my first try. Searched s/o and get to know that earlier it is possible to create ipa file with Xcode5. I was trying the way explained here But I am not getting the option to select export which is shown in the screenshot. I think apple may have changed it, now we can select the export file after signIn with the apple id registered in apple developer membership. I am attaching the

XCode 7. iOS simulators missing and not installable

≯℡__Kan透↙ 提交于 2019-12-17 23:16:04
问题 Can't see any iOS 9.0 simulators. In previous Xcode 7 beta 3 all was OK. Can't install iOS 8.3 simulator. Also I can't add any simulator from 'Organizer'. By pressing "Create" nothing happened. Each time when I'm trying to download iOS simulator I see next thing: 回答1: One possible issue is that there may be old leftover simulators installed, which are not compatible with the new XCode, and their presence causes the whole Simulator to fail. To get rid of them, delete the simulators in /Library

Xcode 7 iOS 9 UITableViewCell Separator Inset issue

老子叫甜甜 提交于 2019-12-17 23:00:25
问题 This is not a question, rather a solution to the problem I faced. In Xcode 7, when the application is run on iOS 9 on iPad devices, the UITableViewCell leaves some margin onto the left side of the UITableView . And rotating the device to the landscape would increase the margins. The solution I found is: Setting cellLayoutMarginsFollowReadableWidth to NO . self.tbl_Name.cellLayoutMarginsFollowReadableWidth = NO; This property is only available in iOS 9. So, you will have to put a condition to

XCode 7. iOS simulators missing and not installable

我只是一个虾纸丫 提交于 2019-12-17 22:59:00
问题 Can't see any iOS 9.0 simulators. In previous Xcode 7 beta 3 all was OK. Can't install iOS 8.3 simulator. Also I can't add any simulator from 'Organizer'. By pressing "Create" nothing happened. Each time when I'm trying to download iOS simulator I see next thing: 回答1: One possible issue is that there may be old leftover simulators installed, which are not compatible with the new XCode, and their presence causes the whole Simulator to fail. To get rid of them, delete the simulators in /Library

Enterprise (in-house) Swift application quits on launch on iOS9

点点圈 提交于 2019-12-17 22:42:48
问题 We find that our Swift application signed by in house certificate cannot run on iOS9 while it works correctly on iOS8. We have trusted the developer on settings -> general -> profiles, but when we try to launch the app, it gets stuck on the launch screen and then quits. We don't have any clue from the logs. It only tells that it failed to launch after 20.00s. I suspect that is an issue related to the signing. Because when I sign the application with an AdHoc certificate, it has no problem in