Build iOS thành công nhưng không có file .xcworkspace
Vấn đề
- Khi tích hợp đầy đủ các SDK, cocapods, build iOS trên Unity báo success nhưng không có file .xcworkspace để archive
Nguyên nhân
- Do lỗi các mạng quảng cáo không tương thích với phiên bản iOS tối thiểu
- Do các mạng quả cáo không tương thích với Mediation SDK
- ...
Giải pháp
- Sử dụng terminal cd tới folder build iOS (VD:
cd /Users/admin/Unity/Gang2022/Builds/558/iOS) - Chạy lệnh
pod installđể build lại file .xcworkspace - Đọc, kiểm tra lỗi và tiếp tục xử lý
- Lỗi
AppLovinMediationGoogleAdapterkhông tương thích vớiGoogle-Mobile-Ads-SDK=> Sửa phiên bảnGoogle-Mobile-Ads-SDKtrong filePodfile
[!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK": In Podfile: AppLovinMediationGoogleAdapter (= 12.5.0.0) was resolved to 12.5.0.0, which depends on Google-Mobile-Ads-SDK (= 12.5.0) Google-Mobile-Ads-SDK (~> 11.13.0) Specs satisfying the `Google-Mobile-Ads-SDK (~> 11.13.0), Google-Mobile-Ads-SDK (= 12.5.0)` dependency were found, but they required a higher minimum deployment target.- Lỗi
AppLovinMediationMyTargetAdapteryêu cầu phiên bản iOS tối thiểu cao hơn => trongPodfilesửa dòngplatform :ios, 'iOS_version'hoặc thay đổiTarget minimum iOS Versiontrong Player Settings
[!] CocoaPods could not find compatible versions for pod "AppLovinMediationMyTargetAdapter": In Podfile: AppLovinMediationMyTargetAdapter (= 5.30.0.0) Specs satisfying the `AppLovinMediationMyTargetAdapter (= 5.30.0.0)` dependency were found, but they required a higher minimum deployment target. - Lỗi
- Nếu không còn lỗi và đã có file .xcworkspace thì có thể thực hiện archive trên file .xcworkspace này
Lưu ý
- Dùng lệnh
pod install --repo-updateđể install đồng thời update tất cả các pod trongPodfile - Dọn dẹp cache
pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -f Podfile.lock