Post not yet marked as solved
I'm trying to use StoreKit testing in XCode, but not work. It go through all steps in iPhone side on the purchase workflow e.g. prompt that telling me the purchase won't charge me as it is for testing only (purchase a consumable item through our app) but it fail finally. The problem is we follow Apple workflow: iphone post the receipt to our server and our server will send the receipt to https://sandbox.itunes.apple.com/verifyReceipt for validation, however, we receives a non-zero status value from apple (21002). Any idea what we missing in setup ?
Post not yet marked as solved
XCode Version: 15.0 (15A240d)
macOS version: 13.6 (22G120)
I have an OpenSSL.xcframeworks (headers and .a included for different platforms e.g. iOS, iOS simulator on arm64/x86) included in my xcode project folder: Frameworks. It run without issues on iPhone device or iPhone simulator, however, when submit to AppStore Connect, it fail with
Upload failed with errors:
"Invalid bundle structure, ???.a file is in Frameworks directory, but the Swift runtime libraries are the only files permitted in that directory"
How to solve the issue ?
Post not yet marked as solved
Under watchOS10, seems like Apple Watch always uses watch GPS and cannot use iPhone's GPS, previously developer somehow can use either Apple Watch or iPhone's GPS, when iPhone is around the Watch and if developer choose to use iPhone's GPS, then iPhone's GPS will be used in watch app. However, watchOS10 behavior is different where Watch's GPS is always used. Is it the new behavior for watchOS10 ?
Post not yet marked as solved
in https://developer.apple.com/passkeys/ "What’s new", it mentions "Password manager apps can save and offer passkeys on iOS, iPadOS, and macOS." Does it means Apple provide api for developer to do that?
Post not yet marked as solved
"for try await dataArray in bsm.deviceMotionUpdates()" generate error: Error Domain=CMErrorDomain Code=109 "(null)"
Environment
iOS 17.0 (21A5277j)
watchOS 10.0 (21R5295g)
XCode 15.0 beta 4 (15A5195m)
Mac Studio 2022, macOS 13.4.1 (22F82)
Details
I create a swift project with code:
File 1:
let healthStore = HKHealthStore()
var workoutSession: HKWorkoutSession!
func workoutSession(_ workoutSession: HKWorkoutSession, didChangeTo toState: HKWorkoutSessionState, from fromState: HKWorkoutSessionState, date: Date) {
}
func workoutSession(_ workoutSession: HKWorkoutSession, didFailWithError error: Error) {
}
func requestAuthorization() {
// The quantity type to write to the health store.
let typesToShare: Set = [
HKQuantityType.workoutType()
]
// The quantity types to read from the health store.
let typesToRead: Set = [
HKQuantityType.quantityType(forIdentifier: .heartRate)!,
HKQuantityType.quantityType(forIdentifier: .activeEnergyBurned)!,
HKQuantityType.quantityType(forIdentifier: .distanceWalkingRunning)!
]
// Request authorization for those quantity types
healthStore.requestAuthorization(toShare: typesToShare, read: typesToRead) { success, error in
// Handle error.
}
}
// before call startWatch(), will request authorization to access Healthkit
func startWatch(_ startWatchFor:Int) -> MotionManager? {
let configuration = HKWorkoutConfiguration()
let motionMgr: MotionManager?
configuration.activityType = .golf
configuration.locationType = .outdoor
do {
workoutSession = try HKWorkoutSession(healthStore: healthStore, configuration: configuration)
workoutSession.startActivity(with: Date())
} catch {
// Handle any exceptions.
return nil
}
workoutSession.delegate = self
... // in turn, a func startUpdates() in another swift file will be called.
}
File 2:
var batchedSensorManager: Any?
@available(watchOSApplicationExtension 6.0.0, *)
func batchedSensorUpdates() async {
if #available(watchOSApplicationExtension 10.0, *),
let bsm = batchedSensorManager as? CMBatchedSensorManager {
bsm.startDeviceMotionUpdates()
do {
for try await dataArray in bsm.deviceMotionUpdates() {
if !processDMEntry {
break
}
... // process data
}
} catch let error as NSError {
print("batchedSensorManager.deviceMotionUpdates() fail", error.description)
}
}
}
Post not yet marked as solved
I run a Xcode project (designed for ipad) to M1 Mac and want to know how to delete the app like I did on an iPhone device so that next time I run the project on M1 Mac again will like a new install. (without any saved values in usersdefault)
Post not yet marked as solved
Due to COVID-19 pandemic, I need to work from home.
I'm using remote desktop to access my office iMac and ad hoc distribute iOS app using web deploy on my iPhone. However, is it possible to get the debug console output messages ? (those messages are printed out from my iOS app, before they are viewed in XCode's debug console)