Skip to content

Commit

Permalink
1.5.6
Browse files Browse the repository at this point in the history
Argh - more deletion of endpoints from apple
This is a quick 'monkey-fix' to get up and going after Apple deletes all the Friends endpoints.
Working in my brief testing - will check more when able/time.
Essentially this removes support for friend devices as end point is gone.
(as before big fix change devices to Family sharing type)

1.5.5
Add address city, suburb, country, house number, road - state to Family devices to construct own address string.
address = summary string, which is quite long

1.5.3
Use OSM to generate address data from lat/Long as no longer supplied by apple device
Update WazeRouteCaculator

1.5.2
Update Waze Router Calculator
Add labels to family devices

1.5.1

Apple has big server changes which this is a response to.

Remove support for 'Friends'.  Bugger.

What does this mean?
It means we can no longer access Friend data in any fashion.
We can access Family and Own Device data (every family device, and every personal device)

What does this mean?
Well I suspect most usage is within Families, so I would go into current iFriendDevice and edit it to iFriend Family device.
Save and restart Plugin - hopefully everything now continues

non-2FA accounts have largely been depreciated given back end issues.
  • Loading branch information
Ghawken committed May 10, 2023
1 parent d740af2 commit 45c29ba
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 21 deletions.
2 changes: 1 addition & 1 deletion iFindFriendsMini.indigoPlugin/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>1.5.5</string>
<string>1.5.6</string>
<key>ServerApiVersion</key>
<string>3.0</string>
<key>CFBundleDisplayName</key>
Expand Down
19 changes: 10 additions & 9 deletions iFindFriendsMini.indigoPlugin/Contents/Server Plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,9 @@ def refreshData(self):

self.appleAPI = iLogin[1]

follower = self.appleAPI.friends.locations
friendsdata = iLogin[1].friends.data
# follower = self.appleAPI.friends.locations
follower = None
friendsdata = None #iLogin[1].friends.data

if self.debugicloud:
self.logger.debug(str('Follower is Type: '+ str(type(follower))))
Expand Down Expand Up @@ -1845,20 +1846,20 @@ def iAuthorise(self, iUsername, iPassword):
# self.logger.erlogger.errorror(f"{self.appleAPI.friends.data}")
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u'self.appleAPI.friends.locations equals:')
self.logger.debug(str(self.appleAPI.friends.locations))
#self.logger.debug(u'self.appleAPI.friends.locations equals:')
#self.logger.debug(str(self.appleAPI.friends.locations))
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u'Type of self.appleAPI.friends.locations equals:')
self.logger.debug(str(type(self.appleAPI.friends.locations)))
self.logger.debug(u"{0:=^130}".format(""))
#self.logger.debug(str(type(self.appleAPI.friends.locations)))
self.logger.debug(u"{0:=^130}".format(""))
#self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u'Type of self.appleAPI.friends.data')
self.logger.debug(str(type(self.appleAPI.friends.data)))
#self.logger.debug(str(type(self.appleAPI.friends.data)))
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u'self.appleAPI.friends.data equals')
self.logger.debug(str(self.appleAPI.friends.data))
#self.logger.debug(str(self.appleAPI.friends.data))
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u"{0:=^130}".format(""))
# self.logger.debug(u'self.appleAPI.friends.data[followers] equals:')
Expand All @@ -1872,7 +1873,7 @@ def iAuthorise(self, iUsername, iPassword):
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u'self.appleAPI.friends.details equals:')
self.logger.debug(str(self.appleAPI.friends.details))
#self.logger.debug(str(self.appleAPI.friends.details))
self.logger.debug(u"{0:=^130}".format(""))
self.logger.debug(u"{0:=^130}".format(""))
return 0, self.appleAPI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,8 @@ def files(self):
@property
def friends(self):
service_root = self._get_webservice_url("findme")
return FindFriendsService(service_root, self.session, self.params)
return FindMyiPhoneServiceManager(service_root, self.session, self.params)
#return FindFriendsService(service_root, self.session, self.params)

@property
def photos(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import absolute_import

import json



Expand All @@ -24,8 +24,26 @@ def refresh_data(self):
Fetches all data from Find my Friends endpoint
"""
params = dict(self.params)
fake_data = '{"dataContext":null,"serverContext":null,"clientContext":{"productType":"fmfWeb","appVersion":"1.0","contextApp":"com.icloud.web.fmf","userInactivityTimeInMS":537,"windowInFocus":false,"windowVisible":true,"mapkitAvailable":true,"tileServer":"Apple"}}'
req = self.session.post(self._friend_endpoint, data=fake_data, params=params)

fake_data = '{"dataContext":null,"serverContext":null,"clientContext":{"productType":"iphone6,1","appVersion":"1.0","contextApp":"com.icloud.web.fmf","userInactivityTimeInMS":537,"windowInFocus":false,"windowVisible":true,"mapkitAvailable":true,"tileServer":"Apple"}}'
fake_data = '{"clientContext":{"appName":"FindMyiPhone","fmly":"True","clientTimestamp":"0","productType":"iphone14,2","appVersion":"5.0","buildVersion":"376","deviceUDID":"","osVersion":"14.0","inactiveTime":"1"}}'
mock_payload = json.dumps(
{
"clientContext": {
"appVersion": "1.0",
"contextApp": "com.icloud.web.fmf",
"mapkitAvailable": True,
"productType": "fmfWeb",
"tileServer": "Apple",
"userInactivityTimeInMS": 537,
"windowInFocus": False,
"windowVisible": True,
},
"dataContext": None,
"serverContext": None,
}
)
req = self.session.post(self._friend_endpoint, data=mock_payload, params=params)
self.response = req.json()
return self.response

Expand All @@ -37,24 +55,24 @@ def data(self):

@property
def locations(self):
return self.data.get('locations')
return "locations blank"

@property
def followers(self):
return self.data.get('followers')
return "followers blank"

@property
def friend_fences(self):
return self.data.get('friendFencesISet')
return "fence blank"

@property
def my_fences(self):
return self.data.get('myFencesISet')
return "myFence Blank"

@property
def details(self):
return self.data.get('contactDetails')
return "contactDetails Blank"

@property
def following(self):
return self.data.get('following')
return "following Blank"
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def refresh_client(self):
data=json.dumps(
{
"clientContext": {
"fmly": self.with_family,
"fmly": True,
"shouldLocate": True,
"selectedDevice": "all",
"deviceListVersion": 1,
Expand Down Expand Up @@ -193,6 +193,30 @@ def data(self):
"""Gets the device data."""
return self.content

@property
def locations(self):
return "locations blank"

@property
def followers(self):
return "followers blank"

@property
def friend_fences(self):
return "fence blank"

@property
def my_fences(self):
return "myFence Blank"

@property
def details(self):
return "contactDetails Blank"

@property
def following(self):
return "following Blank"

def __getitem__(self, key):
return self.content[key]

Expand Down

0 comments on commit 45c29ba

Please sign in to comment.