Posts

Post not yet marked as solved
1 Replies
106 Views
If I'm talking to a Bluetooth (BLE) device using the Core Bluetooth functions, and I need to send or receive multiple packets (such as if I need to communicate a large message) is it guaranteed that the packets will arrive in the same order they were sent?
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
134 Views
My company did an app for a customer 10 years ago. The app has in-app purchases (not subscriptions). It is an Objective-C code base. Over the years we've done minor updates to this app in order to keep it in compliance, but no major overhaul. The app has been pretty reliable in the past, but recently my customer is getting a flood of complaints from users who say their in-app purchases disappear and can't be restored. It's happening too often to just be a case of bad internet connection or similar issue. The only thing that seems to be consistent is that it's never US-based users. Whenever I test this app using sandbox accounts, I cannot reproduce the problems that are being reported. I'm always able to make purchases and restore them after reinstalling the app, or restore them to a different device. The content associated with the purchases always downloads correctly, even if I intentionally interrupt and restore internet access. What can I do to figure this out? Should an IAP based app from 2014 be expected to work correctly today? Are there new legal issues with non-US app stores that we need to be aware of? I realize there isn't a lot to go on here, but I don't have any more information. Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
140 Views
I'm trying to use CMAcceleration data in my app to detect when the user is doing certain kinds of activities. The problem I'm having is that the acceleration data for the same user motions is different depending on how they are holding their phone. I don't care about the orientation of the phone, I just care about the overall motion of the person holding it. I've researched and tried a whole bunch of ways to correct the data for phone orientation, such as rotating the acceleration using the CMAttitude rotation matrix, removing the effect of gravity with a series of calculations, and doing both of these in both orders. I can't seem to come up with something that works. I think there has to be some solution since iOS can do things like step counting which I assume doesn't depend on the orientation of the phone. Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
3 Replies
151 Views
I'm not getting any values from the floorsAscended or floorsDescended properties of CMPedometerData. I tested it by walking up and down a flight of stairs twice while monitoring for pedometer updates for 60 seconds. I also queried for the pedometer data separately at the end of the time period in case there were any updates I missed. I'm using an iPhone 13 pro for my tests and I did check to make sure CMPedometer.isFloorCountingAvailable() is true, and I am getting other kinds of pedometer data such as distance, pace, and steps. Is there something else I need to do in order to enable floor counting? Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
1 Replies
170 Views
I'm working on a screen where the goal is for the user to walk for 6 minutes while the app times them and measures the distance walked. I'm using CMPedometer to track the walking distance and a repeating 1-second Timer to count down the time. This works fine as long as the app is in the foreground, but I'd like my user to be able to lock their phone and put it away while they walk. I used UIApplication.shared.beginBackgroundTask, but it doesn't provide enough time. It usually only gives me around 30 seconds. I also tried calling UIApplication.shared.beginBackgroundTask again or calling it once every time the timer ticks, with no better result. How can I accomplish my goal here?
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
127 Views
I cannot get CMMotionActivityManager.startActivityUpdates() to work. I have given my app permission to use core motion and also put the required description key into my Info.plist file. I am expecting my user to walk. I call startActivityUpdates() and then stand up and start walking. I typically get about 3 callbacks within a couple of seconds, all of which have "false" set for all of the activity flags, even "unknown". Then after that I get nothing. I can't figure out what I could possibly be doing wrong here. The code is really simple. I looked at doezens of examples and my code is doing the exact same things.
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
164 Views
I need to test my app's in-app purchases and I am having a very difficult time with it. I created a "Sandbox" account in App Store connect. Doing so was very frustrating. It told me multiple times that my password was "too simple", without ever explaining what the password rules are. Then it emailed me something so I could "validate" the account. Luckily I used an actual email address that I can receive mail on. I was expecting I could use any fake address since this is a Sandbox account. After that I started an iOS simulator and tried to log in. It immediately asked me to turn on two-factor authentication. I declined, and then it just said "User name or password is incorrect". I tried a couple more times, then I went back and actually turned on the two factor auth. But that didn't solve the problem. I still cannot log in. Can someone explain what I'm doing wrong here?
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
183 Views
I'm building a physical therapy app and as part of it, I want the app to oversee and measure certain exercises that the user will do. I'm not sure if I should use Core Motion, location services, or something else. These are the specific things we want to measure: The user walks for 6 minutes. At the end of it, we tell them how far they walked. The user runs for 30 seconds. We tell them their average speed and peak speed. The user does a broad jump: basically just jumping forward as far as they can. We want to measure the distance jumped. I'm thinking location services might work for #1 but I doubt it will be accurate enough for #2. For #3 I thought I could do this with the accelerometer if I took readings at short intervals and combined them with something like the trapezoidal rule, but I can't get this to produce a reliable result. Let me know what you think, thanks.
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
1 Replies
203 Views
I often get crash logs where nothing in the stack trace is my code, other than an entry point in main. I don't know how to use these to figure out where the problem is. For example this one, Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x1c21cf180 __exceptionPreprocess + 228 (NSException.m:172) 1 libobjc.A.dylib 0x1c13a79f8 objc_exception_throw + 56 (objc-exception.mm:557) 2 UIKitCore 0x1ee572b1c -[UINavigationController pushViewController:transition:forceImmediate:] + 2312 (UINavigationController.m:7317) 3 UIKitCore 0x1ee5720b0 -[UINavigationController pushViewController:animated:] + 664 (UINavigationController.m:7272) 4 UIKitCore 0x1ee62ae9c -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 264 (UIViewControllerTransitioning.m:1121) 5 UIKitCore 0x1ee62725c -[_UIViewControllerTransitionContext _runAlongsideCompletions] + 140 (UIViewControllerTransitioning.m:374) 6 UIKitCore 0x1ee626f34 -[_UIViewControllerTransitionContext completeTransition:] + 132 (UIViewControllerTransitioning.m:286) 7 UIKitCore 0x1ee6371f4 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke.118 + 740 (_UINavigationParallaxTransition.m:393) 8 UIKitCore 0x1ef032d1c -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 752 (UIView.m:12852) 9 UIKitCore 0x1ef009a74 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 312 (UIView.m:0) 10 UIKitCore 0x1ef00a048 -[UIViewAnimationState animationDidStop:finished:] + 296 (UIView.m:2111) 11 UIKitCore 0x1ef00a0e8 -[UIViewAnimationState animationDidStop:finished:] + 456 (UIView.m:2130) 12 QuartzCore 0x1c671f3c8 CA::Layer::run_animation_callbacks(void*) + 284 (CALayer.mm:6680) 13 libdispatch.dylib 0x1c1c0d7d4 _dispatch_client_callout + 16 (object.m:511) 14 libdispatch.dylib 0x1c1bbb008 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068 (inline_internal.h:2441) 15 CoreFoundation 0x1c2160b20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1813) 16 CoreFoundation 0x1c215ba58 __CFRunLoopRun + 1924 (CFRunLoop.c:3113) 17 CoreFoundation 0x1c215afb4 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247) 18 GraphicsServices 0x1c435d79c GSEventRunModal + 104 (GSEvent.c:2245) 19 UIKitCore 0x1eeba7c38 UIApplicationMain + 212 (UIApplication.m:4353) 20 therapeutic-listening 0x100b83380 main + 88 (main.m:16) 21 libdyld.dylib 0x1c1c1e8e0 start + 4 (:-1) Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001c1d6b0dc __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x00000001c1de4094 pthread_kill$VARIANT$mp + 380 (pthread.c:1492) 2 libsystem_c.dylib 0x00000001c1cc3ea8 abort + 140 (abort.c:94) 3 libc++abi.dylib 0x00000001c1390788 abort_message + 132 (abort_message.cpp:75) 4 libc++abi.dylib 0x00000001c1390934 default_terminate_handler() + 308 (cxa_default_handlers.cpp:68) 5 libobjc.A.dylib 0x00000001c13a7e00 _objc_terminate() + 124 (objc-exception.mm:693) 6 libc++abi.dylib 0x00000001c139c838 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:66) 7 libc++abi.dylib 0x00000001c139c8c4 std::terminate() + 84 (cxa_handlers.cpp:97) 8 libdispatch.dylib 0x00000001c1c0d7e8 _dispatch_client_callout + 36 (object.m:514) 9 libdispatch.dylib 0x00000001c1bbb008 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068 (inline_internal.h:2441) 10 CoreFoundation 0x00000001c2160b20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1813) 11 CoreFoundation 0x00000001c215ba58 __CFRunLoopRun + 1924 (CFRunLoop.c:3113) 12 CoreFoundation 0x00000001c215afb4 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247) 13 GraphicsServices 0x00000001c435d79c GSEventRunModal + 104 (GSEvent.c:2245) 14 UIKitCore 0x00000001eeba7c38 UIApplicationMain + 212 (UIApplication.m:4353) 15 therapeutic-listening 0x0000000100b83380 main + 88 (main.m:16) 16 libdyld.dylib 0x00000001c1c1e8e0 start + 4 (:-1)
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
4 Replies
4k Views
I'm confused about the SF Pro fonts. Can these be used in our apps? I tried pasting characters from SF Pro into a label, but was unable to get them to display properly. "SF Pro" doesn't appear in the list of available fonts in Xcode. If these are not intended to be used by app developers, then what is their purpose? Are "SF Symbols" different that SF Pro? What about the list of icons that appears in the "Symbols Library" in Xcode? There are so many different sources of symbols and icons, it is very confusing. If any of these sources is OK to use in an iOS app, is it also OK to export them for use in the event that business needs require me to create an alternate version of my app for some hypothentical non-iOS platform? Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
9 Replies
3.3k Views
Hi,I'm having two problems using the scheduleBuffer function of AVAudioPlayerNode.Background: my app generates audio programatically, which is why I am using this function. I also need low latency. Therefore, I'm using a strategy of scheduling a small number of buffers, and using the completion handler to keep the process moving forward by scheduling one more buffer for each one that completes.I'm seeing two problems with this approach:One, the total memory consumed by my app grows steadily while the audio is playing, which suggests that the audio buffers are never being deallocated or some other runaway process is underway. (The Leaks tool doesn't detect any leaks, however).Two, audio playback sometimes stops, particularly on slower devices. By "stops", what I mean is that at some point I schedule a buffer and the completion block for that buffer is never called. When this happens, I can't even clear the problem by stopping the player.Now, regarding the first issue, I suspected that if my completion block recursively scheduled another buffer with another completion block, I would probably end up blowing out the stack with an infinite recursion. To get around this, instead of directly scheduling the buffer in the completion block, I set it up to enqueue the schedule in a dispatch queue. However, this doesn't seem to solve the problem.Any advice would be appreciated. Thanks.
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
1 Replies
315 Views
Is there any way an account owner can authorize a different user to accept updated license agreements? I manage multiple apps on behalf of customers, most of whom fail to accept these agreements until the day they need me to publish a new app and I have to hunt them down and ask them to do it. If it were one or two customers it wouldn't be a big deal, but I have nearly 40 of them, and this happens several times per year. It's a major hassle.
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
5 Replies
8.7k Views
I've always understood it to be the case that apps could permit users to log in or use a code to access paid content, as long as the app did not direct the user to an external web site to make a purchase. For example, apps like Netflix or Kindle.My app isn't even doing anything close to this. I have an app in which digital content is unlocked via in-app purchase. Occasionally I give away promo codes that allow a user to unlock one free piece of content. These codes can only be used once, and are distributed in very limited numbers on cards, in person, at events like trade shows.My app has been in the store for about four years using this method. This week I attempted to publish a small bug-fix update, and was flagged by Apple and told that my use of Promo Codes in this manner violates the rules.What happened here? Did Apple misunderstand what my app is doing? Did the rules change recently and I was unaware of the change? Has this always been against the rules, but either Apple didn't enforce it before or they never reviewed my app thorougly enough to find it?Thanks,Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
3 Replies
971 Views
I'm working on a BLE app with a hardware partner using samples of their device, which I am able to erase and re-flash when needed. When I try to use the device it initially works fine. I can connect to it, make requests, and get back responses. However, after a short time and a few successful runs, I start getting the error "Encryption is insufficient". The error is seen in the "didUpdateValueFor" function. I can still connect to the device, and enumerate all of its services and characteristics, but I can't read any data. If at this point I re-flash the device and also go into the iOS setting app and "forget" it, then I can use the device normally again, at least for a while. What causes this? Is there a way I can fix it in my app? Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
2 Replies
1.6k Views
I have chronic problems with the connection between Xcode and my phone. I plug the phone in and Xcode says "Waiting for phone to unlock", but the phone is already unlocked. I try locking and unlocking it, but nothing happens. If I can get past this problem by disconnection and reconnecting the phone a couple of times, it gets into the "downloading symbols" phase and never gets out of it. Finally, even though I have checked the "Connect via network" option, it never works, and I can never connect unless I plug in the phone with a USB cord (yes, the phone and the computer are on the same Wifi network). Some days this is just an annoyance, but some days (like today) I really need to test something on my phone for a customer who's waiting for it, and I cannot. The thing I'm trying to test involves sending text messages so I can't use the simulator or even an iPad. What can I do to debug this problem?
Posted
by flarosa.
Last updated
.