How to remove multiple spaces in Strings with Swift 2

In Swift 2, join has become joinWithSeparator and you call it on the array. In filter, isEmpty should be called on the current iteration item $0. To replace whitespaces and newline characters with unique space characters as in your question: extension String { func condenseWhitespace() -> String { let components = self.componentsSeparatedByCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()) return components.filter { … Read more

Xcode Couldn’t Generate Swift Representation for my own framework

From my experience there are two possible causes for this issue. The first one is that your framework can’t be located. To fix this you need to go to target’s Build Settings and add a path to Framework Search Paths either an absolute: /Users/{user}/path-to-framework-parent-directory or relative to project directory: $(PROJECT_DIR)/path-to-framework-parent-directory Another possible cause is that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)