Meet the Swift Algorithms and Collections packages

RSS for tag

Discuss the WWDC21 session Meet the Swift Algorithms and Collections packages.

View Session

Posts under wwdc21-10256 tag

18 Posts
Sort by:
Post not yet marked as solved
0 Replies
548 Views
Hi Team, We are seeing a strange issue on the iPad device with iOS v14.6 where our backend API is not getting invoked. We have verified the same API calling code on multiple iPhone devices & simulators with different iOS versions ranging from v13.0-v14.6 and on iPad simulators with iOS versions ranging from v14.0-v14.5. It seems to be working fine on all except the real iPad device with v14.6. Any help in these is really appreciated.
Posted
by
Post not yet marked as solved
0 Replies
518 Views
Hi, I am working on converting base 64 file format to zip file some of the zip files are getting converted successfully but some of them are not converting. Stetps: Getting base64 format from server. Converting into NSData.  NSData *dataEncoded = [[NSData alloc] initWithBase64EncodedString:output.base64Content options:0]; Writing this file into local memory and then accessing it. I am able to access some zip file like this way but some are getting corrupted. Please help me on this!
Post not yet marked as solved
2 Replies
1.9k Views
I have an M1 MacBook Air! I tried installing 'keras' and 'tensorflow' packages in Rstudio. However I got an error. Then, I tried creating a virtual env to work in it and my script did run for a couple of hours but then it's again back to the same error: Error in py_initialize(config$python, config$libpython, config$pythonhome, : /Users/mansichandra/mambaforge/envs/walnut/lib/libpython3.8.dylib - dlopen(/Users/mansichandra/mambaforge/envs/walnut/lib/libpython3.8.dylib, 10): no suitable image found. Did find: /Users/mansichandra/mambaforge/envs/walnut/lib/libpython3.8.dylib: mach-o, but wrong architecture /Users/mansichandra/mambaforge/envs/walnut/lib/libpython3.8.dylib: mach-o, but wrong architecture How can this be resolved because I'm pretty sure it's an architecture problem!!
Posted
by
Post not yet marked as solved
0 Replies
268 Views
I am trying to get a picked image and put it into my core data record... something like .sheet(isPresented: $isShowPicker,content: imagePickerSave(image: $image)       projectVM.projectImage = image! but something like this seems better but doesnt compile     imagePickerSave(image: $projectVM.projectImage) where projectVM is my coredata record So how do I assign the imagepicker value in the view to a projectimage field in the coredata record? I am using MVVM, what approach should i using please? Mark
Posted
by
Post not yet marked as solved
1 Replies
388 Views
My colleague's phone is the iPhone 12, just upgraded to iOS 15, the app icon does not show. But other colleagues' cell phones are good, how to solve this problem?
Posted
by
Post not yet marked as solved
0 Replies
262 Views
How do I change the button background color when the button is highlighted with swift,then I also want to know . How can I make this background color last for a period of time instead of clicking it to disappear immediately? For example, I want it to disappear 2 seconds after clicking. I checked some information and couldn't find a way. All I can think of is to write a click event, then change the background color of the button and set a time to change it back
Posted
by
Post not yet marked as solved
0 Replies
263 Views
I am attempting to parse data received from my server. The data is defined by the struct PlayerList (A), and includes 3 arrays, one being the list of Player's ( B ), and the others, String's. When I try to parse the main Struct (PlayerList), I get the error, "typeMismatch(Swift.Array,Swift.DecodingError.Context(codingPath:..." when calling JSONDecoder().decode() (C). If I change the data to just be the array of Players, the main struct has no array fields, and JSON.decode() works just fine. An article I read suggested making that top level struct a 1 element array, which I did, but it didn't help. Suggestions are most welcome.
Posted
by
Post not yet marked as solved
1 Replies
220 Views
I'm building an app using SwiftUI, and am perplexed at why it seems so difficult to simply play an audio file that is in my assets. One would think it possible to write some code like: play(sound: "(name).m4a") but this seems unsupported. You must write elaborate, verbose code. Anyone comment on why it doesn't 'just work'? I understand that much more complex audio code requires more, but it seems that simply playing a file could be supported.
Posted
by
Post not yet marked as solved
3 Replies
268 Views
Hello, I've been attempting to generate this code, but the last line returns an Expected declaration Error. class AboutMe { let firstName: String let lastName: String let age: Int init(firstName: String, lastName: String, age: Int){ self.firstName = firstName self.lastName = lastName self.age = age } var me: String { return "First Name: \(firstName), / Last Name: \(lastName), / Age: \(age)" } let myInfo = AboutMe(firstName: "NAME", lastName: "NAME", age: 10) print(myInfo) }
Posted
by
Post not yet marked as solved
0 Replies
131 Views
when my app asks for motion and fitness permission to the user and the user denied that. If they go to setting and turn on that setting then my app forcefully restarts again. my question is why app restart again when we change motion and fitness settings?
Posted
by
Post not yet marked as solved
1 Replies
131 Views
Hi everyone, I really need help right now and feel really stuck. I created an app using Swift Playground on my ipad since i dont have a Mac. App store connect requires me to submit a build but i couldn'd find any way to do that without Xcode, altool or transporter, which are all apps for the MAC. One alternative I thought of was that I could find someone who has a MAC and use xcode to create a build. However, I am unsure whether the Swift app can be opened on xcode and if yes how to do it.
Posted
by