Fix multiple issues preventing iOS builds and TypeScript compilation: - Fix postinstall script to handle missing directories gracefully - Create assets directory if it doesn't exist before writing capacitor.plugins.json - Don't exit on error if Capacitor hasn't synced yet (allows npm install to succeed) - Fix TypeScript compilation errors - Add optional fields to PermissionStatus interface (exactAlarmEnabled, wakeLockEnabled, allPermissionsGranted) - Fix type assertion in HomeView.vue to use 'as any' for dynamic plugin methods - Fix Podfile configuration issues - Update fix script to detect correct pod path (node_modules vs file dependency) - Fix pod name from TimesafariDailyNotificationPlugin to DailyNotificationPlugin - Handle both node_modules and relative paths for file dependencies - Update iOS sync workflow - Add fix script to cap:sync:ios (runs before and after sync) - Automatically run pod install after fixing Podfile - Handle cap sync failures gracefully with || true - Update documentation - Reflect that iOS sync now includes fix script - Note that pod install is handled automatically - Update troubleshooting section for Podfile errors Fixes: - npm install failing due to missing assets directory - TypeScript build errors in typed-plugin.ts and HomeView.vue - iOS pod install failing with "No podspec found for TimesafariDailyNotificationPlugin" - Capacitor sync overwriting Podfile with incorrect pod name
25 lines
726 B
Ruby
25 lines
726 B
Ruby
require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
|
|
|
|
platform :ios, '13.0'
|
|
use_frameworks!
|
|
|
|
# workaround to avoid Xcode caching of Pods that requires
|
|
# Product -> Clean Build Folder after new Cordova plugins installed
|
|
# Requires CocoaPods 1.6 or newer
|
|
install! 'cocoapods', :disable_input_output_paths => true
|
|
|
|
def capacitor_pods
|
|
pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
|
|
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
|
|
pod 'DailyNotificationPlugin', :path => '../../node_modules/@timesafari/daily-notification-plugin/ios'
|
|
end
|
|
|
|
target 'App' do
|
|
capacitor_pods
|
|
# Add your Pods here
|
|
end
|
|
|
|
post_install do |installer|
|
|
assertDeploymentTarget(installer)
|
|
end
|