xcode9

Objective-C @available guard AND'ed with more conditions

血红的双手。 提交于 2019-11-30 11:15:26
Objective-C has an @available expression in XCode 9+ / LLVM 5+ that allows you to guard a block of code to at least a certain OS version so that it won't emit unguarded availability warnings if you use APIs that are only available on that OS version. The problem is that this availability guarding is that it only works if it's the sole expression in the condition of an if . If you use it in any other context, you get a warning: @available does not guard availability here; use if (@available) instead So for example, it doesn't work if you try to AND the availability check with other conditions

Xcode 9 Bug: Cannot find cdtool

好久不见. 提交于 2019-11-30 10:11:32
问题 After installing Xcode 9 beta, Xcode 8 gives me an error when compiling a project: Cannot find cdtool at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool': Cannot find a simulator runtime for platform <DVTPlatform:0x7fd67af0a930:'com.apple.platform.iphonesimulator':<DVTFilePath:0x7fd67af0a7c0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform'>> . I suspect Xcode 9 modified some shared state with

How to line break long large title in iOS 11?

﹥>﹥吖頭↗ 提交于 2019-11-30 09:56:37
I am trying to use the new large title system in iOS 11 using Swift. When the title gets too long (see image example), it adds ... instead of line breaking or shrinking the text size. How can I add a line break? Here is some of the code I'm using to set up the title: self.navigationController?.navigationBar.prefersLargeTitles = true self.navigationController?.navigationBar.largeTitleTextAttributes = [NSForegroundColorAttributeName: MyGlobalVariable.themeMainColor] self.navigationController?.navigationBar.largeTitleTextAttributes = [NSFontAttributeName: UIFont.systemFont(ofSize: 22)]

Xcode 9 doesn't have any simulator device

拟墨画扇 提交于 2019-11-30 07:12:12
问题 I just downloaded xcode 9 beta, but there is no simulator within it. Try to add new simulator but the create button doesn't work. Please help By "no simulator within it" I mean there is option to build with simulator. See . Also, the create button doesn't work 回答1: Go to Xcode Preferences -> Locations and go to the Derived Data location in Finder: Just remove all contents from it, then right click on Xcode icon and quit it, and reopen it: 回答2: It is a simulator but you need to close Xcode 8

Xcode 9 Crashing while setting a Texture in SKScene in Spritekit

大城市里の小女人 提交于 2019-11-30 06:53:28
I am building a game in Spritekit with Xcode currently. After updating to Xcode 9 I've found that every time I set a texture through the .sks file, Xcode crashes instantly. I've restarted my computer, updated the app, reloaded the textures and nothing changed. I have the 2017 Macbook Prof 13" w/ touch bar. Here are the diagnostics: Process: Xcode [577] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 9.0.1 (13249) Build Info: IDEFrameworks-13249000000000000~2 App Item ID: 497799835 App External ID: 823984564 Code Type: X86-64 (Native) Parent Process: ?

What does the dark triangle, located on the folder icons in Xcode 9, mean?

感情迁移 提交于 2019-11-30 06:05:43
I use Xcode 9.0. Some folders icons in my Xcode project have dark triangles in bottom left corner - for example, "0. Login", "Frameworks", "Products", "Pods". What does this mean? Folders without dark triangles exist as a group in your project and also (what is new in Xcode 9) exist as a folder in file structure. Example: After double-click in your project navigator you can see menu: For New Group Xcode create group in project navigator and create folder in file structure (in finder) and of cource for New Group without Folder create only group. The introduction of yellow folders with a

refreshPreferences HangTracerEnabled / HangTracerDuration messages in iOS 11 + Xcode 9

大城市里の小女人 提交于 2019-11-30 04:46:12
When update to iOS 11, after run app in iPhone, I receive this message in Xcode console: SibDiet[924:111682] refreshPreferences: HangTracerEnabled: 0 SibDiet[924:111682] refreshPreferences: HangTracerDuration: 500 SibDiet[924:111682] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0 And now I get this message in every simulator and app. How can I solve this problem? You can hide this message with click left mouse button on your target, and next Edit Scheme . After that in section Environment Variables create variable with name OS_ACTIVITY_MODE and value disable

Xcode 9: Provisioning profile is Xcode managed, but signing settings require a manually managed profile

萝らか妹 提交于 2019-11-30 03:03:23
I need to archive my app for submission to iTunes Connect. It was OK with Xcode 8.3.3: It's NOT OK with Xcode 9.0: When archiving, I get: Code Signing Error: Provisioning profile "XC iOS: *" is Xcode managed, but signing settings require a manually managed profile. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.0' The two screenshots are taken from the same computer, same workspace. I can't use "Automatic" because it would change the provisioning profile to a different one, then after uploading to iTunes Connect I would get: Potential Loss of

dyld: dyld_sim not compatible mach-o

梦想的初衷 提交于 2019-11-30 01:24:59
I installed Xcode 9 and trying to run my app on ios simulator 11.0. As soon as it launches the app its crashing giving this error. What does this error mean? If my app is not compatible with ios11.0, how can I check for the compatibily? EDIT - Uploaded my valid Architectures You need to make these changes in build setting ... it works for me I had the same problem and found out that the architectures and valid architectures settings for my targets (and pods) were set wrong. iOS 11 doesn't support 32bit applications anymore, so I guess that took part in my problem.., I've deleted my

Xcode can only refactor C and Objective-C code. How to rename swift class name in Xcode 6?

半城伤御伤魂 提交于 2019-11-29 23:25:17
I have created a new Single View Application Project in Xcode 6 beta version. I want to rename swift class from ViewController.swift to some other name. But when I select Refactor -> Rename, it gives error Xcode can only refactor C and Objective-C code . Any idea how to rename swift class in Xcode 6? UPDATE: Finally Xcode 9 is supporting Refactoring for Swift. It took Apple 3 years to add this basic feature. Refactoring You can change name of a class in File Inspector at the right side of Xcode6. open your class go to File Inspector > Identify and type section rename existing class in "name"