<?xml version='1.0' encoding='utf-8'?>
<widget id="com.pargod.app" version="1.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Hapargod</name>
    <description>Hapargod</description>
    <author email="dev@cordova.apache.org" href="https://cordova.apache.org">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="http:///" />
    <allow-intent href="https:///" />
    <access origin="https://*.hapargod.co.il" />
    <access origin="https://*.wizzo.media" />
    <access origin="https://*.facebook.com" />
    <access origin="https://*.google.com" />
    <access origin="https://www.google-analytics.com" />
    <access origin="https://analytics.google.com" />
    <access origin="*" />    
    <allow-intent href="*" />
    <allow-navigation href="*" />

     <platform name="ios">
       

        <!-- דורש סביבת iOS (חוסם מק) -->
        <edit-config file="*-Info.plist" mode="merge" target="LSRequiresIPhoneOS">
            <true/>
        </edit-config>

        <!-- הגדרות Export Compliance - מונע שאלות ידניות ב-TestFlight -->
        <edit-config file="*-Info.plist" mode="merge" target="ITSAppUsesNonExemptEncryption">
            <false/>
        </edit-config>
        
        <!-- הגדרת הפצה - לא כולל צרפת -->
        <edit-config file="*-Info.plist" mode="merge" target="ITSEncryptionExportComplianceCode">
            <string>a</string>
        </edit-config>


        <!-- שם התצוגה בעברית -->
        <edit-config file="*-Info.plist" mode="merge" target="CFBundleDisplayName">
            <string>הפרגוד</string>
        </edit-config>

        <!-- הסרת דרישות יכולות מיוחדות - מונע בעיות תאימות עם Mac ו-visionOS -->
        <edit-config file="*-Info.plist" mode="delete" target="UIRequiredDeviceCapabilities" />
        
        <!-- הגדרות נוספות למניעת תמיכה ב-Mac Catalyst -->
        <edit-config file="*-Info.plist" mode="merge" target="LSApplicationCategoryType">
            <string>public.app-category.social-networking</string>
        </edit-config>
        
        <!-- מניעת זמינות ב-visionOS -->
        <edit-config file="*-Info.plist" mode="merge" target="LSMinimumSystemVersion">
            <string>13.0</string>
        </edit-config>
        
<edit-config file="*-Info.plist" mode="merge" target="UIBackgroundModes">
            <array>
                <string>remote-notification</string>
                <string>fetch</string>
            </array>
        </edit-config>
      
        <edit-config file="*-Info.plist" mode="merge" target="NSUserNotificationsUsageDescription">
            <string>האפליקציה משתמשת בהודעות כדי לשלוח עדכונים חשובים</string>
        </edit-config>

    <!-- מניעת גלילה מעבר לגבולות (anti-bounce) -->
    <preference name="DisallowOverscroll" value="true" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="webviewbounce" value="false" />

    <preference name="SuppressLaunchScreenStoryboard" value="true" />
    <preference name="deployment-target" value="17.0" />
<edit-config target="UIDeviceFamily" file="*-Info.plist" mode="merge">
<array>
<integer>1</integer>
</array>
</edit-config>

<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
<string>We use the camera so you can take photos and videos to share in your posts or stories.</string>
</edit-config>

<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
<string>We use your photo library so you can select existing photos and videos to share in posts or stories.</string>
</edit-config>

<edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge">
<string>We need permission to save edited photos or videos from your posts or stories to your library.</string>
</edit-config>

<edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" mode="merge">
<string>We use the microphone so you can record audio when capturing videos for posts or stories.</string>
</edit-config>

<edit-config target="NSAppleMusicUsageDescription" file="*-Info.plist" mode="merge">
<string>We request access to your media library so you can choose background music for your videos or stories.</string>
</edit-config>

<edit-config target="NSContactsUsageDescription" file="*-Info.plist" mode="merge">
<string>We use your contacts to help you find friends who are already on Statush.</string>
</edit-config>


        <allow-intent href="https://chat.whatsapp.com/*" />
        <allow-navigation href="https://chat.whatsapp.com/*" />
        <access origin="https://chat.whatsapp.com/*" />

        <preference name="StatusBarOverlaysWebView" value="false" />
        <preference name="StatusBarBackgroundColor" value="#ffffff" />
        <preference name="Fullscrenn" value="false" />
        <preference name="AllowInlineMediaPlayback" value="true"/>
        <preference name="MediaTypesRequiringUserActionForPlayback" value="none"/>

        <preference name="AllowUntrustedCerts"  value="true" />
        <preference name="InterceptRemoteRequests" value="all" />
        <preference name="allowFileAccessFromFileURLs" value="true" />
        <preference name="allowUniversalAccessFromFileURLs" value="true" />

        <!-- iPhone App Icons Only -->
        <icon height="57" src="res/ios/57.png" width="57" />
        <icon height="114" src="res/ios/114.png" width="114" />
        <icon height="29" src="res/ios/29.png" width="29" />
        <icon height="58" src="res/ios/58.png" width="58" />
        <icon height="40" src="res/ios/40.png" width="40" />
        <icon height="80" src="res/ios/80.png" width="80" />
        <icon height="60" src="res/ios/60.png" width="60" />
        <icon height="120" src="res/ios/120.png" width="120" />
        <icon height="180" src="res/ios/180.png" width="180" />
        <icon height="87" src="res/ios/87.png" width="87" />
        <icon height="1024" src="res/ios/1024.png" width="1024" />
        <allow-intent href="fb://*" />
        <allow-intent href="whatsapp://*" />
        <allow-intent href="twitter://*" />
        <allow-intent href="instagram://*" />
        <allow-intent href="mailto:*" />
    </platform>
    <access origin="https://*.c-live.co.il" />
    <access origin="https://s0.2mdn.net" />
    <access origin="https://*.somplo.com" />
    <access origin="https://somplo.com/" />
    <access origin="https://ramzi.co.il" />
    <access origin="https://ultra.kollkvoda.co.il" />
    <access origin="https://bar.statush.co.il" />
    <access origin="https://cplayer.streamgates.net" />
    <access origin="https://www.doscast.co.il" />
    <access origin="https://vimeo.com" />
    <access origin="https://*.vimeo.com" />
    <access origin="https://*.twitter.com" />
    <access origin="https://twitter.com" />
    <access origin="https://x.com" />
    <access origin="https://www.youtube.com" />
    <access origin="https://cdn.jwplayer.com/" />
    <access origin="https://rep.erate.co.il" />
    <preference name="WKWebViewOnly" value="true" />
    <feature name="CDVWKWebViewEngine">
        <param name="ios-package" value="CDVWKWebViewEngine" />
    </feature>
    <preference name="WKWebViewDecelerationSpeed" value="normal" />
    <preference name="SuppressesIncrementalRendering" value="false" />
    <preference name="GapBetweenPages" value="0" />
    <preference name="PageLength" value="0" />
    
    <!-- Apple Sign In Plugin Configuration -->
    <plugin name="cordova-plugin-sign-in-with-apple" spec="^0.1.2" />
    
    <!-- Apple Sign In Entitlements -->
    <edit-config target="Entitlements-Debug.plist" file="*-Debug.plist" mode="merge">
        <dict>
            <key>com.apple.developer.applesignin</key>
            <array>
                <string>Default</string>
            </array>
            <key>aps-environment</key>
            <string>development</string>
        </dict>
    </edit-config>
    
    <edit-config target="Entitlements-Release.plist" file="*-Release.plist" mode="merge">
        <dict>
            <key>com.apple.developer.applesignin</key>
            <array>
                <string>Default</string>
            </array>
            <key>aps-environment</key>
            <string>production</string>
        </dict>
    </edit-config>
    
    <!-- Apple Sign In capability in Info.plist -->
    <edit-config target="NSAppleSignInUsageDescription" file="*-Info.plist" mode="merge">
        <string>This app uses Apple Sign In to provide secure authentication.</string>
    </edit-config>

    <!-- Universal Links Configuration -->
    <universal-links>
        <host name="hapargod.co.il" scheme="https">
            <path url="/"/>
            <path url="/posts/*"/>
            <path url="/stories/*"/>
            <path url="/profile/*"/>
        </host>
    </universal-links>

</widget>
