chore: import upstream snapshot with attribution
cffconvert / validate (push) Has been skipped
License Check / license-check (push) Failing after 2s

This commit is contained in:
wehub-resource-sync
2026-07-13 12:14:16 +08:00
commit 8a852e4b4e
36502 changed files with 9277225 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
# Generating docs for TensorFlowLiteSwift
Documentation is generated via [Jazzy](https://github.com/realm/jazzy) (Googlers
see cr/363774564 for more details).
To browse the Swift reference documentation visit
https://www.tensorflow.org/lite/api_docs/swift.
This directory contains a dummy Xcode project for generating documentation for
TensorFlowLiteSwift via Jazzy, an open-source tool that hooks into Xcode's
build tooling to parse doc comments. Unfortunately, TensorFlowLiteSwift is not
primarily developed via xcodebuild, so the docs build can potentially become
decoupled from upstream TensorFlowLiteSwift development.
Known issues:
- Every new file added to TensorFlowLiteSwift's BUILD must also manually be
added to this Xcode project.
- This project (and the resulting documentation) does not split types by
module, so there's no way to tell from looking at the generated documentation
which modules must be included in order to access a specific type.
- The TensorFlowLiteC dependency is included in binary form, contributing
significant bloat to the git repository since each binary contains unused
architecture slices.
To generate documentation outside of Google, run jazzy as you would on any other
Swift module:
```
jazzy \
--swift-build-tool xcodebuild \
--module "TensorFlowLiteSwift" \
--author "The TensorFlow Authors" \
--sdk iphoneos \
```
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>
@@ -0,0 +1,25 @@
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#import <Foundation/Foundation.h>
//! Project version number for TensorFlowLiteSwift.
FOUNDATION_EXPORT double TensorFlowLiteSwiftVersionNumber;
//! Project version string for TensorFlowLiteSwift.
FOUNDATION_EXPORT const unsigned char TensorFlowLiteSwiftVersionString[];
// In this header, you should import all the public headers of your framework
// using statements like #import <TensorFlowLiteSwift/PublicHeader.h>
@@ -0,0 +1,35 @@
#!/bin/sh
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Make sure we're running in Xcode environment
if [ -z "${SRCROOT}" ]
then
exit 1
fi
# Download TF Lite models from the internet if it does not exist.
FRAMEWORK_FOLDER="${SRCROOT}/Frameworks"
TFLITE_TAR="${FRAMEWORK_FOLDER}/TensorFlowLiteC"
TFLITE_C="${FRAMEWORK_FOLDER}/TensorFlowLiteC-2.4.0"
if [[ -d "$TFLITE_C" ]]; then
echo "INFO: TFLite frameworks already exist. Skip downloading and use the local frameworks."
else
mkdir -p "${FRAMEWORK_FOLDER}"
curl -o "${TFLITE_TAR}" -L "https://dl.google.com/dl/cpdc/e8a95c1d411b795e/TensorFlowLiteC-2.4.0.tar.gz"
tar -xvf "${TFLITE_TAR}" -C "${FRAMEWORK_FOLDER}"
rm "${TFLITE_TAR}"
echo "INFO: Downloaded TensorFlow frameworks to $TFLITE_C."
fi