Comments (25)
@KBMatveev did you add "import SwifterSwift" to the top of the file?
from swifterswift.
No. But let today = Date().beginning(of: .day)!
work without import. And startDate = today.adding(.year, value: -1)
too
And then I write let someString = String(" 123 ").trimmed
Xcode not found error. Xcode found error then I try build application
from swifterswift.
@KBMatveev some time some extensions don't work without import, please import SwifterSwift at every file you want to use it in, and let me know if you still have the problem
from swifterswift.
import SwifterSwift - No Such module 'SwifterSwift'
I add directory 'Extensions' manually.
"Manually
Add the extensions folder to your Xcode project to use all extensions, or a specific extension."
from swifterswift.
@KBMatveev and if you didn't clean and rebuild the project from the "Product" menu after installing the pod, it's also preferred to do that
from swifterswift.
@KBMatveev Then please make sure to check "Copy items if needed" and "Add to targets" checkboxes when adding the files to your xcode project
from swifterswift.
Not work. In edit mode XCode found and show trimmed extension
When build - error
from swifterswift.
@KBMatveev I think the code should be
let someString = String(" 123 ")?.trimmed
or
let someString = String(" 123 ")!.trimmed
trimmed is a String extension not a String? extension
Please try adding ? or ! and let me know if this fixes the problem
from swifterswift.
from swifterswift.
@KBMatveev 🤔, are you using xcode 8 with swift 3?
if yes, could you please try isEmail, or any other method to see if the problem is about the entire swift extensions, or just trimmed
from swifterswift.
from swifterswift.
DateExtensions work good, UITableViewExtensions too, trouble only with StringExtensions
from swifterswift.
@KBMatveev Then I assume the StringExtensions.swift file is not added to the target, could you please delete it, and re-add it to project while making sure to add it to target and copy if needed
from swifterswift.
I add the entire directory "Extensions", so it is unlikely that some files were added as DateExtensions, and some do not. But it's good. Will make again.
from swifterswift.
from swifterswift.
@KBMatveev weird!! , the StringExtensions.swift file follows the same structure of all other extensions files, and it is public
is this code working for you?
let someString = String(" 123 ")!.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
from swifterswift.
@KBMatveev I'm trying to understand what is causing the problem in your end, I've tested this with multiple projects, as I see in the first picture you sent the autocompletion is completing the trimmed for you, which means xcode can see the file!
do you have another string method or property called trimmed somewhere else in your project?
from swifterswift.
Yes. Look second string.
Had to pull it out Stringextension. Works.
Must be let rt = region.trimmed
from swifterswift.
@KBMatveev is the problem solved ?
from swifterswift.
do you have another string method or property called trimmed somewhere else in your project?
I have not tried everything. Reverse() does not work.
from swifterswift.
@KBMatveev I don't know what is happening in your end, everything is working correctly for me, I'd be glad to check it myself with teamviewer if you want
you can send me login info to [email protected]
from swifterswift.
is the problem solved ?
I replaced trimmed on trimmingCharacters. It worked, but hardly a solution to the problem.
You want to connect via TeamViewer?
from swifterswift.
@KBMatveev I'll try to check what is causing the problem if you want via teamviewer
from swifterswift.
Send password via eMail
from swifterswift.
@KBMatveev Glad your problem is fixed, I think the problem is when adding files from the file menu, they didn't get added to target for some reason, dragging the files to the project, always shows you the confirmation menu, where you can double check that files are added to your target
from swifterswift.
Related Issues (20)
- Cannot compile for visionOS app HOT 2
- update 5.3.0 in CocoaPods HOT 1
- Combine.Future extensions
- Additional combine publisher extensions to support combining 5 publishers
- Swift
- 字符串转时间的方法在12小时制出问题
- UIView Extension `addGradient(colors: locations: direction:)` HOT 2
- Add support of visionOS HOT 1
- Overload String `~=`
- Cannot build `FutureExtensionsTests` in Xcode 15.1 HOT 3
- Add `removeBlur()` in UIImageViewExtensions HOT 1
- Measurement +=, -=, *=, /= HOT 2
- func XCTAssertEqualAsync HOT 3
- Add Privacy Manifest HOT 1
- UIView GradientDirection is not public HOT 1
- 'Int' and 'String' cannot be multiplied HOT 1
- NSStackView.addArrangedSubviews and NSStackView.removeArrangedSubviews
- ITMS-91053
- ال
- appendingQueryParameters incomplete HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swifterswift.