iOS 7 용 앱을 개발 중이며 사용자 위치를 찾은 다음 다른 사용자가 같은 위치에 있는지 확인해야합니다. 사용자가 앱을 열고 모든 항목을 자주 업데이트하고 같은 위치에 사용자를 표시하는 즉시 업데이트해야합니다. 사용 가능한 예제를 살펴 봤지만 Parse를 사용하는 것으로는 충분하지 않은 것 같습니다. 아무도 나에게이 일을하는 법에 대한 도움을 줄 수 없거나, 내가 뭘하려고하는 것과 비슷한 몇 가지 예를 아는 사람이라면 크게 감사 할 것입니다. 미리 감사드립니다!iOS 7 Parse Geolocation
0
A
답변
0
당신은 여러 조각을 아래로 문제를 휴식하고 해결하기 위해 필요 - 응용 프로그램이 열리고 주기적으로 Location and Maps programming guide 좋은 출발점이 될 것입니다 때
- 에서 사용자의 위치를 얻습니다. CLLocationManager를 사용하여 초기 위치를 얻을 수 있으며 중요한 위치 변경 이벤트에 등록하여 앱이 실행 중이 아닌 경우에도 주기적으로 업데이트를받을 수 있습니다. Apple에는 예제 코드가 있습니다. 거기에 다른 예제가 많이 있습니다. "핵심 위치 예제"를 사용하여 검색하십시오.
- 사용자의 위치를 Parse 데이터베이스에 저장합니다. Parse.com에 예제와 설명서가 있습니다. 앱이 동일한 위치에있는 다른 사용자를 위해 데이터베이스를 쿼리 할 수있게 해주는 웹 서비스를 제공 할 수도 있습니다. 앱이 실행되지 않을 때 같은 위치에있는 다른 사용자 식별 구문 분석 작업을 사용하여 데이터베이스를 트롤링 할 수 있습니다 사용자 위치를 일치시키고 사용자에게 푸시 알림을 보냅니다. 다시 Parse.com에 배경 작업 및 푸시 알림을 설정하는 방법을 보여주는 예가 있습니다.
0
이것은 현재 위치를 얻고 현재 구문 분석을 저장하는 데 도움이 될 수 있습니다.
func locationManager(manager: CLLocationManager!, didUpdateLocations
locations: [AnyObject]!) {
var userLocation : CLLocation = locations[0] as! CLLocation
var latitude = userLocation.coordinate.latitude
var longitude = userLocation.coordinate.longitude
var latDelta : CLLocationDegrees = 0.01
var lonDelta : CLLocationDegrees = 0.01
var span : MKCoordinateSpan = MKCoordinateSpanMake(latDelta,
lonDelta)
var location : CLLocationCoordinate2D = CLLocationCoordinate2DMake(latitude, longitude)
var region : MKCoordinateRegion = MKCoordinateRegionMake(location, span)
self.mapView.setRegion(region, animated: true)
let testObject = PFObject(className: "User")
let currentPoints = PFGeoPoint(latitude: latitude, longitude: longitude)
testObject.setValue(currentPoints, forKey: "currentLocation")
testObject.saveInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in
if (success) {
dispatch_async(dispatch_get_main_queue()) {
println("added to parse")
}
} else {
println(error)
}
}
}
관련 문제
- 1. Geolocation Parse
- 2. geolocation 인식 iOS 앱
- 3. Geolocation asynchronous iOS
- 4. Windows phone 7 - Json parse
- 5. 검색 기능 Parse IOS
- 6. IncludeKey Parse IOS.
- 7. Parse SDK iOS Analytics
- 8. iOS-Parse 클래스의 행 업데이트
- 9. iOS Parse GeoPoints & MapBox Shape
- 10. Parse IOS SDK의 AND (&) 분리
- 11. Parse Server + Stripe Connect - iOS
- 12. Parse iOS SDK에서 로컬 Parse Server에 연결하는 방법은 무엇입니까?
- 13. iOS 7 :
- 14. Xamarin.iOS geolocation
- 15. 코르도바 Geolocation API가 작동하지 않습니다 IOS 8
- 16. iOS 6 시뮬레이터에서 Phonegap Geolocation 관련 문제
- 17. Parse iOS SDK : 로그인 유지 방법?
- 18. Parse iOS API의 NSError 이중 포인터
- 19. JSON Yahoo Finance Chart 데이터 iOS Parse
- 20. Ios Parse framework 및 Facebook clientKey
- 21. iOS Parse XML iTunes : 이미지 태그
- 22. parse ios sdk 기본 가입이 작동하지 않습니다.
- 23. iOS 앱의 "Parse Issue - Expected Statement"
- 24. Parse 및 dispatch_async를 사용하여 iOS 멀티 스레딩
- 25. iOS - Parse currentUser에서 그림 가져 오기
- 26. Parse iOS beginner : PFUser 가입시 예외 발생
- 27. Parse iOS SDK : 터미널에 클라우드 코드 설정
- 28. 웹 앱용 Parse iOS SDK도 사용하십시오.
- 29. PhoneGap Geolocation 대 Browser Geolocation
- 30. IOS 7 UIProgressView 색상
고마워요! 구문 분석 백그라운드 작업에 대한 설명서를 찾을 수있었습니다. 나는 그것을 시도 할 것이다. –