Swift Student Challenge

RSS for tag

Ask questions and connect with other challenge applicants.

Posts under Swift Student Challenge tag

98 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Swift playgrounds and display orientation swift student challenge submission
I was developing my app on Xcode and I saw in requirements it says “your submission must be an app playground (.swiftpm) I reckon I can develop in Xcode and then copy those files in playgrounds app, make some changes, for it to work. also I made my project in landscape mode in Xcode, in playgrounds can I lock display orientation through package.swift file or I should continue making me app in landscape mode and ask players to change their viewing orientation via a popup?
2
1
297
Feb ’25
How will my app be tested in the Swift Student Challenge?
Hello, I’m developing my project for the Swift Student Challenge and I have some questions about the platform it will be tested on. If I create an iOS app that uses ARKit, for example, will it be evaluated on a real iPhone or only in a simulator on a Mac? I ask this because some functionalities, such as camera-based augmented reality, don’t work properly in the simulator. I’d like to better understand the guidelines to ensure my project functions correctly during the evaluation. Thank you!
3
1
524
Feb ’25
Does My Swift Student Challenge App Need to Be Fully Functional?
Hi everyone, I'm working on my submission for the Swift Student Challenge and wanted to clarify something—does the application need to be fully functional in every aspect to be eligible for submission? Or is it acceptable if some features aren't fully implemented, as long as the overall experience showcases my coding skills and creativity? Would appreciate any insights from past participants or anyone familiar with the guidelines! Thanks!
1
0
501
Jan ’25
Lock Orientation and Disable Multitasking/Slide Over
Hello! I have a quick question about locking orientation and disabling Multitasking/Slide Over in a .swiftpm for the Swift Student Challenge. A .swiftpm file contains a Package.swift file. At the top of this file, there is a very scary warning that directs you to not edit it. However, being unable to edit this means that I cannot lock the orientation of an iPad and disable Multitasking/Slide Over. I have read that it does not break your project if you ignore the warning and I tried it out for myself — editing the file does indeed lock orientation and disable Multitasking/Slide Over! Although, as you can imagine, this is quite nerve-wracking. What are the actual technical implications of doing this? Are participants allowed to do this? If this does not seem like a good idea, would judges follow through with a note that tells them to simply not use certain orientations and Multitasking/Slide Over? (Yeah, I know… not an ideal thing but if there’s anyone to understand it would be Apple employees). I am faced with two uncertain options: ignore a warning and get what I need or follow the warning but then have a very poorly designed experience (some apps just aren’t meant for portrait and Multitasking/Slide Over, even if this is not a full app). I definitely don’t want hundreds of hours of work to go down the drain or risk rejection because of some type of problem with this, that’s for sure. Perhaps a “hack” would work if I were creating an actual app, but the stakes become higher when it is for this challenge. Thanks! :)
1
0
343
Feb ’25
Swift Student Challenge Playgrounds app in 3 min
I intend to participate in the Swift Student Challenge 25. I see Rules, It is mentioned that Playgrounds works should be a work that can be experienced in three minutes. However, my work does not meet this requirement. Create an interactive scene in an app playground that can be experienced within three minutes. Initially, my work was not intended for the Challenge but for the App Store. However, I decided to submit it to the Challenge, and my work and I met the requirements of the Challenge. Therefore, my work is a complete application, which makes it impossible for the judges to experience it within three minutes. It may take more time. Does this have any impact?
2
0
479
Jan ’25
Am I allowed to use Speech framework on Swift Student Challenge?
Hello! I would like to use Speech Framework on my App Playground for this year challenge. But I still can't understand if I am allowed to use it to respect the rule of "not rely on a network connection". That's why: Speech framework can use on-device Speech recognition – No internet connection needed ✅. But it can ask to download an Apple's native language package to use it for this on-device recognition – To get this, you need to be connected to the Internet ❌. When I try to add a Speech Recognition Capabilities on my App Playground, its' description says: "Required to perform speech recognition using Apple's servers." (screenshot is attached). Does it mean that I won't be able to use on-device recognition on my App Playground? – And therefore, only online-version of this framework is available and I can't use it to participate on the challenge successfully❓. If it's possible, could you please make it clearer? This framework is crucial for my App Playground and I really need this to make it work. Thanks for your help in advance! And a have a good day!
1
0
366
Jan ’25
SwiftData Relationship Delete Not Working (SwiftData/PersistentModel.swift:359)
SwiftData delete isn't working, when I attempt to delete a model, my app crashes and I get the following error: SwiftData/PersistentModel.swift:359: Fatal error: Cannot remove My_App.Model2 from relationship Relationship - name: model2, options: [], valueType: Model2, destination: Model2, inverseName: models3, inverseKeypath: Optional(\Model2.models3) on My_App.Model3 because an appropriate default value is not configured. I get that it's saying I don't have a default value, but why do I need one? Isn't @Relationship .cascade automatically deleting the associated models? And onto of that, why is the error occurring within the do block, shouldn't it be caught by the catch, and printed? I have put together a sample project below. import SwiftUI import SwiftData @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() .modelContainer(for: Model3.self) } } } @Model class Model1 { var name: String @Relationship(deleteRule: .cascade, inverse: \Model2.model1) var models2: [Model2] = [] init(name: String) { self.name = name } } @Model class Model2 { var name: String var model1: Model1 @Relationship(deleteRule: .cascade, inverse: \Model3.model2) var models3: [Model3] = [] init(name: String, model1: Model1) { self.name = name self.model1 = model1 } } @Model class Model3 { var name: String var model2: Model2 init(name: String, model2: Model2) { self.name = name self.model2 = model2 } } struct ContentView: View { @Query var models1: [Model1] @Environment(\.modelContext) var modelContext var body: some View { NavigationStack { List(models1) { model1 in Text(model1.name) .swipeActions { Button("Delete", systemImage: "trash", role: .destructive) { modelContext.delete(model1) do { try modelContext.save() //SwiftData/PersistentModel.swift:359: Fatal error: Cannot remove My_App.Model2 from relationship Relationship - name: model2, options: [], valueType: Model2, destination: Model2, inverseName: models3, inverseKeypath: Optional(\Model2.models3) on My_App.Model3 because an appropriate default value is not configured. } catch { print(error.localizedDescription) } } } } .toolbar { Button("Insert", systemImage: "plus") { modelContext.insert(Model3(name: "model3", model2: Model2(name: "model2", model1: Model1(name: "model1")))) } } } } }
1
0
648
Jan ’25
Can I change iOS version in package.swift to use SwiftData?
For the swift student challenge I was hoping to use swift data, I found that since it's a playground app, in package.swift the defaults is set to iOS 16 which means you can't use swift data. I changed it to iOS 17 and everything works but I want to know if that goes against the rules in anyway, changing th bios version in package.swift? This was the code I changed in package.swift. let package = Package( name: "ProStepper", platforms: [ .iOS("17.0") ],
3
1
488
Jan ’25