apple developer

StoreKit and review guideline update

Starting today, because of a recent United States Court decision, App Store Review Guideline 3.1.1 has been updated to introduce the StoreKit Purchase Link Entitlement (US), which allows apps that offer in-app purchases in the iOS or iPadOS App Store o...
Apple

Hello Developer: January 2024

Welcome to Hello Developer. In this Apple Vision Pro-themed edition: Find out how to submit your visionOS apps to the App Store, learn how the team behind djay approached designing for the infinite canvas, and get technical answers straight from Apple ...
Apple

Q&A: Building apps for visionOS

Over the past few months, Apple experts have fielded questions about visionOS in Apple Vision Pro developer labs all over the world. Here are answers to some of the most frequent questions they’ve been asked, including insights on new concepts like entities, immersive spaces, collision shapes, and much more.How can I interact with an entity using gestures?There are three important pieces to enabling gesture-based entity interaction:

The entity must have an InputTargetComponent. Otherwise, it won’t receive gesture input at all.
The entity must have a CollisionComponent. The shapes of the collision component define the regions that gestures can actually hit, so make sure the collision shapes are specified appropriately for interaction with your entity.
The gesture that you’re using must be targeted to the entity you’re trying to interact with (or to any entity). For example:
private var tapGesture: some Gesture {
TapGesture()
.targetedToAnyEntity()
.onEnded { gestureValue in

let tappedEntity = gestureValue.entity

print(tappedEntity.name)
}
}It’s also a good idea to give an interactive entity a HoverEffectComponent, which enables the system to trigger a standard highlight effect when the user looks at the entity.Should I use a window group, an immersive space, or both?Consider the technical differences between windows, volumes, and immersive spaces when you decide which scene type to use for a particular feature in your app.
Here are some significant technical differences that you should factor into your decision:

Windows and volumes from other apps the user has open are hidden when an immersive space is open.
Windows and volumes clip content that exceeds their bounds.
Users have full control over the placement of windows and volumes. Apps have full control over the placement of content in an immersive space.
Volumes have a fixed size, windows are resizable.
ARKit only delivers data to your app if it has an open immersive space.

Explore the Hello World sample code to familiarize yourself with the behaviors of each scene type in visionOS.How can I visualize collision shapes in my scene?Use the Collision Shapes debug visualization in the Debug Visualizations menu, where you can find several other helpful debug visualizations as well. For information on debug visualizations, check out Diagnosing issues in the appearance of a running app.Can I position SwiftUI views within an immersive space?Yes! You can position SwiftUI views in an immersive space with the offset(x:y:) and offset(z:) methods. It’s important to remember that these offsets are specified in points, not meters. You can utilize PhysicalMetric to convert meters to points.What if I want to position my SwiftUI views relative to an entity in a reality view?Use the RealityView attachments API to create a SwiftUI view and make it accessible as a ViewAttachmentEntity. This entity can be positioned, oriented, and scaled just like any other entity.RealityView { content, attachments in

// Fetch the attachment entity using the unique identifier.
let attachmentEntity = attachments.entity(for: "uniqueID")!

// Add the attachment entity as RealityView content.
content.add(attachmentEntity)

} attachments: {
// Declare a view that attaches to an entity.
Attachment(id: "uniqueID") {
Text("My Attachment")
}
}Can I position windows programmatically?There’s no API available to position windows, but we’d love to know about your use case. Please file an enhancement request. For more information on this topic, check out Positioning and sizing windows.Is there any way to know what the user is looking at?As noted in Adopting best practices for privacy and user preferences, the system handles camera and sensor inputs without passing the information to apps directly. There's no way to get precise eye movements or exact line of sight. Instead, create interface elements that people can interact with and let the system manage the interaction. If you have a use case that you can't get to work this way, and as long as it doesn't require explicit eye tracking, please file an enhancement request.When are the onHover and onContinuousHover actions called on visionOS?The onHover and onContinuousHover actions are called when a finger is hovering over the view, or when the pointer from a connected trackpad is hovering over the view.Can I show my own immersive environment textures in my app?If your app has an ImmersiveSpace open, you can create a large sphere with an UnlitMaterial and scale it to have inward-facing geometry:struct ImmersiveView: View {
var body: some View {
RealityView { content in
do {
// Create the sphere mesh.
let mesh = MeshResource.generateSphere(radius: 10)

// Create an UnlitMaterial.
var material = UnlitMaterial(applyPostProcessToneMap: false)

// Give the UnlitMaterial your equirectangular color texture.
let textureResource = try await TextureResource(named: "example")
material.color = .init(tint: .white, texture: .init(textureResource))

// Create the model.
let entity = ModelEntity(mesh: mesh, materials: [material])
// Scale the model so that it's mesh faces inward.
entity.scale.x *= -1

content.add(entity)
} catch {
// Handle the error.
}
}
}
}I have existing stereo videos. How can I convert them to MV-HEVC?AVFoundation provides APIs to write videos in MV-HEVC format.
To convert your videos to MV-HEVC:

Create an AVAsset for each of the left and right views.
Use AVOutputSettingsAssistant to get output settings that work for MV-HEVC.
Specify the horizontal disparity adjustment and field of view (this is asset specific). Here’s an example:
var compressionProperties = outputSettings[AVVideoCompressionPropertiesKey] as! [String: Any]

// Specifies the parallax plane.
compressionProperties[kVTCompressionPropertyKey_HorizontalDisparityAdjustment as String] = horizontalDisparityAdjustment

// Specifies the horizontal FOV (90 degrees is chosen in this case.)
compressionProperties[kCMFormatDescriptionExtension_HorizontalFieldOfView as String] = horizontalFOV
Create an AVAssetWriterInputTaggedPixelBufferGroupAdaptor as the input for your AVAssetWriter.
Create an AVAssetReader for each of the left and right video tracks.
Read the left and right tracks, then append matching samples to the tagged pixel buffer group adaptor:
// Create a tagged buffer for each stereoView.
let taggedBuffers: [CMTaggedBuffer] = [
.init(tags: [.videoLayerID(0), .stereoView(.leftEye)], pixelBuffer: leftSample.imageBuffer!),
.init(tags: [.videoLayerID(1), .stereoView(.rightEye)], pixelBuffer: rightSample.imageBuffer!)
]

// Append the tagged buffers to the asset writer input adaptor.
let didAppend = adaptor.appendTaggedBuffers(taggedBuffers,
withPresentationTime: leftSample.presentationTimeStamp)How can I light my scene in RealityKit on visionOS?You can light your scene in RealityKit on visionOS by:

Using a system-provided automatic lighting environment that updates based on real-world surroundings.
Providing your own image-based lighting via an ImageBasedLightComponent. To see an example, create a new visionOS app, select RealityKit as the Immersive Space Renderer, and select Full as the Immersive Space.
I see that CustomMaterial isn’t supported on visionOS. Is there a way I can create materials with custom shading?You can create materials with custom shading in Reality Composer Pro using the Shader Graph. A material created this way is accessible to your app as a ShaderGraphMaterial, so that you can dynamically change inputs to the shader in your code.
For a detailed introduction to the Shader Graph, watch Explore materials in Reality Composer Pro.How can I position entities relative to the position of the device?In an ImmersiveSpace, you can get the full transform of the device using the queryDeviceAnchor(atTimestamp:) method.Learn more about building apps for visionOS









Q&A: Spatial design for visionOS
Get expert advice from the Apple design team on creating experiences for Apple Vision Pro.
View now














Spotlight on: Developing for visionOS
Learn how the developers behind djay, Blackbox, JigSpace, and XRHealth started designing and building apps for Apple Vision Pro.
View now














Spotlight on: Developer tools for visionOS
Learn how developers are using Xcode, Reality Composer Pro, and the visionOS simulator to start building apps for Apple Vision Pro.
View now




Sample code contained herein is provided under the Apple Sample Code License.
Apple

Announcing contingent pricing for subscriptions

Contingent pricing for subscriptions on the App Store — a new feature that helps you attract and retain subscribers — lets you give customers a discounted subscription price as long as they’re actively subscribed to a different subscription. It can be ...
Apple

Get ready with the latest beta releases

The beta versions of iOS 17.3, iPadOS 17.3, macOS 14.3, tvOS 17.3, and watchOS 10.3 are now available. Get your apps ready by confirming they work as expected on these releases. And to take advantage of the advancements in the latest SDKs, make sure to...
Apple

Hello Developer: December 2023

Welcome to Hello Developer. In this edition: Check out new videos on Game Center and the Journaling Suggestions API, get visionOS guidance straight from the spatial design team, meet three App Store Award winners, peek inside the time capsule that is A...
Apple

Q&A: Spatial design for visionOS

Spatial computing offers unique opportunities and challenges when designing apps and games. At WWDC23, the Apple design team hosted a wide-ranging Q&A to help developers explore designing for visionOS. Here are some highlights from that conversatio...
Apple

Privacy updates for App Store submissions

Third-party SDK privacy manifest and signatures. Third-party software development kits (SDKs) can provide great functionality for apps; they can also have the potential to impact user privacy in ways that aren’t obvious to developers and users. As a re...
Apple

Get your apps ready for the holidays

The busiest season on the App Store is almost here! Make sure your apps and games are up to date and ready in advance of the upcoming holidays. We’ll remain open throughout the season and look forward to accepting your submissions. On average, 90% of s...
Apple

App Store Award finalists announced

Every year, the App Store celebrates exceptional apps that improve people’s lives while showcasing the highest levels of technical innovation, user experience, design, and positive cultural impact. This year we’re proud to recognize nearly 40 outstandi...
Apple

Optimize your game for Apple platforms

In this series of videos, you can learn how to level up your pro app or game by harnessing the speed and power of Apple platforms. We’ll discover GPU advancements, explore new Metal profiling tools for M3 and A17 Pro, and share performance best practic...
Apple

PTC is uniting the makers

APPLE VISION PRO APPS FOR ENTERPRISEPTC’s CAD products have been at the forefront of the engineering industry for more than three decades. And the company’s AR/VR CTO, Stephen Prideaux-Ghee, has too. “I’ve been doing VR for 30 years, and I’ve never had...
Apple

JigSpace is in the driver’s seat

APPLE VISION PRO APPS FOR ENTERPRISEIt’s one of the most memorable images from JigSpace’s early Apple Vision Pro explorations: A life-size Alfa Romeo C43 Formula 1 car, dark cherry red, built to scale, reflecting light from all around, and parked right...
Apple

The “sweet, creative” world of Kimono Cats

Games simply don’t get much cuter than Kimono Cats, a casual cartoon adventure about two cats on a date (awww) that creator Greg Johnson made as a present for his wife. “I wanted to make a game she and I could play together,” says the Maui-based indie ...
Apple

Spotlight on: Apple Vision Pro apps for enterprise

Businesses of all kinds and sizes are exploring the possibilities of the infinite canvas of Apple Vision Pro — and realizing ideas that were never before possible. We caught up with two of those companies — JigSpace and PTC — to find out how they’re ap...
Apple

Reimagine your enterprise apps on Apple Vision Pro

Discover the languages, tools, and frameworks you’ll need to build and test your apps in visionOS. Explore examples across productivity and collaboration, simulation and training, and guided work. Dive into workflows for creating or converting existing...
Apple

Announcing the Swift Student Challenge 2024

Apple is proud to support and uplift the next generation of student developers, creators, and entrepreneurs. The Swift Student Challenge has given thousands of students the opportunity to showcase their creativity and coding capabilities through app pl...
Apple

Over 30 new developer activities now available

Ready to level up your app or game? Join us around the world for a new set of developer labs, consultations, sessions, and workshops, hosted in person and online throughout November and December.You can explore:
App Store activities: Learn about discov...
Apple

Get ready with the latest beta releases

The beta versions of iOS 17.2, iPadOS 17.2, macOS 14.2, tvOS 17.2, and watchOS 10.2 are now available. Get your apps ready by confirming they work as expected on these releases. And to take advantage of the advancements in the latest SDKs, make sure to...
Apple

TestFlight makes it even simpler to manage testers

TestFlight provides an easy way to get feedback on beta versions of your apps, so you can publish on the App Store with confidence. Now, improved controls in App Store Connect let you better evaluate tester engagement and manage participation to help y...
Apple

The gorgeous gadgets of Automatoys

Steffan Glynn’s Automatoys is a mix between a Rube Goldberg machine and a boardwalk arcade game — and there’s a very good reason why.
In 2018, the Cardiff-based developer visited the Musée Mécanique, a vintage San Francisco arcade packed with old-time...
Apple

Hello Developer: October 2023

Find out about our latest activities (including more Apple Vision Pro developer lab dates), learn how the Plex team embraced Xcode Cloud, discover how the inventive puzzle game Automatoys came to life, catch up on the latest news, and more.Meet with Ap...
Apple

Get ready with the latest beta releases

The beta versions of iOS 17.1, iPadOS 17.1, macOS 14.1, tvOS 17.1, and watchOS 10.1 are now available. Get your apps ready by confirming they work as expected on these releases. And to take advantage of the advancements in the latest SDKs, make sure to...
Apple

Meet with Apple Experts

Join us around the world for a variety of sessions, consultations, labs, and more — tailored for you.Apple developer activities are for everyone, no matter where you are on your development journey. Activities take place all year long, both online and ...
Apple

Pre-orders by region now available

Offering your app or game for pre-order is a great way to build awareness and excitement for your upcoming releases on the App Store. And now you can offer pre-orders on a regional basis. People can pre-order your app in a set of regions that you choos...
Apple

Apple Entrepreneur Camp applications now open

Apple Entrepreneur Camp supports underrepresented founders and developers, and encourages the pipeline and longevity of these entrepreneurs in technology. Building on the success of our alumni from cohorts for female*, Black, and Hispanic/Latinx founde...
Apple

Inside the Apple Vision Pro labs

As CEO of Flexibits, the team behind successful apps like Fantastical and Cardhop, Michael Simmons has spent more than a decade minding every last facet of his team’s work. But when he brought Fantastical to the Apple Vision Pro labs in Cupertino this ...
Apple

Meet with App Store experts

Join us for online sessions August 1 through 24 to learn about the latest App Store features and get your questions answered. Live presentations with Q&A are being held in multiple time zones and languages.
Explore App Store pricing upgrades, inclu...
Apple

Providing safe app experiences for families

The App Store was created to be a safe and trusted place for users to get apps, and a great business opportunity for developers. Apple platforms and the apps you build have become important to many families, as children use our products and services to...
Apple

New design resources now available

Now it’s even easier to design your apps quickly and accurately with new and updated design resources for creating apps on Apple platforms.

visionOS design library and templates for Figma and Sketch.


iOS 17 and iPadOS 17 design kits for Figma and Sk...
Apple

visionOS SDK now available

You can now start creating cutting-edge spatial computing apps for the infinite canvas of Apple Vision Pro. Download Xcode 15 beta 2, which includes the visionOS SDK and Reality Composer Pro (a new tool that makes it easy to preview and prepare 3D cont...
Apple

Spotlight on: Developer tools for visionOS

With the visionOS SDK, developers worldwide can begin designing, building, and testing apps for Apple Vision Pro.
For Ryan McLeod, creator of iOS puzzle game Blackbox, the SDK brought both excitement and a little nervousness. “I didn’t expect I’d ever...
Apple

WWDC23 resources and survey

Thank you to everyone who joined us for an amazing week. We hope you found value, connection, and fun. You can continue to:
Watch sessions at any time.
Check out session highlights.
Read about newly announced technologies.
Get sample code from sessions...
Apple

WWDC23 highlights

Looking to explore all the big updates from an incredible week of sessions? Start with this collection of essential videos across every topic. And as always, you can watch the full set of sessions any time.Spatial Computing


...
Apple

Friday @ WWDC23

The final day of WWDC is upon us — but before we power down, here's a look at some of the activities and sessions available today.Get ready for day fiveWe’ve saved some of the best for last. Pop into Slack to learn more about Metal, meet some super Swi...
Apple

Thursday @ WWDC23

Day four is here — and a fresh round of sessions, labs, and activities await.Get started with labs and sessionsCurious about the difference between the Shared Space and a Full Space in visionOS? Want to learn more about Observable? There’s a Q&A fo...
Apple

Discover documentation and sample code

Browse new and updated documentation and sample code to learn about the latest technologies, frameworks, and APIs introduced at WWDC23. You’ll find new ways to enhance your apps targeting the latest platform releases.
Explore highlights of new technolo...
Apple