Swift Student Challenge

RSS for tag

Ask questions and connect with other challenge applicants.

Swift Student Challenge Documentation

Posts under Swift Student Challenge tag

116 Posts
Sort by:
Post not yet marked as solved
2 Replies
382 Views
Hi, I have the following predicate used in a SwiftData Query: #Predicate<Item> { searchText.isEmpty || $0.myarray.contains(where: { $0.text.localizedStandardContains(searchText) }) }) Even though this compiles, I get the unsupportedKeyPath error in the logs: Query encountered an error: SwiftData.SwiftDataError(_error: SwiftData.SwiftDataError._Error.unsupportedKeyPath) I thought I could use .contains(where:) inside predicates, but this doesn't work. What could be the problem? Item.myarray is an array of a Codable struct type, and searchText is a String.
Posted
by CMDdev.
Last updated
.
Post marked as solved
4 Replies
871 Views
Hi! I just read the updated terms and conditions, and I have a question regarding the submission requirements: Your app playground must be fully functioning, and be built with and run on Swift Playgrounds 4.4 on iPadOS 16 or macOS 13.5 or Xcode 15 on macOS 13.5 or later. You may incorporate the use of Apple Pencil. This means that the app can be built on iPadOS 17 / macOS 14 as well (and perhaps add some features specific to iPadOS 17 / macOS 14 or later using features such as SwiftData?) but does the app need to be fully compatible with earlier versions as well? I think this means it should be compatible with all versions from iPadOS 16 / macOS 13.5 onwards?
Posted
by CMDdev.
Last updated
.
Post not yet marked as solved
1 Replies
388 Views
Hello! For my Swift Student Challenge 2024 Project I'm using some Illustrations from OpenDoodles (opendoodles.com). Open doodles is free for commercial and personal use and the creator has no copyright claimed. My question is whether I have to clarify the use of these Illustration when submitting the project.
Posted
by Tiharz.
Last updated
.
Post not yet marked as solved
3 Replies
373 Views
My app looks the best when it's run on an iPhone simulator, since that is what I was targeting from the start. I’m aware that an Xcode app playground submission will be run on MacOS in the Simulator only, but is there a way for me to limit/ask the Simulator to only use the iPhone? I'm seeing a few posts on this forum giving the impression that submissions will primarily be run on either the iPad, or Swift Playgrounds on Mac. Furthermore, my app depends a lot on some of the new iOS 17 features (SwiftData, @Observable macros, etc.) I followed this thread to modify my Package.swift file to target iOS 17 and above only. Is this still a good idea, or should I instead wrap the whole app in a if #available version check?
Posted
by mason-c.
Last updated
.
Post not yet marked as solved
4 Replies
315 Views
Hey everyone, I'm making a Playground targeting specifically iPadOS. I've read the Terms and Conditions and it says it will be run on iPad OS 16 and newer. Does anyone know if this means 16.6 or truly 16.0? I have a view modifier which is only supported in 16.4 in later.
Posted
by GavinR.
Last updated
.
Post not yet marked as solved
2 Replies
401 Views
I'm looking through all the latest posts to clarify a doubt I have, I noticed @eskimo's response claiming that the app must be built and run on iPadOS 16 or later. So I suppose it's okay to create an app that has SwiftData as the framework even if that dictates that the app will run on iOS 17; Also because when you create a new project in Swift Playgrounds 4.4.1 (latest version available at the moment) the target is set to iOS 17.2 automatically and technically you can't edit Package.swift file manually. Thanks in advance ❤️
Posted
by aboutzeph.
Last updated
.
Post not yet marked as solved
1 Replies
364 Views
Hey, everyone! I've been testing my .swiftpm app on an iPhone. If you're wondering about how I made the connections, I used a cable plugged into my Mac so that Xcode could communicate with the phone. Do you think that evaluators of the app will be alright with this method of testing it out as well? I'm particularly leaning towards the iPhone platform because my app requires a pedometer. Thanks! Ethan
Posted Last updated
.
Post marked as solved
1 Replies
252 Views
Hi, I am a Japanese student entering the swift student challenge this year. Will Apple be able to recognize my ID card, which is in JAPANESE, as a proof of my enrollment? The submission page states that To verify your student status, provide a PDF, PNG, or JPEG of your class schedule, other proof of enrollment, or proof of graduation within the past 6 months. Make sure the documentation clearly shows: Your name, The organization or school name, and The dates showing that it’s valid. In my ID. card, my name is written in Japanese , but other texts have subtitles in English, such as "Date of Birth" written under the Japanese. It also does not say the name of the school in English, only Japanese.
Posted
by Pokka.
Last updated
.
Post not yet marked as solved
1 Replies
228 Views
I'm creating a playground for SSC, and I'm using a lot of the new frameworks and capablities introduced in WWDC 2023, including @Observation, SwiftData, phaseAnimator...etc. Checking the forums just now, I see some people claiming the app should run on iOS 16 as well, so I revert the deployment destination from iOS 17 to iOS 16 in Package.swift, and now I have 150+ errors in my app playground. I know I can use #if available to write alternative code for earlier iOS versions but it feels like a redundancy since the app will be judged by Apple engineers who most likely have iOS 17 running on their devices, and since the judging process, I assume, takes into account the number of new technologies utilised. Should I write '#if available else' statements for the entire app playground, keep the deployment destination as iOS 17, or change the technologies used to iOS 16 or earlier (@observed object, CoreData...etc)? Which option is safer given that I only have less than 5 days left?
Posted Last updated
.
Post not yet marked as solved
1 Replies
343 Views
Hi everyone! I'm working on an app to submit to the Swift Student Challenge this year and wanted to get some feedback on my plan to use MapKit. I know Apple is pretty open to using any of their frameworks for the contest. But I wanted to see if anyone had insights on whether my use of MapKit would comply with the contest rules and eligibility criteria. Any thoughts or advice you have on properly leveraging MapKit for my submission would be much appreciated! I want to make sure I avoid any issues since this framework is so integral to my app idea. Let me know if you have built a map-based app for Swift Student Challenge before as well. Thanks!
Posted Last updated
.
Post not yet marked as solved
0 Replies
367 Views
Im making an app that uses drag&amp;drop but, it doesn't work. This is made with Swift Playground. If you can find a solution, please let me know. Here is the code. //MARK: Drop Area @ViewBuilder func DropAera()-&gt;some View{ VStack(spacing: 12){ ForEach($rows,id:\.self){$row in HStack(spacing: 10){ ForEach($row){$item in Text(item.value) .font(.system(size: item.fontSize)) .padding(.vertical,5) .padding(.horizontal,item.padding) .opacity(item.isShowing ? 1 : 0) .background{ RoundedRectangle(cornerRadius: 6, style: .continuous) .fill(item.isShowing ? .clear : .gray.opacity(0.25)) } .background{ // If Item is Dropped into Correct Plase RoundedRectangle(cornerRadius: 6, style: .continuous) .stroke(.gray) .opacity(item.isShowing ? 1 : 0) } // MARK: Adding Drop Operation // MARK: Adding Drag Drop Operation .onDrop(of: [.url], isTargeted: .constant(false)) { providers in if let first = providers.first{ let _ = first.loadObject(ofClass: URL.self) { value,error in guard let url = value else{return} if item.id == "\(url)"{ droppedCount += 1 let progress = (droppedCount / CGFloat(characters.count)) withAnimation{ item.isShowing = true updateShuffledArray(character: item) self.progress = progress } } else{ //Animating When Wrong text animateView() } } } return false } } } if rows.last != row{ Divider() } } } } @ViewBuilder func DragArea()-&gt;some View{ VStack(spacing: 12){ ForEach(shuffledRows,id: \.self){row in HStack(spacing: 10){ ForEach(row){item in Text(item.value) .font(.system(size: item.fontSize)) .padding(.vertical,5) .padding(.horizontal,item.padding) .background{ RoundedRectangle(cornerRadius: 6, style: .continuous) .stroke(.gray) } // MARK: Adding Drag Drop Operation .onDrag{ // Returning ID to find whitch Item is Moving return .init(contentsOf: URL(string: item.id))! } .opacity(item.isShowing ? 0 : 1) .background{ RoundedRectangle(cornerRadius: 6, style: .continuous) .fill(item.isShowing ? .gray.opacity(0.25) : .clear) } } } if shuffledRows.last != row{ Divider() } } } }
Posted
by Kazaki.
Last updated
.
Post not yet marked as solved
2 Replies
454 Views
Hi Developers, How do I pass a Reality Kit file to use the Reality Kit file for the AR experience: import SwiftUI import RealityKit struct HelpAR : View { var body: some View { ARViewContainer().edgesIgnoringSafeArea(.all) } } struct ARViewContainer: UIViewRepresentable { func makeUIView(context: Context) -> ARView { let arView = ARView(frame: .zero) // Create a cube model let mesh = MeshResource.generateBox(size: 0.1, cornerRadius: 0.005) let material = SimpleMaterial(color: .gray, roughness: 0.15, isMetallic: true) let model = ModelEntity(mesh: mesh, materials: [material]) model.transform.translation.y = 0.05 // Create horizontal plane anchor for the content let anchor = AnchorEntity(.plane(.horizontal, classification: .any, minimumBounds: SIMD2<Float>(0.2, 0.2))) anchor.children.append(model) // Add the horizontal plane anchor to the scene arView.scene.anchors.append(anchor) return arView } func updateUIView(_ uiView: ARView, context: Context) {} } #Preview { HelpAR() }
Posted Last updated
.
Post not yet marked as solved
7 Replies
819 Views
Hi Developers, I want to create a Vision app on Swift Playgrounds on iPad. However, Vision does not properly function on Swift Playgrounds on iPad or Xcode Playgrounds. The Vision code only works on a normal Xcode Project. SO can I submit my Swift Student Challenge 2024 Application as a normal Xcode Project rather than Xcode Playgrounds or Swift Playgrounds File. Thanks :)
Posted Last updated
.