Swiftpack.co -  Misoservices/MisoGlobalInfo as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Misoservices/MisoGlobalInfo
Swift package to get basic information from the hardware / os / info.plist
.package(url: "https://github.com/Misoservices/MisoGlobalInfo.git", from: "1.0.2")

MisoGlobalInfo

Swift package to get basic information from the hardware / os / info.plist

Instead of searching everywhere for the most used variables, these are provided here.

Main app's bundle info

  • Application name: GlobalInfo.App.displayName
  • Copyright: GlobalInfo.App.copyright
  • Identifier: GlobalInfo.App.bundleIdentifier
  • Version: GlobalInfo.App.bundleShortVersion, GlobalInfo.App.bundleVersion, and GlobalInfo.App.bundleVersionAsInt.
  • Environment: GlobalInfo.App.isiOSOnMac, GlobalInfo.App.isMacCatalyst, GlobalInfo.App.isMacAppleSiliconNativeCode.

Hardware environment

  • Device code name: GlobalInfo.HW.modelIdentifier, GlobalInfo.HW.simulatorModelIdentifier
  • Device family name (iPhone, iPad, ...): GlobalInfo.HW.family

Software environment

  • OS version: GlobalInfo.OS.majorVersion

App store receipt validation

  • App store receipt retrieval: GlobalInfo.App.appStoreReceiptURL and GlobalInfo.App.appStoreReceipt
  • identifierForVendor's UUID retrieval (not for advertisements): GlobalInfo.OS.uuid

macOS 11 / iOS 14 Logger support

  • Defines the subsystem as the bundleIdentifier automatically. Simply create your logger with the category: Logger(category: "SomeCategory")

Version History

1.0.2

  • Added version history.
  • OSS-69 Removed GlobalInfo.App.hasAppStoreReceipt as it breaks Apple suggestion for file retrieval's good practice. Data will return nil if invalid.
  • OSS-70 Added macOS app environment information (running an iOS app on Mac, running on Mac Catalyst, running an Apple Silicon native version).

1.0.1

  • OSS-68 Added simple Logger for macOS 11 / IOS 14
  • OSS-67 Improved sysctl calls for macOS

1.0.0

  • Initial Revision

Colophon

The official address for this package

The git / package url

This package is created and maintained by Misoservices Inc. and is licensed under the BSL-1.0: Boost Software License - Version 1.0.

GitHub

link
Stars: 2
Last commit: 4 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

1.0.2
25 weeks ago
  • Added version history.
  • OSS-69 Removed GlobalInfo.App.hasAppStoreReceipt as it breaks Apple suggestion for file retrieval's good practice. Data will return nil if invalid.
  • OSS-70 Added macOS app environment information (running an iOS app on Mac, running on Mac Catalyst, running an Apple Silicon native version).

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API