update
This commit is contained in:
44
ios/bin/build.zsh
Executable file
44
ios/bin/build.zsh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/zsh
|
||||
set -e
|
||||
|
||||
d=~/ai/at/repos/social-app
|
||||
APP_NAME=Aiat
|
||||
PKG=aiat
|
||||
TEAM_NAME=
|
||||
TEAM_ID=
|
||||
CERT="Apple Distribution: ${TEAM_NAME} (${TEAM_ID})"
|
||||
MAIL=user@example.com
|
||||
KEY_CHAIN=EXAMPLE
|
||||
|
||||
cd $d
|
||||
# npx expo prebuild --clean
|
||||
# cd ios && pod install && cd ..
|
||||
|
||||
## アーカイブ
|
||||
xcodebuild -workspace ios/${PKG}.xcworkspace \
|
||||
-scheme ${PKG} \
|
||||
-configuration Release \
|
||||
-archivePath build/${APP_NAME}.xcarchive \
|
||||
-allowProvisioningUpdates \
|
||||
archive
|
||||
|
||||
cd build
|
||||
|
||||
# IPA作成
|
||||
rm -rf Payload ${APP_NAME}.ipa
|
||||
mkdir -p Payload
|
||||
cp -R ${APP_NAME}.xcarchive/Products/Applications/${PKG}.app Payload/
|
||||
cp ../store.mobileprovision Payload/${PKG}.app/embedded.mobileprovision
|
||||
|
||||
# entitlements抽出
|
||||
security cms -D -i Payload/${PKG}.app/embedded.mobileprovision > /tmp/profile.plist
|
||||
/usr/libexec/PlistBuddy -x -c "Print :Entitlements" /tmp/profile.plist > /tmp/entitlements.plist
|
||||
|
||||
codesign -f -s "$CERT" Payload/${PKG}.app/Frameworks/*.framework 2>/dev/null || true
|
||||
codesign -f -s "$CERT" --entitlements /tmp/entitlements.plist Payload/${PKG}.app
|
||||
|
||||
zip -r ${APP_NAME}.ipa Payload
|
||||
|
||||
xcrun altool --upload-app -f ${APP_NAME}.ipa -t ios -u "${MAIL}" -p "@keychain:${KEY_CHAIN}"
|
||||
|
||||
echo "Upload complete"
|
||||
86
ios/bin/install.zsh
Normal file
86
ios/bin/install.zsh
Normal file
@@ -0,0 +1,86 @@
|
||||
#!/bin/zsh
|
||||
|
||||
if [ "$1" = "social-app-custom" ];then
|
||||
at-social-app-custom-pages
|
||||
at-social-app-custom-screens
|
||||
at-social-app-aiat-config
|
||||
at-social-app-aiat-logo
|
||||
at-origin-social-app
|
||||
exit
|
||||
fi
|
||||
|
||||
function at-social-app-custom-pages() {
|
||||
d_=$d/repos/social-app
|
||||
custom=$d/social-app-custom
|
||||
|
||||
echo "copying custom components to social-app"
|
||||
|
||||
# Create components directory if not exists
|
||||
mkdir -p ${d_}/src/components/custom
|
||||
|
||||
# Copy custom components
|
||||
cp ${custom}/PrivacyContent.tsx ${d_}/src/components/custom/
|
||||
cp ${custom}/AppInfo.tsx ${d_}/src/components/custom/
|
||||
|
||||
echo "custom components copied successfully"
|
||||
}
|
||||
|
||||
function at-social-app-aiat-config() {
|
||||
d_=$d/repos/social-app
|
||||
custom=$d/social-app-custom
|
||||
|
||||
echo "applying Aiat configuration"
|
||||
|
||||
# Update app.config.js
|
||||
cd ${d_}
|
||||
|
||||
# Backup original
|
||||
cp app.config.js app.config.js.orig
|
||||
|
||||
# Apply changes using sed
|
||||
sed -i "s/name: 'Bluesky'/name: 'Aiat'/g" app.config.js
|
||||
sed -i "s/slug: 'bluesky'/slug: 'aiat'/g" app.config.js
|
||||
sed -i "s/scheme: 'bluesky'/scheme: 'aiat'/g" app.config.js
|
||||
sed -i "s/owner: 'blueskysocial'/owner: 'syui'/g" app.config.js
|
||||
sed -i "s/bundleIdentifier: 'xyz.blueskyweb.app'/bundleIdentifier: 'ai.syui.at'/g" app.config.js
|
||||
|
||||
# Update package.json name
|
||||
sed -i 's/"name": "bsky.app"/"name": "aiat"/g' package.json
|
||||
|
||||
echo "Aiat configuration applied"
|
||||
}
|
||||
|
||||
function at-social-app-aiat-logo() {
|
||||
d_=$d/repos/social-app
|
||||
custom=$d/social-app-custom
|
||||
|
||||
echo "applying Aiat logo"
|
||||
|
||||
# Create logo directory if not exists
|
||||
mkdir -p ${custom}/assets
|
||||
|
||||
# Copy logo if exists in custom folder
|
||||
if [ -f ${custom}/assets/icon.png ]; then
|
||||
cp ${custom}/assets/icon.png ${d_}/assets/app-icons/ios_icon_default_next.png
|
||||
echo "Aiat logo applied"
|
||||
else
|
||||
echo "Warning: Logo file not found at ${custom}/assets/icon.png"
|
||||
echo "Please add your logo file there"
|
||||
fi
|
||||
}
|
||||
|
||||
function at-social-app-custom-screens() {
|
||||
d_=$d/repos/social-app
|
||||
custom=$d/social-app-custom
|
||||
|
||||
echo "applying custom screens"
|
||||
|
||||
# Copy custom screen files
|
||||
cp ${custom}/PrivacyPolicy.screen.tsx ${d_}/src/view/screens/PrivacyPolicy.tsx
|
||||
cp ${custom}/Support.screen.tsx ${d_}/src/view/screens/Support.tsx
|
||||
cp ${custom}/LicenseNotice.tsx ${d_}/src/components/custom/
|
||||
|
||||
echo "custom screens applied"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user