Git Product home page Git Product logo

android-auto-companion-ios's Introduction

Android Auto Companion Library

Library that abstracts away the process of associating a phone with an Android Auto head unit. Once associated, a device will gain the ability to unlock the head unit via BLE.

Build Instructions

This project uses Swift Package Manager (SPM) for builds, so generally follow the rules for building with SPM.

Protobuf Configuration

This project includes several protobuf files. For each raw proto file, a corresponding Swift source file must be generated. An included Swift Package Manager plugin is configured to generate the required source files. The protoc and protoc-gen-swift executables are expected to be installed (symbolic links are fine) at /usr/local/bin. These tools may be installed using Homebrew:

brew install protobuf
brew install swift-protobuf

Then create symbolic links in /usr/local/bin to protoc and protoc-gen-swift.

When executing the build with xcodebuild, pass the option, -skipPackagePluginValidation to automatically trust the plugin.

Reference App

Please see the reference app for an example of a project configured to build the Companion reference app.

Custom Build with the Android Auto Companion Library

Please see the reference app above for an example project. If you want to create your own custom app from scratch with a Companion dependency, here are the steps.

  1. Create an Xcode Workspace for your new project.
  2. Create a new iOS App project.
  3. In Xcode, select your project.
  4. Click on the Package Dependencies tab for the project.
  5. Click on the + button to add a new dependency.
  6. Type "android-auto-companion-ios" in the search field and click Add Package.
  7. Select the iOS target app.
  8. Click on the Build Phases tab for the target.
  9. Expand Link Binary with Libraries.
  10. Click the + button to add libraries.
  11. Add libc++.tbd.
  12. Add AndroidAutoConnectedDeviceManager.

Components

AndroidAutoConnectedDeviceManager

The main library that supplies the ability to associate and connect to an Android Auto vehicle. Full usage instructions, can be found on the Phone SDK Integration Guide.

AndroidAutoUKey2Wrapper

This helper library wraps the ukey2 library. It is included as a prebuilt .xcframework file to allow for easier compilation via Swift Package Manager.

Message Stream Module

Helper library for chunking data to be sent over BLE. BLE defines a maximum size that can be sent at one time (known as the MTU size). In order to send messages that are larger than this, the data needs to be split into packets equal to the MTU size or less and reassembled by the other device.

Logging Module

The logging module provides general logging capabilities with an API that is designed for Swift.

The Logger struct is the main interface for configuration and logging.

Usage

When the logger is initialized, the subsystem is inferred from the calling context, and the category is derived from the type and the subsystem.

let log = Logger(for: DemoType.self)

It follows the modifier pattern in which a log instance is immutable from the public API, and a modifier can configure and return a new log. The most common property that can be configured this way is the level.

log.info("Test")

The log record may contain information to be redacted when persisted as such:

log.info("Test for id:", redacting: "abc123")

In Swift 5.2 and later, the log() method can be left off since logging is intrinsic to what the lagger does:

log.info("Test")
Levels in order of increasing significance.
Level Effect
debug In memory logging only.
info Low importance. May get pruned from logs.
standard Default logging level.
error Suitable for logging recoverable errors.
fault Suitable for logging programming errors. Provides backtraces.

android-auto-companion-ios's People

Contributors

tapsns avatar yaoyx108 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

android-auto-companion-ios's Issues

Info.plist Key Issues in AndroidAutoUKey2Wrapper with XCode 15.x

Hello,

We're using the AndroidAutoUKey2Wrapper framework in our project with XCode 14. After updating to XCode 15.0, we're unable to upload build archives to TestFlight due to missing CFBundleVersion and CFBundleShortVersionString keys in the framework's Info.plist.

CleanShot 2024-01-24 at 15 30 43@2x

Manually adding these keys resolves the issue. Could you please update the framework to include them?

Thanks for your support.

Failed to generate build with CI

XCode 13.4.1
Mac OS: 13.2
iPhone simulator: 16.1
lib version: 2.0.5

build working on xcode but not with CI
The following build commands failed:
PhaseScriptExecution Generating\ Swift\ for:\ /Users/Library/Developer/Xcode/DerivedData/ProjectName-/SourcePackages/checkouts/android-auto-companion-ios/Sources/AndroidAutoTrustAgentProtos/trusted_device_message.proto /Users/Library/Developer/Xcode/DerivedData/ProjectName-/Build/Intermediates.noindex/AndroidAutoCompanion.build/Debug-iphonesimulator/AndroidAutoTrustAgentProtos.build/Script.sh (in target 'AndroidAutoTrustAgentProtos' from project 'AndroidAutoCompanion')

Security Policy violation Binary Artifacts

This issue was automatically created by Allstar.

Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code

Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

Remediation Steps
To remediate, remove the generated executable artifacts from the repository.

Artifacts Found

  • Binary/AndroidAutoUKey2Wrapper.xcframework/ios-arm64/AndroidAutoUKey2Wrapper.framework/AndroidAutoUKey2Wrapper
  • Binary/AndroidAutoUKey2Wrapper.xcframework/ios-arm64_x86_64-simulator/AndroidAutoUKey2Wrapper.framework/AndroidAutoUKey2Wrapper

Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.