xcode10

Swift 4.2 SafeAreaLayoutGuide frame is the same as view.frame on View Did Load

て烟熏妆下的殇ゞ 提交于 2019-12-24 21:06:17
问题 I'm using safearealayout guides, programmatically (i.e.) without storyboards. I want to access the safeAreaLayoutGuides , layoutFrame size within my app but don't know when to call it. If you call on viewDidLoad , the size returned is the same as the full view.frame size . When does the app catch up and readjust? My full app has 5 screens within a menubarcontroller . The first screen loads with content constrained to view.topAnchor when I've activated view.safeAreaLayoutGuide.topAnchor . If

Keeping NSUserActivity backwards compatible with Xcode 9

时间秒杀一切 提交于 2019-12-24 08:35:37
问题 Using Xcode 10 (beta 6) I am able to write and run the following code with no trouble: import Intents func test() { let activity = NSUserActivity(activityType: "com.activtiy.type") activity.title = "Hello World" activity.isEligibleForSearch = true activity.isEligibleForHandoff = false if #available(iOS 12.0, *) { activity.isEligibleForPrediction = true activity.suggestedInvocationPhrase = "Say something" } print(activity) } As of iOS 12 the .isEligibleForPredictions and

Cannot open Xcode project after updating to Catalina

十年热恋 提交于 2019-12-24 04:17:29
问题 I've downloaded an Open Source Xcode project from GitHub, but I can't open it with Xcode ver 10 or ver 11 beta after updating my Mac to Catalina. I don’t have any problem making a new project though. I've already restarted my Mac few times but there’s no change. I want some advice. 回答1: [UPDATE: I have now encountered this twice, so I added my second solution.] But spoiler alert...I'm pretty positive the issue stems from saving my Desktop and Documents folders in iCloud 🙄 The first time this

Xcode preferences -> accounts not saved

女生的网名这么多〃 提交于 2019-12-23 22:10:08
问题 Generally in Xcode we can save different apple accounts in preferences. It was working before in previously all versions. Last week I have updated Xcode and installed Xcode version 10.0 And then I have added 3-4 Apple IDs : Xcode -> Preferences -> Accounts But next day when I open Xcode , all accounts are gone. I have tried many times, but same thing happened everytime next day I found blank in Xcode -> Preferences -> Accounts Seems that Xcode 10 can't keep apple accounts saved in preferences

Xcode 10 beta2: Cannot invoke initializer for type 'UIView' with no arguments

最后都变了- 提交于 2019-12-23 09:26:44
问题 I have downloaded Xcode 10 beta2 and rebuild my project, codes such as: let someView = UIView() come up with the following error: Cannot invoke initializer for type 'UIView' with no arguments Pretty strange. Has anybody encountered those building errors when using Xcode 10 beta2? 回答1: For me it was reasoned by extending NSObjectProtocol: extension NSObjectProtocol where Self: UIView I fixed it by replacing NSObjectProtocol to any other protocol that UIView conforms. In my case it was

Run Script Phase after dSYM is generated with Xcode 10 (on build)

a 夏天 提交于 2019-12-22 12:07:54
问题 In the New Features section, it states: In the new build system, shell scripts can't rely on the state of build artifacts not listed in other build phases (for example, the Info.plist file or .dSYM files.) Add files the script build phase depends on as explicit input dependencies to the shell script build phase. (40852184) In previous Xcode, the script was executed successfully but now it can execute when the dSYM file size is 0. How can I have a Run Script Phase that will start only after

How to use XCode's mergetool to resolve conflicts?

丶灬走出姿态 提交于 2019-12-22 11:26:54
问题 I'm in the middle of a rebase and I need to fix some merge conflicts. When I open the file in XCode, I see the source control conflict markers (<<<<<<<, etc) in the file. How can I use XCode's mergetool to resolve these conflicts in a graphical fashion? I'm looking for this screen: 回答1: Pulling the answer from here # Tell system when Xcode utilities live: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer # Set "opendiff" as the default mergetool globally: git config -

Could not locate device support files: iOS

巧了我就是萌 提交于 2019-12-22 07:13:53
问题 I am using Xcode 10.0 and running in 12.1.1(16C50). It was given below error. iOS 12.1.1 not supported by Xcode 10.0: Could not locate device support files 回答1: Please upgrade your Xcode IDE to 10.1 . Xcode 10.1 Release Notes can be found at, https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_release_notes/ 回答2: Just download latest OS SDK (iOS 12.2) and paste it on respective location. Downloadable URL: 13.2 13.1 13.0 12.4 12.3 12.2 (16E226) 12.1 12.0 (16A5288q) 11.4

Could not locate device support files: iOS

笑着哭i 提交于 2019-12-22 07:13:11
问题 I am using Xcode 10.0 and running in 12.1.1(16C50). It was given below error. iOS 12.1.1 not supported by Xcode 10.0: Could not locate device support files 回答1: Please upgrade your Xcode IDE to 10.1 . Xcode 10.1 Release Notes can be found at, https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_release_notes/ 回答2: Just download latest OS SDK (iOS 12.2) and paste it on respective location. Downloadable URL: 13.2 13.1 13.0 12.4 12.3 12.2 (16E226) 12.1 12.0 (16A5288q) 11.4

Xcode 10 Command PhaseScriptExecution failed with a nonzero exit code (EXPANDED_CODE_SIGN_IDENTITY: unbound variable)

元气小坏坏 提交于 2019-12-20 11:35:53
问题 This error pops up when doing Project > Test /Users/.../Project/Pods/Target Support Files/Pods-Target/Pods-TargetTests-frameworks.sh: line 104: EXPANDED_CODE_SIGN_IDENTITY: unbound variable Command PhaseScriptExecution failed with a nonzero exit code How do I resolve "Command PhaseScriptExecution failed with a nonzero exit code" error when trying to test a project with cocoapods? 回答1: This helped me sudo gem install cocoapods --pre pod update I've read BugReport. Problem was similar to mine