작성일 : 20-12-07 04:29
|
[IONIC] background 설치 및 ios onesignal 설치
|
|
|
글쓴이 :
최고관리자
 조회 : 3,292
|
1. 이하의 항목추가
<platform name="ios">
<!-- background-geolocation -->
<config-file parent="NSLocationAlwaysAndWhenInUseUsageDescription" target="*-Info.plist">
<string>[CHANGEME] Background location tracking is required for our app so we can...</string>
</config-file>
<config-file parent="NSLocationAlwaysUsageDescription" target="*-Info.plist">
<string>[CHANGEME pre-iOS11. No longer used with iOS 12] Background location tracking is required for our app so we can...</string>
</config-file>
<config-file parent="NSLocationWhenInUseUsageDescription" target="*-Info.plist">
<string>[CHANGEME] Background location tracking is required for our app so we can...</string>
</config-file>
<config-file parent="NSMotionUsageDescription" target="*-Info.plist">
<string>[CHANGEME] Device motion updates help determine when the device is stationary so the app can save power by turning off location-updates</string>
</config-file>
<!-- /background-geolocation -->
</platform>
2.
cordova plugin add cordova-background-geolocation-lt
cordova platform remove ios
cordova platform add ios
3. 모든 폴더 권한 주기
4. cocoapods 설치 전에 onesignal-cordova-plugin 을 설치하면 에러가 발생.
플러그인을 재설치하려고 삭제해도 삭제가 안되므로,
cocoapods 설치 후, 제거 -> 재설치.
sudo gem install cocoapods
pod repo update
ionic cordova plugin remove onesignal-cordova-plugin --save
ionic cordova plugin add onesignal-cordova-plugin --save
pod setup
|
|