Post

Replies

Boosts

Views

Activity

Issue to create a location push service extension
I'm trying to implement the Location Push Service Extension in my app. I added a new target => "Location Push Service Extension" and a new subclass appeared "LocationPushService" In this class I have 4 methods: didReceiveLocationPushPayload serviceExtensionWillTerminate locationManager( .... didUpdateLocations ...) locationManager(... didFailWithError ....) When I try to run the app, I never enter into any of those method. I sent a notification through Firebase, here the content of it: to: <token>, notification: { title: "Test notification for location", body: "Test notification", sound: "default" } Am I forgetting something? Should I add something in the payload of the notification or in my code app? Also the CLAuthorizationStatus.authorizedAlways is activated. Thank you
0
0
670
Oct ’22
Background Task After Receiving A Notification
Right after I receive a notification I want to execute a background task. I'm using firebase to receive notification. I can receive notification successfully with 'UNUserNotificationCenter' in the AppDelegate file. Now my goal is to send a "GET" - "PUT" request, right after I received a notification (only when the app is in background) I saw the documentation about Background Tasks: https://developer.apple.com/documentation/backgroundtasks But I can't found a way to execute a background task right after I receive a notification. Is anyone has any suggestion about that? Thank you
6
0
2.9k
Jun ’22
Add pem certificate in URLSession to call Phillips Hue device API
phillips-hue-cert.txt Accidentally close: https://developer.apple.com/forums/thread/707263 I want to connect to a Phillips Hue Api (something like that: https://<ip_address>/clip/v2/ressource/device). The issue is that on the software Postman (to test), Phillips Hue says to disable "SSL Certificate Verification". When I try to call with URLRequest in my app the same url, using URLSessions, I get this error: Domain=kCFErrorDomainCFNetwork Code=-1202 NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “<ip_address_of_Hue_bridge>” which could put your confidential information at risk. I read those articles: https://developer.apple.com/forums/thread/67493 https://developer.apple.com/forums/thread/67493 I don't want to disable all HTTPS server trust evaluation, it’s super insecure. I want to customise the trust evaluation to let the connection through to be as secure as possible. But I don't really know how to do this with URLSession or another thing if needed. Phillips Hue is giving what looks like a pem certificate (see in attachements). I don't know how to implement this in my URLSession request. Thank you for your help
6
0
3.3k
Jun ’22
URLRequest add certificate .cert for Hue light
Hello, I'm trying to control my Phillips hue lights from my app. Anyway they have an Api where we can control all of that. The issue is that on the software Postman (to test) they say to disable "SSL Certificate Verification". When I try to call with URLRequest in my app the same url which is: "https://<ip_address_of_Hue_bridge>/clip/v2/resource/device" well, I get this error: Domain=kCFErrorDomainCFNetwork Code=-1202 NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “<ip_address_of_Hue_bridge>” which could put your confidential information at risk. On the the Phillips Hue Developer portal they gave me something that look like the .cert certificate, but I don't know how to use it with Xcode. Thank you for your help
6
0
1.8k
Jun ’22