Nativescript - การตั้งค่าเวอร์ชันระบบปฏิบัติการเป้าหมาย (iOS)

สำหรับโปรเจ็กต์ NS คุณจะตั้งค่าเวอร์ชัน iOS ขั้นต่ำได้อย่างไร

ฉันมี IPHONEOS_DEPLOYMENT_TARGET=8.0; ในไฟล์ build.xcconfig ของฉัน แต่ระหว่างการ build ฉันได้รับข้อความที่ไม่ได้ตั้งค่า

ในระหว่างกระบวนการสร้าง ฉันได้รับ:

Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed. [WARNING]: [!] Automatically assigning platform ios with version 8.0 on target publishios because no platform was specified. Please specify a platform for this target in your Podfile. Seehttps://guides.cocoapods.org/syntax/podfile.html#platform.

ไฟล์ iOS/build.xcconfig ของฉันมี

IPHONEOS_DEPLOYMENT_TARGET = 8.0;


person dashman    schedule 13.04.2018    source แหล่งที่มา
comment
โปรดอ้างอิงข้อความแบบเต็มแทนที่จะถอดความ   -  person underscore_d    schedule 13.04.2018


คำตอบ (2)


ลองดู หลักเกณฑ์ด้านไวยากรณ์ของ Podfile

สำหรับปัญหาเฉพาะนี้ คุณเพียงแค่ต้องแก้ไข platforms/ios/Podfile และตั้งค่าเวอร์ชันดังนี้:

platform :ios, '9.0'

person Frank    schedule 03.12.2018
comment
ในเนทิฟสคริปต์ podfile จะถูกสร้างขึ้น การเปลี่ยนแปลงใด ๆ จะถูกเปลี่ยนกลับหาก tns platform clean ios ถูกเรียก - person WeezyKrush; 15.10.2020

การแก้ไขอะไรก็ตามในโฟลเดอร์แพลตฟอร์มจะถูกเขียนทับบนบิลด์ ลองแก้ไข Podfile ที่อยู่ใน app/App_Resources/iOS ด้วย: สร้างไฟล์หากไม่มีอยู่ แสดงว่าไม่มีส่วนขยาย

    post_install do |pi|
        pi.pods_project.targets.each do |t|
            t.build_configurations.each do |config|
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
            end
        end
    end
person Frank Barbato    schedule 25.02.2021