Skip to content

Commit

Permalink
Update ARShooter with 2.1.0 SDK (#211)
Browse files Browse the repository at this point in the history
* 2.1.0 swift update to arshooter

* update getting user location
  • Loading branch information
franklin-huang-mobiledgex authored Jun 26, 2020
1 parent d8e75f6 commit fc3be10
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions iOS/ARShooterExample/ARShooterGame/Podfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use_frameworks!

platform :ios, '11.4'
platform :ios, '12.0'

# Default Specs.git:
source 'https://github.com/CocoaPods/Specs.git'

plugin 'cocoapods-art', :sources => ['cocoapods-releases']

target 'ARShooter' do
pod 'MobiledgeXiOSLibrary', '= 2.0'
pod 'MobiledgeXiOSLibrary', '= 2.1.0'

target 'ARShooterTests' do
inherit! :search_paths
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import MobiledgeXiOSLibrary
import Promises
import SocketIO

class LoginViewController: UIViewController {
class LoginViewController: UIViewController, CLLocationManagerDelegate {

@IBOutlet weak var gameIDField: UITextField!
@IBOutlet weak var userNameField: UITextField!
Expand All @@ -40,11 +40,6 @@ class LoginViewController: UIViewController {
var appVers: String?
var orgName: String!
var carrierName: String?
var authToken: String?
var uniqueIDType: MobiledgeXiOSLibrary.MatchingEngine.IDTypes?
var uniqueID: String?
var cellID: UInt32?
var tags: [MobiledgeXiOSLibrary.MatchingEngine.Tag]?
var host: String?
var port: UInt16?
var internalPort: UInt16 = 3838 // internal port I specified when deploying my app
Expand All @@ -53,6 +48,9 @@ class LoginViewController: UIViewController {
var demo = true

var manager: SocketManager?

var locationManager: CLLocationManager?

enum LoginViewControllerError: Error {
case runtimeError(String)
}
Expand All @@ -68,6 +66,18 @@ class LoginViewController: UIViewController {
gameIDField.delegate = self

setUpMatchingEngineParameters()

SKToast.show(withMessage: "Request location permissions not implemented yet")

mobiledgeXIntegration()
}

// Location Manager delegate. Called when Authorization Status is changed
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
SKToast.show(withMessage: "Location Manager delegate not implemented yet")
}

func mobiledgeXIntegration() {
DispatchQueue.main.async {
self.callMatchingEngineAPIs()
self.getWebsocketConnection()
Expand Down
4 changes: 2 additions & 2 deletions iOS/ARShooterExample/ARShooterSkeleton/Podfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use_frameworks!

platform :ios, '11.4'
platform :ios, '12.0'

# Default Specs.git:
source 'https://github.com/CocoaPods/Specs.git'

plugin 'cocoapods-art', :sources => ['cocoapods-releases']

target 'ARShooterSkeleton' do
pod 'MobiledgeXiOSLibrary', '= 2.0'
pod 'MobiledgeXiOSLibrary', '= 2.1.0'

target 'ARShooterSkeletonTests' do
inherit! :search_paths
Expand Down

0 comments on commit fc3be10

Please sign in to comment.