
    Si]                     :    S SK r S SKrS SKrS SKrS SK7  S rS rg)    N)*c                      [        [        S5       n U R                  5       nS S S 5        [        R                  " [
        [        [        R                  " 5       5      S.WSS[        S.S9nU$ ! , (       d  f       NQ= f)Nr)issiatES256)algkid)	algorithmheaders)	openAPNS_AUTH_KEY_PATHreadjwtencodeAPNS_TEAM_IDinttimeAPNS_KEY_ID)fsecrettokens      /Users/waleedhassanin/Documents/snowflake_co_dev_github/snow_flake_back_end_deploy/mama_care_api/mama_care_notification/apns.pygenerate_jwtr      s`    	 #	&! 
' JJS%564	E L 
'	&s   A--
A;c                 "   [        5       nSU  3n[        (       d  SU  3nSU 3[        SS.nSXS.SS	.0nS nS n[        R                  " S
S9 n	U	R                  XEUS9n
U
R                  nU
R                  nS S S 5        g ! , (       d  f       g = f)Nz,https://api.sandbox.push.apple.com/3/device/z$https://api.push.apple.com/3/device/zbearer alert)authorizationz
apns-topiczapns-push-typeaps)titlebodydefault)r   soundT)http2)r   json)r   APNS_USE_SANDBOXAPNS_BUNDLE_IDhttpxClientpoststatus_codetext)device_tokenr   r    r   urlr   payloadstatusr+   clientr   s              r   send_push_notification_iosr1      s    NE8
GC4\NC #5'*$!G 	$3
G FD	D	!VKK7K;vv 
"	!	!s   )B  
B)r   r   requestsr'   mama_care_api.settingsr   r1        r   <module>r6      s        $
r5   