Hi everyone,
I’m working on an iOS app and I need to implement background fetch to periodically update data even when the app is in the background. I’ve enabled Background Fetch in the capabilities, but I’m not sure how to properly set up the fetch intervals and ensure reliable data updates without draining too much battery.
What’s the best approach to set the frequency of background fetches?
Are there any specific best practices to optimize battery usage while using background fetch?
Is there a way to ensure the fetch runs more frequently for time-sensitive data?
Any advice or code examples would be greatly appreciated!
Thanks in advance for your help.
Apple Developers
RSS for tagThis is a dedicated space for developers to connect, share ideas, collaborate, and ask questions. Introduce yourself, network with other developers, and foster a supportive community.
Post
Replies
Boosts
Views
Activity
After updating from iPadOS 17 to iPadOS 18 about three four months back iPad is not allowing third party video in full screen mode. While same video iPhone plays good in full mode and pip mode.
The restart and clearing safari “history and website data“ ( settings> app>safari) it is still not working.
When I call a number, it rings for them but when they pick up, we can't hear each other.
I get this in my logs:
🎤 Audio Route Changed: AVAudioSessionRouteChangeReason(rawValue: 3)
❌ Error handling route change: Error Domain=NSOSStatusErrorDomain Code=1701737535 "Session activation failed"
what does that code actually mean?
Extremely disappointed and super frustrated with this update. Please fix the issue where videos that are being recorded are corrupt! I’m a content creator and this is ruining my videos that I can’t record nor recover. There’s a whole Reddit thread on this happening to people. Don’t know why the photos app was touched to begin with.
The disaster of upgrading from iphone12 pro to ios18 is as follows:
The original charging cable worked intermittently. Only by adjusting many angles and even recessing the cable could charging be possible. After charging for a long time, it didn't charge at all. This has never been seen before the upgrade!
I want to adjust the flight mode at any time, but I have to go through facial recognition to adjust it. This is something I haven’t seen before the upgrade! It’s very annoying.
Connect the mobile phone to the computer to organize the photos in the photo album. Because of the upgrade to ios18, there is a problem with charging, so the photo album cannot be read at all. This is something that has never been seen before the upgrade!
Is there a downgrade mode?
Your team's upgrade was a disaster. I swear this is my first iPhone and it will be my last.
Here are some reasons why Apple should consider an update to enhance message refreshing and chat sharing on WhatsApp, making it smoother across both iPhone and Android:
Cross-Platform Compatibility
• Problem: Right now, switching between iPhone and Android on WhatsApp can result in lost messages or complicated backup processes due to differences in operating systems and data formats.
• Impact: A universal update allowing seamless message refresh and sharing would bridge the gap between iOS and Android. Users could switch devices without losing conversation history, making the experience more fluid and inclusive for both iPhone and Android users.
Enhanced Data Security and Privacy
• Problem: Many users rely on third-party methods to back up or transfer WhatsApp chats, which can pose privacy risks.
• Solution: A unified system from Apple (and Android) could ensure that all backups and chat transfers are encrypted, keeping data private and secure, aligned with each platform’s commitment to data protection.
• Impact: This would reduce security concerns for people using their devices for sensitive communications, such as business transactions or personal matters.
Peace of Mind for Users
• Problem: Many users worry about losing important messages when they upgrade their phones or change their operating systems.
• Solution: An update that includes auto-refresh and universal chat-sharing across backups would make sure conversations and media are always accessible, no matter the device.
• Impact: This peace of mind would lead to higher user satisfaction and reduce anxiety about data loss, enhancing WhatsApp’s reliability as a communication platform worldwide.
Improved User Experience and Retention
• Problem: The complexity of transferring chats between iOS and Android devices can push users to avoid switching or even consider alternatives to WhatsApp.
• Solution: With a streamlined message and chat-sharing experience, users would find it easier to stay connected on WhatsApp, regardless of the device.
• Impact: This could increase user retention and trust, making WhatsApp more indispensable as a global messaging platform.
Greater Accessibility for Global Users
• Problem: Many users globally use WhatsApp for family, work, and community connections, especially in areas where it is the primary communication tool. Losing messages or finding backup systems challenging can cause disruptions.
• Solution: A message refresh and sharing update would support seamless transitions and backups, making WhatsApp more accessible and consistent.
• Impact: This would support worldwide connectivity, especially in regions where WhatsApp is a lifeline for communication, fostering inclusivity and reducing digital barriers.
Future-Proofing for Technological Advancements
• Problem: As technology advances, the gap between iOS and Android compatibility could widen if not addressed now.
• Solution: An update that includes flexible chat-sharing and message-refreshing capabilities would keep Apple and Android devices aligned and prepared for future features or communication needs.
• Impact: This proactive approach ensures that WhatsApp remains relevant, adaptable, and future-ready for global users as both platforms evolve.
Overall, this update could foster better communication, security, and user satisfaction worldwide. It would also help Apple and WhatsApp strengthen their roles as leaders in secure and universal messaging solutions.
I’m need invitation code to play Minecraft
Can someone give me a TestFlight code, I just wanna beta-test in peace without bullsh8 codes
I just got a notification that my photos have not been backed up for 21 days. It has only been 7.
I'm using Thunderbolt 4 connection to my Macbook M4 14inch but am missing this resolution: 3840x1620 HiDPI (7680x3240). Any guidance to resolve this would be greatly appreciated.
After updating my phone to iOS 18
I have a Malibu Chevrolet 2019 trying to use CarPlay but it’s not working at all in this update. It was working fine before please help.
Has anyone else noticed that there are two different volume levels now ?
When I call for an advisor, the IVR (AI introduction sounds fine.
When the advisor or any other call speaks, i'ts so low I have to put it to my ear.
Hello,
I am seeking inputs on a recent news received from Apple on "Apple Push Notification service server certificate update". Link: https://developer.apple.com/news/?id=09za8wzy.
We have some apps which uses Firebase push notifcation and Amazon SNS services. Since these are managed services, isn't it the responsibility of provider server to update the root certificate. Need someone to confirm. What about the applications which uses local servers?
When I upgraded to iOS 18 beta, I don’t recall setting a screen time passcode, however one is set. I am locked out from changing the passcode. I have clicked “forgot passcode” down at bottom but it doesn’t do anything. I am the only user on this phone. I am currently running iOS iOS 18.2 (22C5125e). Please advise, as screen time is locked and cannot be viewed nor change passcode
Okay, so this seems like a silly thing to ask, but in the past couple days when I start up my ipad there is an icon or a button on the left hand side of the screen which is about the size of a regular icon. It only appears before pulling up the passcode screen for the first time and subsequently disappears. It seems to only appear when using one of the default solar system wallpapers. It is always mostly transparent but it changes color depending on which planet is being used eg reddish brown for Mars or yellowish brown for Saturn etc. it also moves position based on which wallpaper is being used. The button has no icon or any other features. Tapping on the button causes it to blink as if it was pressed, but nothing else happens. Just curious what this button or icon is.
I am making app which one of functionality is register user with firebase, but sometime when I register user I got app crash but user is added into db.
I am getting error like this: EXC_BAD_ACCESS (code=2, address=0x2600000000) or adres = 0x10 which mean the is some memory leak but when I use instrumental leak every thing is ok.
Second weird thing is that when I use instrumental leak I am not getting error (I added something like 40 users) but when I close instrumental and rebuilt I got crash in max 3 attempts.
// FormComponent.swift
// SpaceManager
//
// Created by Kuba Kromomołowski on 17/04/2024.
//
import Foundation
import SwiftUI
struct FormComponent: View {
var isRegister: Bool = true
@State private var repeatedPassword: String = ""
@StateObject private var loginHandler = LoginViewModel()
@StateObject private var registerHandler = RegisterViewModel()
@EnvironmentObject var permissionViewModel: PermissionViewModel
var body: some View {
Form {
TextField("Email", text: isRegister ? $registerHandler.email : $loginHandler.email)
.textFieldStyle(RoundedBorderTextFieldStyle())
.font(.system(size: 25))
.multilineTextAlignment(.center)
.autocapitalization(.none)
.disableAutocorrection(true)
SecureField("Hasło", text: isRegister ? $registerHandler.password : $loginHandler.password)
.textFieldStyle(RoundedBorderTextFieldStyle())
.font(.system(size: 25))
.multilineTextAlignment(.center)
.autocapitalization(.none)
.disableAutocorrection(true)
if (isRegister) {
SecureField("Powtórz haslo", text: $registerHandler.repeatedPassword)
.textFieldStyle(RoundedBorderTextFieldStyle())
.font(.system(size: 25))
.multilineTextAlignment(.center)
.autocapitalization(.none)
.disableAutocorrection(true)
}
BtnClearComponet(btnText: isRegister ? "Zarejestruj się" : "Zaloguj się",
btnRegister: isRegister,
action: {
if isRegister {
registerHandler.registerUser() {
permissionViewModel.getPermission()
}
} else {
loginHandler.userLogin() {
permissionViewModel.getPermission()
}
}
},
loginHandler: loginHandler,
registerHandler: registerHandler
)
.padding(.bottom, 5)
}
.frame(width:350,height:400)
.scrollContentBackground(.hidden)
.padding(.top, 50)
}
}
//
// RegisterViewModel.swift
// SpaceManager
//
// Created by Kuba Kromomołowski on 03/05/2024.
//
import Foundation
import Firebase
import FirebaseAuth
import FirebaseFirestore
class RegisterViewModel : ObservableObject {
@Published var email: String = ""
@Published var password: String = ""
@Published var repeatedPassword: String = ""
@Published var isFail: Bool = false
@Published var message: String = ""
func registerUser(completion: @escaping () -> Void) {
if(!validInput()){
return
}
Auth.auth().createUser(withEmail: email, password: password) { [weak self] res,
err in
guard let self = self else { return }
if let err = err {
self.isFail = true
self.message = "Błąd przy rejestracji \(err.localizedDescription)"
return
}
guard let userID = res?.user.uid else {
return
}
// DispatchQueue.main.async {
// print("Starting adding...")
self.addIntoDatabe(userID: userID, email: self.email)
// }
completion()
}
}
private func addIntoDatabe(userID: String, email: String) {
let newUser = User(uid: userID, email: email, permission: Permission.Admin, itemReads: [["Prop":2]],
numberOfAddedItem: 0, numberOfReadItem: 0)
let db = Firestore.firestore()
db.collection("users")
.document(userID)
.setData(["uid": newUser.uid, "email": newUser.email, "permission": newUser.permission.rawValue, "itemReads": newUser.itemReads, "numberOfAddedItem": newUser.numberOfAddedItem, "numberOfReadItem": newUser.numberOfReadItem])
print("User has been added into db")
}
}
I joined the waitlist for the early access as soon as I updated to the 18.2 beta, I’ve now installed the 18.2 beta 2 but still have no access. I can see the app when I swipe down the from the early access requested but it still closes the app straight away. Anyone else still having trouble getting access?
I’m a novice developer seeking insight from those more experienced. My goal is to buils an app UI platform for a streaming series and content + games tethered to a new crypto asset in development. I know this has been done on the App Store with products like Axie Infinity (Ronin/ETH currency) and am also looking over the Hedera white paper.
Gaming is easily the most substantive case use for crypto currency, I’m just interested in what are the challenges to integration and if anyone has other examples or thoughts on the topic. Specifically tied to products developed for the Apple platform. What’s the playbook?
cheers
Hello,
After upgrading to iPad OS 18.1, Rest Finger To Open not working on my device - which is an 9th-generation iPad (10.2 inch) - anymore, now I have to actually press the Home button, only then I can unlock the screen with Touch ID. It was fine on iPad OS 17, where I just need to rest my finger on the Touch ID (or Home button) and it would unlock the device right away, no need to press.
I'm sure all the required settings have been checked (please check out the screenshots). Not sure if anyone else is facing this. Hope it's not only me.
Please take a look at this and fix it if it's a genuine issue.
Thank you.
Dear Apple Developer Team,
After installing the iOS 18.2 Beta, I encountered a language inconsistency in the iCloud interface. Although my system language is set to Traditional Chinese, the iCloud section in Settings now displays in Simplified Chinese. This issue only affects the iCloud page, as other sections retain the correct language setting.
I kindly request that you address this issue by providing a fix, either through an executable update or an upcoming Beta release. A timely solution would help improve the beta experience for users who rely on specific language settings.
Thank you for your attention.