Hi, community:
Today a Swift question came up to me.
Is a closure enum associated value considered to be an escaping closure?
an example:
enum Operation {
case opA(()-> Void)
case opB(()-> Void)
}
Thanks in advance
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
I made a workflow in Xcode Cloud, and for months it worked okay, but today it has jobs with actions queued for hours.
Is that expected? I mean the status page said that all works as expected. I didn't find other posts related to it.
Thanks in advance
Hi community:
I get an error using inflection on strings when the language is Spanish.
Issue: [Inflection] Cannot use Morphun, (Checking that the token is the correct type): (null)
The code:
let value = "5 dias"
var string = AttributedString(localized: "El primer \(value) es gratis")
var morphology = Morphology()
morphology.number = .plural
string.inflect = InflectionRule(morphology: morphology)
let result = string.inflected()
Any workaround to solve it?
Hi:
I wanted to use a redeem code for an app available on MacOS and iOS, from the Mac appstore, but an error is shown.
Is this a bug?
Can we provide codes to redeem for our Mac users?
Thanks in advance
Is there any way to show the status bar on a SwiftUI Preview?.
Right now I'm using Xcode 14.2.0
Thanks in advance.
Hi community:
I'm getting an error when I try to distribute Mac Catalyst app through AppStore. This not happened with Ventura 13.3 RC(yesterday in Xcode cloud), same Xcode version (14.2)
I'm thinking that maybe is problem related to Xcode cloud (because in local works fine same archive but signed and uploaded from local), but I don't know
NSLocalizedRecoverySuggestion=Multiple binaries share the same codesign path
...
Binaries:
/Applications/exampleApp.app/Contents/Frameworks/NewFramework.framework/NewFramework
/Applications/exampleApp.app/Contents/Frameworks/NewFramework.framework/Versions/Current/NewFramework
This can happen if your build process copies frameworks by following symlinks. }
Anyone came across with that and resolve it?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
macOS
App Store Connect
Mac Catalyst
Xcode Cloud
Hi:
I'm wondering why dragging and dropping an APNs file to the simulator worked as expected and, now with Xcode 14.3 it doesn't.
I mean the object userInfo:
let notification: UNNotification ....
let userInfo = notification.request.content.userInfo
Now contains all the JSON, and before only the user Info.
The APNS file is this:
{
"aps":{
"alert":{
"title":"Title",
"body":"BODY",
},
"badge":0,
"key1":"valu1",
"category": "category"
},
"Simulator Target Bundle":"com.app.bundle"
}
What I get now is:
(lldb) po userInfo
▿ 2 elements
▿ 0 : 2 elements
▿ key : AnyHashable("aps")
- value : "aps"
▿ value : 4 elements
▿ 0 : 2 elements
- key : category
- value : category
▿ 1 : 2 elements
- key : alert
▿ value : 2 elements
▿ 0 : 2 elements
- key : title
- value : Title
▿ 1 : 2 elements
- key : body
- value : BODY
▿ 2 : 2 elements
- key : badge
- value : 0
▿ 3 : 2 elements
- key : key1
- value : valu1
▿ 1 : 2 elements
▿ key : AnyHashable("Simulator Target Bundle")
- value : "Simulator Target Bundle"
- value : com.app.bundle
What I should get
▿ 2 elements
▿ 0 : 2 elements
▿ key : AnyHashable("key1")
- value : "key1"
- value : valu1
Maybe it is something related to the last change on pushes @eskimo? I mean, now web pushes are allowed.
Thanks in advance
Hi community:
I'm coming across two error types on Xcode cloud during ui tests.
encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal kill before starting test execution. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/resultbundlexcresult))
encountered an error (Failed to prepare device 'Clone 7 of iPhone 14 Pro' for impending launch. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/ resultbundle.xcresult. (Underlying Error: Unable to boot the Simulator. launch failed to respond. (Underlying Error: Failed to start launch_ sim: could not bind to session, launchd_sim may have crashed or quit responding)))
Any ideas on how to solve them?
Thanks
Hi community:
Thanks for readme. I want to achieve get an adverb of frequency from a time interval or date component. So if I have something that measure one week, I want to get "weekly" as result, the same for 2 weeks "bi-weekly", month "monthly" and so on.
Is there any foundation API to get it?
Thanks in advance
Hi community
I tried to get the feminine of "one" in spanish but when I tried, in Spanish the result is "uno" instead of "una".
Any ideas?
let attributedString = AttributedString(localized: "uno")
attributedString.languageIdentifier = "es"
var morphology = Morphology()
morphology.grammaticalGender = .feminine
attributedString.morphology = morphology
attributedString.inflect = .explicit(morphology)
print(String(attributedString.inflected().characters)) // uno
Thanks in advance
Hi community:
I'm trying to discover how the dnssec api works, but I cannot get a sample that works with it.
Maybe I'm wrong with the requirements; if it is please, clarify it to me.
So what I understood.
All DNS zones (which respond to TLS listed here https://manage.whois.com/kb/answer/2998) have a way to say, hey I'm who I am.
So without any extra configuration, we can use the new API.
Is that right?
So the code that I did, see the next code
let urlSession = URLSession.init(configuration: .ephemeral)
if #available(iOS 16.0, *) {
urlSession.configuration.requiresDNSSECValidation = true
}
var request = URLRequest(url: URL(string: "https://www.apple.com")!)
if #available(iOS 16.1, *) {
request.requiresDNSSECValidation = true
}
cancellable = urlSession
.dataTaskPublisher(for: request)
.retryWithDelay(retries: 2, delay: 2, scheduler: DispatchQueue.global(qos: .background))
.sink(receiveCompletion: { result in
if case let .failure(error) = result {
print("Error \(error)")
}
}, receiveValue: { (data: Data, response: URLResponse) in
print("It Works")
Result:
Task finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001, UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x600003d86130 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <040AB9E7-EFCB-4072-8357-E0149769BB9D>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(```
"LocalDataTask <040AB9E7-EFCB-4072-8357-E0149769BB9D>.<2>"
), NSErrorFailingURLStringKey=https://apple.com/, NSErrorFailingURLKey=https://apple.com/, _kCFStreamErrorDomainKey=4}
The DNS I'm using is 8.8.8.8. Do you know any other DNS server that supports DNSSEC?
If I remove requiresDNSSECValidation from request it works.
Also, it's curious that even failing the receiveCompletion is never called. But if I use the dataTask` with completion it's called with the error.
Thanks for the clarifications.
Hi:
Is there anyway to set a specific PrivacyContext to a concrete (no shared) URLSession?
Thanks in advance
Hi community.
I was looking for a way to make word segmentation of a string without delimiters and spaces. Apple's Natural language framework does not provide this (I think is strange).
I want to achieve something like this:
Input: "makesenseofthis"
Output: ["make", "sense", "of", "this"]
Any third party to do it? Maybe is there any Apple API?
Thanks in advance
Hi
I want to use the new iOS 16 Screen time API to show a block page over Safari and Chrome when the user enters an "adult-content" page like a gun store, allowing it to continue searching on the internet if the user wants.
Any tips on how to do this?
Thanks in advance
Hi:
Is there any way to know if the user has screen time enabled?
Thanks in advance