Add support for 6 additional Apple APIs#1
Merged
zekedou merged 5 commits intocozy-elixir:mainfrom Apr 14, 2026
Merged
Conversation
- Add Apple.Types.DeviceCheck with type definitions for DeviceCheck API - Add Apple.DeviceCheckAPI for token generation and API endpoints - Supports both production and development environments - 1-hour token expiration as per Apple documentation - Add Apple.MapkitJSAPI for MapKit JS web embedding - Supports optional origin restriction for domain validation - 1-hour token expiration for web token authorization - Update mix.exs to include new modules in documentation groups These additions extend the library to cover two commonly requested Apple APIs that were previously missing from the utilities collection.
- Add Apple.Types.AppleMusic with type definitions for Music API - key_id, private_key, user_token types - storefront and language localization types - Add Apple.AppleMusicAPI for MusicKit integration - Developer token generation with configurable expiration (default 30 days, max 6 months) - Helper functions for API endpoint URLs (catalog and library) - Support for both catalog access and user-specific library access - Update mix.exs documentation groups Apple Music API allows access to: - Apple Music catalog (songs, albums, artists, playlists) - User library and personal playlists - Search functionality - Personalized recommendations
- Add Apple.Types.GameCenter with type definitions - team_id, key_id, private_key for authentication - bundle_id for app identification - player_id, leaderboard_id, achievement_id for Game Center entities - Add Apple.GameCenterAPI for server-side Game Center access - Token generation with 1-hour expiration - Base URL helper for API endpoint construction Game Center API enables server-side: - Leaderboard management and score submission - Achievement tracking and progress - Player data access - Matchmaking (when supported by Apple)
- Add Apple.Types.CloudKit with type definitions - container_id for iCloud container identification - key_id, private_key for Server-to-Server authentication - record_id, record_type for CloudKit data structures - environment type for development/production - Add Apple.CloudKitAPI for server-side CloudKit access - Token generation for CloudKit Web Services - Base URL helper for both development and production - Database URL helper for specific database access CloudKit Web Services enables server-side: - Record management (CRUD operations) - Asset upload and download - Query execution - Database subscription management
- Add Apple.Types.AppleDeveloper with comprehensive type definitions
- team_id, key_id, private_key for App Store Connect API authentication
- certificate_id, profile_id, device_id, bundle_id resource identifiers
- certificate_type, profile_type, device_status, device_class enums
- Detailed documentation for all Apple Developer portal workflows
- Add Apple.AppleDeveloperAPI for developer account management
- Token generation with 20-minute expiration (App Store Connect API limit)
- Base URL and resource path helpers for:
- /certificates - Certificate management (CSR, download, revoke)
- /profiles - Provisioning profile management
- /devices - Device registration (UDIDs for testing)
- /bundleIds - App ID and capability management
- Individual resource path helpers for specific IDs
Apple Developer API enables automated CI/CD workflows:
- Certificate renewal and management
- Device registration for testing teams
- Provisioning profile updates
- App capability configuration
Contributor
|
I'll review the code later. |
Contributor
|
Thanks for your hard work. I've made some naming and style changes and released v0.6.0. |
Contributor
|
One more thing to note: the author email of the commits is dl-alexandre@noreply.codeberg.org — not sure if that's intentional. The direct result is that your avatar doesn't show up in the contributors list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive support for 6 additional Apple APIs that are commonly needed for server-side Apple development:
New APIs Added
1. DeviceCheckAPI (
Apple.DeviceCheckAPI)2. MapkitJSAPI (
Apple.MapkitJSAPI)3. AppleMusicAPI (
Apple.AppleMusicAPI)4. GameCenterAPI (
Apple.GameCenterAPI)5. CloudKitAPI (
Apple.CloudKitAPI)6. AppleDeveloperAPI (
Apple.AppleDeveloperAPI)/certificates)/profiles)/devices)/bundleIds)Type Definitions
Each API includes comprehensive type definitions in
Apple.Types.*modules:Apple.Types.DeviceCheckApple.Types.AppleMusicApple.Types.GameCenterApple.Types.CloudKitApple.Types.AppleDeveloperAll types include detailed documentation on how to obtain credentials from Apple Developer portals.
Design Consistency
All implementations follow the existing patterns in the library:
JOSElibrary for JWT signing (ES256)build_auth_token!/3function signatures@specattributes@moduledocwith usage examplesmix.exsdocumentation groupsTesting
mix compilemix docsRelated
These additions significantly expand the library's coverage of Apple's server-to-server APIs, making it a more complete utility library for Apple SDK development.