Bird
Raised Fist0
iOS Swiftmobile~20 mins

App review guidelines in iOS Swift - Mini App: Build & Ship

Choose your learning style10 modes available
Build: App Review Guidelines
This screen shows a list of important app review guidelines for iOS developers. Users can scroll through the guidelines to understand what Apple expects before submitting an app.
Target UI
---------------------------------
| App Review Guidelines          |
|-------------------------------|
| 1. Follow Apple's content rules|
| 2. Ensure app stability        |
| 3. Use proper user interface   |
| 4. Respect user privacy        |
| 5. Provide accurate metadata   |
|                               |
| [Back]                       |
---------------------------------
Display a scrollable list of at least 5 app review guidelines as text items.
Use a navigation bar with the title 'App Review Guidelines'.
Add a Back button on the navigation bar that dismisses the screen.
Ensure the text is readable with good contrast and padding.
Support both light and dark mode automatically.
Starter Code
iOS Swift
import SwiftUI

struct AppReviewGuidelinesView: View {
    var body: some View {
        NavigationView {
            // TODO: Add scrollable list of guidelines here
            Text("Placeholder for guidelines list")
                .navigationTitle("App Review Guidelines")
                .navigationBarTitleDisplayMode(.inline)
                // TODO: Add Back button functionality
        }
    }
}

struct AppReviewGuidelinesView_Previews: PreviewProvider {
    static var previews: some View {
        AppReviewGuidelinesView()
    }
}
Task 1
Task 2
Task 3
Task 4
Solution
iOS Swift
import SwiftUI

struct AppReviewGuidelinesView: View {
    @Environment(\.presentationMode) var presentationMode

    let guidelines = [
        "1. Follow Apple's content rules",
        "2. Ensure app stability",
        "3. Use proper user interface",
        "4. Respect user privacy",
        "5. Provide accurate metadata"
    ]

    var body: some View {
        NavigationView {
            ScrollView {
                VStack(alignment: .leading, spacing: 16) {
                    ForEach(guidelines, id: \.self) { guideline in
                        Text(guideline)
                            .font(.body)
                            .foregroundColor(Color.primary)
                    }
                }
                .padding()
            }
            .navigationTitle("App Review Guidelines")
            .navigationBarTitleDisplayMode(.inline)
            .toolbar {
                ToolbarItem(placement: .navigationBarLeading) {
                    Button(action: {
                        presentationMode.wrappedValue.dismiss()
                    }) {
                        Text("Back")
                    }
                    .accessibilityLabel("Back button")
                }
            }
        }
    }
}

struct AppReviewGuidelinesView_Previews: PreviewProvider {
    static var previews: some View {
        Group {
            AppReviewGuidelinesView()
                .preferredColorScheme(.light)
            AppReviewGuidelinesView()
                .preferredColorScheme(.dark)
        }
    }
}

This screen uses a NavigationView to provide a navigation bar with the title and a Back button. The guidelines are shown inside a ScrollView with a vertical stack (VStack) of text items. Padding and spacing make the text easy to read. The Back button uses the presentationMode environment variable to dismiss the view when tapped. Colors automatically adapt to light and dark mode by using Color.primary for text. Accessibility label is added for the Back button for screen readers.

Final Result
Completed Screen
---------------------------------
| App Review Guidelines          |
|-------------------------------|
| 1. Follow Apple's content rules|
|                               |
| 2. Ensure app stability        |
|                               |
| 3. Use proper user interface   |
|                               |
| 4. Respect user privacy        |
|                               |
| 5. Provide accurate metadata   |
|                               |
| [Back]                       |
---------------------------------
User can scroll vertically to read all guidelines if screen is small.
Tapping the Back button closes the guidelines screen and returns to the previous screen.
Stretch Goal
Add a search bar at the top to filter the guidelines by keywords.
💡 Hint
Use a @State variable to hold the search text and filter the guidelines array dynamically in the view.

Practice

(1/5)
1. Which of the following is a key reason for following App Store review guidelines?
easy
A. To ensure apps are safe and user-friendly
B. To make apps run faster on all devices
C. To increase app download size
D. To allow apps to bypass security checks

Solution

  1. Step 1: Understand the purpose of review guidelines

    App Store guidelines exist to keep apps safe and user-friendly for everyone.
  2. Step 2: Evaluate each option

    Only To ensure apps are safe and user-friendly matches the purpose; others are unrelated or incorrect.
  3. Final Answer:

    To ensure apps are safe and user-friendly -> Option A
  4. Quick Check:

    App safety and usability = D [OK]
Hint: Think about why Apple reviews apps before approval [OK]
Common Mistakes:
  • Confusing performance with safety
  • Assuming guidelines increase app size
  • Believing guidelines allow security bypass
2. Which Swift code snippet correctly requests user permission for location access following App Store guidelines?
easy
A. CLLocationManager().startUpdatingLocation()
B. CLLocationManager().stopUpdatingLocation()
C. CLLocationManager().requestAlwaysAuthorization() without Info.plist key
D. CLLocationManager().requestWhenInUseAuthorization()

Solution

  1. Step 1: Identify correct permission request method

    requestWhenInUseAuthorization() properly asks user permission as per guidelines.
  2. Step 2: Check for Info.plist compliance

    CLLocationManager().requestAlwaysAuthorization() without Info.plist key misses required Info.plist key, violating guidelines.
  3. Final Answer:

    CLLocationManager().requestWhenInUseAuthorization() -> Option D
  4. Quick Check:

    Proper permission request = B [OK]
Hint: Permission requests must match Info.plist keys [OK]
Common Mistakes:
  • Starting location updates before permission
  • Requesting authorization without plist keys
  • Stopping updates instead of requesting permission
3. What will happen if your app uses private APIs not allowed by App Store guidelines?
medium
A. App will be rejected during review
B. App will run faster on devices
C. App will automatically update permissions
D. App will be featured on the App Store

Solution

  1. Step 1: Understand private API usage rules

    Using private APIs is against guidelines and causes rejection.
  2. Step 2: Evaluate consequences of private API use

    Only rejection fits; other options are unrelated or false.
  3. Final Answer:

    App will be rejected during review -> Option A
  4. Quick Check:

    Private API use = A [OK]
Hint: Private APIs cause rejection, not benefits [OK]
Common Mistakes:
  • Thinking private APIs improve app speed
  • Assuming automatic permission updates
  • Believing private APIs lead to featuring
4. You submitted an app that crashes on launch during review. What is the most likely cause based on App Store guidelines?
medium
A. Not requesting user permission for notifications
B. Using too many images in the app bundle
C. Missing required launch storyboard or incorrect Info.plist setup
D. Having a large app icon size

Solution

  1. Step 1: Identify common crash causes on launch

    Missing launch storyboard or wrong Info.plist keys cause immediate crashes.
  2. Step 2: Check other options for crash relevance

    Options B, C, D do not cause launch crashes.
  3. Final Answer:

    Missing required launch storyboard or incorrect Info.plist setup -> Option C
  4. Quick Check:

    Launch crash cause = A [OK]
Hint: Check launch storyboard and Info.plist first for crashes [OK]
Common Mistakes:
  • Blaming image count for crashes
  • Ignoring launch storyboard setup
  • Confusing permission requests with crashes
5. Your app collects user data. According to App Store guidelines, what must you do before submitting?
hard
A. Only mention data collection in app description
B. Provide a clear privacy policy and request user consent
C. Collect data silently without informing users
D. Encrypt data but skip user consent

Solution

  1. Step 1: Understand data collection rules

    Guidelines require clear privacy policy and user consent before data collection.
  2. Step 2: Evaluate options for compliance

    Only Provide a clear privacy policy and request user consent meets these requirements; others violate guidelines.
  3. Final Answer:

    Provide a clear privacy policy and request user consent -> Option B
  4. Quick Check:

    Privacy policy + consent = C [OK]
Hint: Always include privacy policy and ask consent [OK]
Common Mistakes:
  • Collecting data without user knowledge
  • Hiding data use only in description
  • Skipping consent even if data is encrypted
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard