{"library":"pyobjc-framework-social","title":"PyObjC Social Framework","description":"PyObjC is a bridge between Python and Objective-C, enabling Python developers to write full-featured Cocoa applications and interact with macOS system frameworks. The `pyobjc-framework-social` package provides Python wrappers for Apple's Social.framework, allowing programmatic access to social media services integrated into macOS, such as sharing content. The library is currently at version 12.1 and typically releases updates in alignment with major macOS SDK changes and Python version support.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-social"],"cli":null},"imports":["from Social import SLComposeViewController","from Social import SLServiceTypeTwitter","import objc"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import objc\nfrom Social import SLComposeViewController, SLServiceTypeTwitter, SLServiceTypeFacebook\n\ndef check_social_services():\n    \"\"\"\n    Checks if Twitter and Facebook social services are available on macOS.\n    Note: This example demonstrates basic availability checks without\n    requiring a full NSApplication event loop for UI presentation.\n    \"\"\"\n    # Explicitly load the Social framework if not already done by imports.\n    # This is often implicit but good for clarity in specific cases.\n    objc.loadBundle(\"Social\", globals(), bundle_path=objc.pathForFramework(\"/System/Library/Frameworks/Social.framework\"))\n\n    twitter_available = SLComposeViewController.isAvailableForServiceType_(SLServiceTypeTwitter)\n    facebook_available = SLComposeViewController.isAvailableForServiceType_(SLServiceTypeFacebook)\n\n    print(f\"Twitter service available: {twitter_available}\")\n    print(f\"Facebook service available: {facebook_available}\")\n\nif __name__ == \"__main__\":\n    check_social_services()\n","lang":"python","description":"This quickstart demonstrates how to import and use basic functionality from the `Social` framework to check the availability of social media services (Twitter and Facebook) on macOS. It highlights the direct access to Objective-C classes and their static methods provided by PyObjC. Note that interacting with the UI for composing a post (e.g., displaying `SLComposeViewController`) would require a running `NSApplication` event loop, which is a more involved setup not covered in this minimal example.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":null,"pypi_latest":"12.1","is_stale":null,"summary":{"python_range":"3.10–3.9","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.3,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.2,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.1,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.7,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pyobjc-framework-social","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.9,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}