Education

RSS for tag

Teach students of all ages to code in Swift using a variety of resources in your curriculum.

Education Documentation

Posts under Education tag

34 Posts
Sort by:
Post not yet marked as solved
0 Replies
315 Views
There are many nice changes here in recent years. Is there a document or page that outlines and explains the changes to the Developer portal that resulted in the excellent Document Archive no longer being maintained? https://developer.apple.com/library/archive/navigation/# Is there currently a reliable way to search for all of the newer sample code and documents within one list/view?
Posted
by
Post not yet marked as solved
0 Replies
300 Views
which are the commands to compile and execute C # in the terminal
Posted
by
Post not yet marked as solved
0 Replies
419 Views
I have a kids / education app in the store. My app is free with limited functionality and users need to buy in-app purchase option for upgrade. Recently I got some emails from school / institutions asking if they could get the upgrade version app via School Manager. It seems like it's impossible to buy in-app purchase in bulk via School Manager. (Please correct me if I'm wrong about this.) So I built and submitted a separate paid version of my app with "School Edition" added to the name and no in-app purchase. But this app got rejected with the following message. "This app duplicates the content and functionality of other apps submitted by you or another developer to the App Store, which is considered a form of spam." I replied that many other developers are doing the same approach and they are live on the app store. They gave me a short answer saying that they can't provide feedback on app concept and I need to review the guidelines. I know there have been many apps that had both Lite (free) and Pro (paid) version. And there are still many apps that have the same approach such as MathTango. MathTango https://apps.apple.com/us/app/mathtango/id1234698308 https://apps.apple.com/us/app/mathtango-school-edition/id1333842226 Is there anyone else who had the similar issue or who could give some advice on this?
Posted
by
Post not yet marked as solved
2 Replies
477 Views
// //  ContentView.swift //  NewsReader // //  Created by Rashid  Vohra on 7/7/21. // import SwiftUI struct Result: Codable {     var articles: [Article] } struct Article: Codable {     var url: String     var title: String     var description: String?     var urlToImage: String? } struct ContentView: View {     private let url = "https://newsapi.org/v2/top-headlines?country=us&category=business&apiKey=49d5bfa113c34ec0af781fab38395996"               @State private var articles = [ Article ()          func fetchData() {         guard let url = URL(string: url) else {             print("URL is not valid")             return         }                  let request = URLRequest(url: url)                  URLSession.shared.dataTask(with: request) {             data, response, error in             if let data = data {                 if let decodedResult = try?                     JSONDecoder().decode(                         Result.self, from: data) {                                          DispatchQueue.main.async {                                                self.articles =                             decodedResult.articles                     }                     return                 }             }             print ("Error: (error?.localizedDescription ?? "Unknown Error") ")         }.resume()     }          var body: some View {                           List(articles, id: .url) { item in             HStack(alignment: .top) {                                 VStack(alignment: .leading) {                     Text(item.title)                         .font(.headline)                     Text(item.description ?? "")                         .font(.footnote)                 }             }.onAppear(perform: fetchData)         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } }
Posted
by
Post not yet marked as solved
0 Replies
487 Views
I am using navigation link to navigate using a button which is log out button when i click the button it takes me straight to login page i want the transition effect of the page to start from right to left instead of the opposite which is occurring              NavigationLink("", destination: login(),isActive: $goWhenTrue)           Button (action: { print("Button Tapped")}, label: {               Text("LogOut")                 .font(.headline)                 .foregroundColor(.white)                 .frame(width: 340, height: 50)                 .background(Color.blue)                 .clipShape(Capsule())                 .padding()                 .onTapGesture {                                       self.goWhenTrue = true                   if ((UserDefaults.standard.string(forKey: "Username") != nil)) {                     UserDefaults.standard.removeObject(forKey: "Username")
Posted
by
Post not yet marked as solved
0 Replies
460 Views
I've been learning how to code swift with "Develop in Swift" by Apple, and it has been great! However, I have a problem, I made a function, and it gives me an error on lines 78, 80, and 121. Can someone explain my error? Thank you for your time. var barriers: [Shape] = [] let ball = OvalShape(width: 40, height:40) let barrierWidth = 300.0 let barrierHeight = 25.0 let barrierPoints = [     Point(x:0, y:0),     Point(x:0, y:barrierHeight),     Point(x:barrierWidth, y:barrierHeight),     Point(x:barrierWidth, y:0) ] let barrier = PolygonShape(points:barrierPoints) let funnelPoints = [     Point(x:0, y:50),     Point(x:80, y:50),     Point(x:60, y:0),     Point(x:20, y:0) ] let funnel = PolygonShape(points:funnelPoints) let targetPoints=[     Point(x:10, y:0),     Point(x:0, y:10),     Point(x:10, y:20),     Point(x:20, y:10) ] let target = PolygonShape(points:targetPoints) func setUpTarget(){     target.position = Point(x:200, y:400)     target.hasPhysics = true     target.isImmobile = true     target.isImpermeable = false     target.fillColor = .yellow     target.name = "Target"     //target.isDraggable = false          scene.add(target)      } /* The setup() function is called once when the app launches. Without it, your app won't compile. Use it to set up and start your app. You can create as many other functions as you want, and declare variables and constants, at the top level of the file (outside any function). You can't write any other kind of code, for example if statements and for loops, at the top level; they have to be written inside of a function. */ fileprivate func setUpBall() {     ball.position = Point(x: 250, y:400)     scene.add(ball)     ball.hasPhysics = true     ball.fillColor = .blue     ball.onCollision = ballCollided(with:)     ball.isDraggable = false     scene.trackShape(ball)     ball.onExitedScene = ballExitedScene     ball.onTapped = resetGame     ball.bounciness = 0.6 } fileprivate func addBarrier(at position: Point, width: Double, height: Double, angle: Double){     //Add a barrier to the scene.     let barrierPoints = [         Point:(x: 0, y: 0),         Point:(x: 0, y: height),         Point(x: width, y: height),         Point(x: width, y: 0)     ]     let barrier = PolygonShape(points:barrierPoints)     barrier.append(barrier)          barrier.position = Point(x:200, y:150)     barrier.hasPhysics = true     scene.add(barrier)     barrier.isImmobile = true     barrier.angle = 0.1 } fileprivate func setUpFunnel() {     //Adds a funnel to the scene     funnel.position = Point(x:200, y:scene.height - 25)     scene.add(funnel)     funnel.onTapped = dropBall     funnel.isDraggable = false } func ballCollided(with otherShape: Shape){     if otherShape.name != "Target"{return}          otherShape.fillColor = .green } func ballExitedScene (){     barrier.isDraggable = true } func resetGame (){     ball.position = Point(x:0, y:-80) } func printPosition(of shape: Shape){     print(shape.position) } func setup() {          setUpBall()          addBarrier()          setUpFunnel()          setUpTarget()          resetGame()          scene.onShapeMoved = printPosition(of:)           } func dropBall() {     ball.position = funnel.position     ball.stopAllMotion()     barrier.isDraggable = false }
Posted
by
Post marked as solved
1 Replies
402 Views
I'm having trouble coding this. I'm learning swift via develop with swift by Apple, and when I try to code this, it stop at "Please add a digit." Can someone explain what I'm doing wrong? Thanks! let tenMostCommonPasswords = [     "123456",     "password",     "12345678",     "qwerty",     "12345",     "123456789",     "letmein",     "1234567",     "football",     "iloveyou" ] let digits = "0123456789" let punctuation = "!@#$%^&*(),.<>;'`~[]{}\|/?_-+= " let password = "Pasword12!" for _ in tenMostCommonPasswords{    if tenMostCommonPasswords.contains(password){     print("Please change your password")    }    else{     for _ in digits{         if digits.contains(password){             for _ in punctuation{                 if punctuation.contains(password){                     print("You're good to go!")                 }                 else{                     print("Please add a punctuation")                 }             }         }         else{             print("Please add a digit.")         }     }    } }
Posted
by
Post not yet marked as solved
1 Replies
356 Views
How is better to learn and understand Swift?. Is the best way to study through apple sources or maybe there are some more?
Posted
by
Post not yet marked as solved
1 Replies
589 Views
I’m going through Develop in Swift Fundamentals and I’m stuck at a problem where it says “Learn about the map method, and use it in place of the loop that converts the array of characters to an array of strings in updateUI().” Here’s the code:  var letters = [String]() for letter in currentGame.formattedWord { letters.append(String(letter)) } Thanks in advance.
Posted
by
Post not yet marked as solved
2 Replies
5.9k Views
As you prepare your students for a future driven by technology, teaching them how to code is critical. It opens new doors to potential careers and helps prepare them for college. Starting this school year students can earn App Development with Swift certification through Certiport based on the free App Development with Swift course from Apple. Level 1 certification recognizes knowledge of the Swift programming language, app developer tools, and core components of apps, and can be offered by any Certiport Authorized Testing Center that has purchased access to it.* Students who pass the exam will earn a digital badge to showcase their achievement on a resume, portfolio, email signature, or career networking site.Learn more about App Development with Swift certification at Certiport.com &gt;*Additional terms may apply; see the Certiport website for more information.
Posted
by
Apple Staff
Post not yet marked as solved
7 Replies
6.6k Views
If you grossed over $20,000 (or 200 sales) in sales from Apple you will receive a 1099-K.There are 2 problems with this:1) This will NOT reflect the 30% that Apple has withheld.2) A 1099-K will only be sent for those regions that meet the criteria for Apple issuing a 1099-K. Thus, this won't reflect all of your sales. Note: this is an assumption as I had more sales then this 1099-K reflects. In my case, I only received a 1099-K for US sales (I assume as it doesn't say). As a result, the difference from what the 1099k is reporting and what I actually received is only 12%, not 30%. That is, for example, the 1099-K says that I had$20,000 in sales, but what was actually deposited in my account was $17,600.How did you guys/gals fortunate/unfortunate enough to receive a 1099-K report this on your taxes?Did you, for example, have:a) 1099-K income of $20,000 with a business expense of 30% = $14,000b) Addional non-reported income of ($17,600-$14,000) = $3600Total: $17,600 (amount actually received from Apple sales)-OR-a) 1099-K income of $20,000 with a business expense of 12% = $17,600Thanks for the help with this!
Posted
by
Post marked as solved
7 Replies
3.7k Views
I am sorry, I don't know if this is the correct place to ask this question.I know basics of iOS development(Swift). There are many experts in the community. I want to be an expert. I want to create, develop anything I want. Where can I learn? Please give me the resources or courses whatever helped you to be in this stage. Thanks a lot in advance.
Posted
by