Post

Replies

Boosts

Views

Activity

Action Extension Memory Limit Crashes
I have an app with an action extension that takes a photo (the app only) or grabs a photo from a 3rd-party app or within the app itself, e.g. Photos, adds an imprint, e.g. date, and then adds a new photo to an album, Camera Roll. The app itself has no issue doing that for any photo in any app (lots of memory). But the extension crashes when the original photo is over ~8mb with some hard memory limit (120mb). But when I watch the memory use, it stays around 20mb, and when I initiate the stamped overlay, it briefly goes to 80mb, and then back down to 20mb and then crashes.The error is EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=120 MB, unused=0x0). Finally, I found that problem resides in a method where I add the imprint by drawing the original image in a graphic context using drawInRect: and then drawing the overlay into the same context and converting it to a UIImage and returning that to the caller. The app crashes at drawInRect: with vImage`_ERROR_Buffer_Write__Too_Small_For_Arguments_To_vImage__CheckBacktrace:With larger megapixel phones, this has caused me to remove my app from the App Store, and It sure doesn't seem like I've broken any programming rules.Does anyone know how to fix this kind of issue/crash?
3
0
10k
Apr ’19
Dealing with Loss of Force Touch in watchOS 7
I'm an Objective C relic (don't do Swift) with an iPhone app with a Watch app that I haven't had to touch for 2 years (because it just works) and has worked with WatchOSs 1-6 but now is broken because I used one Force Touch menu item in three paged views each with three pickers (just a spinner on opening). Basically, the app is a calculator using dates and the menu item simply lets the Watch user set the date to Today with one tap instead of fiddling with three pickers. I've watched the 2020 WWDC video "What's New in watchOS Design". It looks like the best fit would be a toolbar button on top but that is only available in OS 7. Many users can't have OS 7 on a 1st Gen Watch. I thought I could create a home-brew replica but found there is not a scroll view in watchOS before 7 to even place a button. The next best thing would be something like a More button but I can't figure out how to add/overlay a button (leading to a modal) in a lower corner (no constraints or auto layout in watchOS) without running into trouble with curved screens and different sized faces. So, I would be interested in any suggestions and help on how to resolve this for all watchOSs, or I guess I'll just remove this helpful functionality (which many probably do not even know is there because it's hidden).
0
0
471
Dec ’20
ellipses in WKInterfacePicker Items in Simulator
When I run my Watch app in the Xcode 12.2, MacOS 11.0.1 Simulator (any size watch) for an update the text in my three WKInterfacePickers are truncated with ellipsis, e.g. MONTHS Jul, A..., Sep DAYS 14,15,16, YEARS 20..., 20..., 20... I keep the Width "Relative to Container" specifying a percentage for each picker adding up to 1. The Height of the Group container is constant. With the same settings on my (only) hardware 1st Gen Watch watchOS 4.3.2, the titles/text are fine and complete. The ellipses are less frequent with the 44mm face though. It doesn't seem the titles/text adapt to their containers. Any ideas?
0
0
504
Dec ’20
WatchOS Complications for App Launch Only
I have read the disconnected documentation for adding a "simple" complication that ONLY launches my app using the asset images I've created in various sizes for various families along with the ComplicationController code, but the complications never appear (with no errors). I would like to support Watch Series 1 with OS 4.3 on up. There never seems to be one place where this simple, default function is documented. What are the steps and code required to just launch a Watch app from a complication?
1
0
1k
Dec ’20
Launch Screen Storyboard with Tab Bar Alone and in Split View
My 2015 universal app needing an update apparently needs a Launch Screen storyboard. The iPhone app (for smaller phones in portrait and landscape) is basically a tab bar controller connected to several navigable table view controllers displaying first a topics table page and then details. For larger iPhones and iPads, this is all done programmatically in my code and becomes a split view with a column for topics and a larger area for details. The current app uses dozens of screen shots for each device and orientation. With Xcode 12, I'm at a loss of how to create a single launch screen that will display the tab bar controller and an empty table (which was easy), yet magically move the tab bar controller to the left and the details on the larger area on the right for a split view. Is there any documentation/videos/tutorials of how to manage this? If it was just iPhones and iPads I could make two launch storyboards but I don't know how to include large iPhones.
0
0
655
Dec ’20
UITableViewAlertForLayoutOutsideViewHierarchy Message?
Updating an older iOS/WatchOS app, received this warning after a symbolic breakpoint, with Xcode 12.4. I thought I understood the message (below) but when I checked (ObjC, storyboard), there's the view - safety area - and my TableViewController with the TVC constraints all limited to the safety area. I have no clue what how to eliminate this, OR if I even have to. If I disable the breakpoint, the app works perfectly on my iPhone X 13.4 and the simulators with no other warnings or messages. Does this message have to be addressed, and if it does, how do I inspect and fix it? 2021-02-17 10:46:06.461895-0600 OBWheelPro7[34829:9634118] [TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: UITableView: 0x10301e200; frame = (0 0; 320 519); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = NSArray: 0x282650180; layer = CALayer: 0x282874160; contentOffset: {0, 0}; contentSize: {320, 176}; adjustedContentInset: {0, 0, 0, 0}; dataSource: xxCalculatorViewController: 0x10301d600 #0 0x000000019003a6b4 in UITableViewAlertForLayoutOutsideViewHierarchy () #1 0x00000001900397f4 in -[UITableView _updateVisibleCellsNow:] () #2 0x000000019004c980 in -[UITableView _cellForRowAtIndexPath:usingPresentationValues:] () #3 0x000000019004c864 in -[UITableView cellForRowAtIndexPath:] () #4 0x000000018fde35d8 in __61-[UIPickerTableView selectRow:animated:notify:updateChecked:]_block_invoke.216 () #5 0x0000000190355704 in +[UIView(Animation) performWithoutAnimation:] () #6 0x000000018fde31e0 in -[UIPickerTableView selectRow:animated:notify:updateChecked:] () #7 0x000000018fdea748 in -[UIPickerView _selectRow:inComponent:animated:notify:] () #8 0x000000018fddd710 in -[_UIDatePickerView _selectRow:inComponent:animated:notify:] () #9 0x000000018fdd3b38 in -[_UIDatePickerMode loadDate:animated:] () #10 0x000000018fdd7c74 in -[_UIDatePickerMode_DateAndTime loadDate:animated:] () #11 0x000000018fddd6b8 in -[_UIDatePickerView _loadDateAnimated:] () #12 0x000000018fddcfa4 in -[_UIDatePickerView didChangeDateFrom:animated:] () #13 0x000000018fddcc48 in -[_UIDatePickerView setData:] () #14 0x000000018fdcb584 in -[UIDatePicker _installPickerView:updatingSize:] () #15 0x000000018fdcbf7c in -[UIDatePicker initWithCoder:] () #16 0x00000001961c6edc in UINibDecoderDecodeObjectForValue () #17 0x0000000196153854 in -[UINibDecoder decodeObjectForKey:] () #18 0x000000018fa9d570 in -[UIRuntimeConnection initWithCoder:] () #19 0x00000001961c6edc in UINibDecoderDecodeObjectForValue () #20 0x00000001961c70f4 in UINibDecoderDecodeObjectForValue () #21 0x0000000196153854 in -[UINibDecoder decodeObjectForKey:] () #22 0x000000018fa984fc in -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] () #23 0x000000018fa9aed4 in -[UINib instantiateWithOwner:options:] () #24 0x000000018f796d88 in -[UIViewController loadView] () #25 0x000000018f797114 in -[UIViewController loadViewIfRequired] () #26 0x000000018f7977e8 in -[UIViewController view] () #27 0x000000018f6b339c in -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] () #28 0x000000018f6b2734 in -[UITabBarController transitionFromViewController:toViewController:] () #29 0x000000018f6aeec0 in -[UITabBarController _setSelectedViewController:] () #30 0x000000018f6aecd8 in -[UITabBarController setSelectedViewController:] () #31 0x0000000190355704 in +[UIView(Animation) performWithoutAnimation:] () #32 0x000000018f6a9be0 in -[UITabBarController _selectDefaultViewControllerIfNecessaryWithAppearanceTransitions:] () #33 0x000000018f6aab90 in -[UITabBarController viewWillAppear:] ()
0
0
985
Feb ’21
Cannot Save Xcode Project because of math.h Permissions???
In a MacOS Objective C project with Xcode 12.5.1, I tried to use max(). Received an error, and pressed "Fix" and I put #include math.h in a header. Subsequently, when I ran the project, I got two errors in a row saying "The document math.h cannot be saved...You don't have permission, etc." and when I press OK, I get the same message again. The instructions are open the file in the finder to change permissions. I don't have that file anywhere on my computer. So I deleted the include, removed the max() function and I still get the errors, although the project builds without other errors and the test app works. I've searched the project for any reference to math.h and found none. Now when I try to quit Xcode, I get an error that I don't have permission to write to the folder with math.h and choice is to Duplicate (what???) or OK. I choose OK and I cannot quit Xcode. So, how do I remove whatever this is with math.h to get back before I ever tried using max()???
1
0
1.7k
Jun ’21
Automator Action Testing Fails with Could Not Attach to PID
Creating an Automator Action in ObjC with Xcode 13.2.1 after following the method in Technical Q&A QA1885. The project builds without errors but testing stops with an error "Could not attach to PID XXXX" (see details below). It says to look in the Console for help "near the debugserver entries" and I don't know what that means or where that might exist. So, is there an update since 2015 on testing Automator actions? Or is there some other Xcode setting or privacy setting I need to set? Could not attach to pid : “15665” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)
2
0
1.5k
Feb ’22
evaluateJavaScript:completionHandler: Works on iPhone, not on iPad?
My app has HTML pages for content, and I have a button-triggered action to change the size of the text by using a set of functions that stepwise increases the WebKit webview text by changing the class of the document body (i.e."smallestText" = CSS webkit-text-size-adjust:80%) using the code below as the last step. On the iPhone simulator, this works perfectly but on the iPad simulator the text size does not change even though the functions are called, the javascriptString is correct, and the _webview contains the web content. I thought this might be a doctype version issue (most of the pages are HTML 4.01 strict) but changed it to HTML5 (!DOCTYPE html) with no change. Any ideas? (void)refreshWebview { NSString *javaScriptString = [NSString stringWithFormat:@"document.body.className = '%@'", self.fontSizeName]; [_webview evaluateJavaScript:javaScriptString completionHandler:nil]; }
0
0
872
Apr ’22
How to identify iPhone Plusses that mimic iPads with SplitView Controllers?
My Classic splitviewcontroller app works as designed with regular iPhones and iPads. But because I add buttons (e.g. back buttons) that are often missing, when I test on the Plus size iPhones in the simulator (I don't have any of the mega phones), these buttons remain in iPhone plusses in landscape mode (like mini-iPads with the master and detail both showing). But I need to hide/remove those buttons in the detail view for the plus models. So, how do I identify in code the mega iPhones that act like mini-iPads in landscape mode with splitviewcontrollers?
1
0
797
Apr ’22
Classic SplitViewController and Plus-Sized iPhone Crashes?
Trying to migrate a 2015 app to SVC (iOS 12) but had to stick with Classic SVC style because my app uses a TabBarController for the Master (not allowed with 1- and 2-column styles). The tab bar gives the user access everywhere to the 5 top levels without navigating back up a hierarchal tree up to three more layers deep. Actually, got it working and works as designed with no issues on iPhones and iPads, simulators and actual devices. However, when testing with iPhone Plus-sizes (I do not own any of these devices) in the simulator, when I change the orientation repeatedly, e.g. portrait to landscape, visa versa, the app seems to crash the simulator as the app contents only fill half the device screen, and does not crash in the debug area. Get messages like "myapp has closed, do you want to reopen?", and when I "ignore" I have to stop the simulator in Xcode and then it opens a report to send to Apple (and AFAIK everything in the report points to the simulator and not my app). So, is there a bug in the simulator with Plus-sized apps with Classic SVC, or some incompatibility with Plus-sized apps and Classic SVC in devices?
0
0
597
Apr ’22
Why can't I find my new iOS app in the App Store by Search?
Several days ago my app - 2021 CDC STI (STD) Guidelines - was released for sale. The first day I searched for it, I couldn't find it but the 2nd day, I found it easily using any number or combination of search words, using words from the app name and the exact same words from the name that I submitted as keywords. The 2nd day the app was 18th in its category (people found it) and today it's 90th (because it doesn't seem to exist by search, not even by entering the exact app name). The only way I could find that the app still exists is by searching for my name as developer. Is there someone, somewhere to contact to troubleshoot why the indexing of app names and keywords does not seem to work?
1
0
809
May ’22
Xcode Parameter Linking (NOT SwiftUI)
Just revisiting Xcode 13.4 in some time for a MacOS Automator Action and literally cannot find, Google or Developer support, how parameters (a tab in Automator Info for the target) can be linked to UI objects in a xib (not SwiftUI) or how to access those parameters in Objective C code. I cannot even find Xcode documentation on this topic in Developer at https://developer.apple.com/documentation/xcode and my search for "Xcode parameters" does not help. So, could someone please direct me to where this is covered in documentation?
0
0
686
May ’22