Post

Replies

Boosts

Views

Activity

Changing font in CollectionView UIIndexBarAccessoryView
I have a 600 item Collection view for which I implemented a quick access section Index. The implementation uses the usual: indexTitles(for collectionView) and CollectionView(indexPathForIndexTitle: title: at:) All is well, except that the collection titles are in a foreign language (latinized Coptic) and 3 of the 25 title glyphs are not in the SystemFont, so the index is drawn with these titles as question marks in boxes. The problem glyphs are "Ꜣ"(unicode A722), "꟣"(A7E3), and "Ꜥ"(A725) I drilled down on the subviews of the CollectionView and found I could access the index using: let subviews = myCollectionView.subviews if let indexView = subviews.first(where: {String(describing: type(of: $0))=="UIIndexBarAccessoryView"}) { print(indexView) } Examining the contents of this UIIndexBarAccessoryView (which seems to be Private), it contains a _visualStyle property object which holds a _font. How can I "legally" change the font for the indexBarAccessory to one that has the required glyphs? The rest of the App requires the local language to be English(US)
0
0
344
Dec ’23
Crash on pushViewController with [NSNull set]: unrecognized selector
I have an app where I just created a new, working viewController in a separate project. I copy/pasted the code and xibs (several subviews) into the new project. All compiles fine. Relevant code: `let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil) //let nextViewController = storyBoard.instantiateViewController(withIdentifier: "NewManualGlyphVC") as! NewManualPickGlyphViewController //old Selector let nextViewController = storyBoard.instantiateViewController(withIdentifier: "GlyphSelectVC") as! GlyphSelectViewController //new Selector self.navigationController?.pushViewController(nextViewController, animated: true) ` The commented out line was the vector to the old, working VC. The new code crashes inside the push. the new nextViewController is fine, the Xcode quick view shows the expected view, and the navController is also just fine. The reported error is: `myApp[42661:963870] -[NSNull set]: unrecognized selector sent to instance 0x7ff86599bc30 ` Environment is Xcode 14.3.1 compiled to ios13, target device iOS 16. Any thoughts? Thanks!!
3
0
645
Aug ’23
AppStore Preview stuck in "Processing"
I submitted a new App yesterday and included a video preview file for several size devices (6.7, and a copy of 6.7 for 6.5, 5.5 and 12.9). The iPhone files each took 5-10 minutes of processing (where the file icon shows a cloud image) but each eventually worked. The iPad file uploaded fine, but now 18 hours later is still showing a cloud icon. All these uploaded files are about the same size at about 40M. The AppStore will not allow me to submit the App for review due to: Preview File Still Processing! What is my recourse?
7
0
3k
May ’23
Drawing a UIImageView behind SpriteKit Scene
I am working on a simple SpriteKit App which has a sprite based game which I would like to superimpose on a complex UIImageView ( > 100 subviews) and which I will need to access during game play (ie change alpha of subviews and other animations) I have tried to get this effect a number of ways but none work. First I tried to make the background a Node filled with substrates, but the subsprites do not position correctly. The most promising approach so far is to combine the views of the main ViewController and the Scene: √ 1) Desired background UIImageView ("bg") is placed in view of main ViewController and draw into it √ 2) Create a Protocol with delegate methods that can be called from the game's GameScene.swift √ 3) Create Scene in main VC in the usual way. Set the scene background color to .Clear √ 4) in GameScene.swift set up the reference to the protocol delegate √ 5) prove I have access to the bg image from didMove(to view: SKView) by changing alpha or background color. Delegate access from didBegin(contact) also works The problem is: that my bg imageView is drawn IN FRONT OF my game scene and I can not figure out how to change the draw order. The game scene is not in the subviews array of the mainVC, and the bg image view is not in the subViews of the game scene view. Without common references, I do not see how to modify the view hierarchy. Does anyone have a way to draw the bg image behind the mostly transparent game scene?
0
0
652
Apr ’23
New onset Metal Validation failure
I have an older App using SpriteKit and have updated to Xcode 14.3. Compilation and linking is ok. App never gets to my code but crashes in AppDelegate with: Metal API Validation Enabled -[MTLDebugDevice newLibraryWithURL:error:]:2250: failed assertion `url must not be nil.' I do not anywhere explicitly init() or call Metal. Using LLDB at the point of crash, I tried to peek into the App Bundle but po Bundle.main.paths(forResourcesOfType: "URL", inDirectory: "nil") 0 elements likewise: po Bundle.main.paths(forResourcesOfType: "*", inDirectory: "nil") 0 elements I suspect a build script or preformed bundle.main got screwed up, but I do not know how to investigate. I should that this seems to be isolated to one MacBook Pro, compiles and runs fine on an iMac! Any thoughts?
3
0
1.8k
Apr ’23
Query AppStore lookup for MacOS App Ratings
I've built an iOS App which looks at statistical models of the rate of change of an App's Ratings and Review Counts activity. I use the standard query form of: let prefix = "https://itunes.apple.com/\(countryCode!)/lookup?id=" let postfix = "&entity=software,iPadSoftware" let result = prefix + "\(devID)" + postfix // URL path This query results in a JSON object list of all current Apps by the the developer (with ID = devID). The results have iOS, iPadOS, WatchOS, TVOS, and MacOS apps with all the expected data, except the review counts and ratings are always Zero for MacOS apps. I have tried playing with a dozen permutations of <macOS, Mac, MacSoftware, etc> as a query entity. All of those permutation yield zero results. I know about using AppStoreConnect with Authorization tokens, but I prefer to use public domain data provided by Apple rather than the proprietary route. Has anyone been successful in grabbing macOS App average ratings and counts? What is the secret sauce?
0
0
1.3k
Aug ’22
Accessing the Crown in WatchOS 8 inside SpriteKit
I am building a SpriteKit based Interface Controller for a Watch page. The page has just a SpriteKite Scene embedded with interface builder. The scene renders and animates just fine. The hierarchy is: App access An InterfaceController (One of many) SpriteKit Scene "brScene.sks" Graphic layout file "brScene.swift" Swift code to support Scene The problem is accessing the Crown rotation in the brScene.swift. I need the Crown data to control movement of a sprite. This is a problem that has historically been addressed a few times back in the 2015-2016 timeframe for WatchOS 2 and 3, but the earlier solutions appear to all be broken now. Here is what I have tried: import Foundation import SpriteKit import WatchKit class brScene: SKScene, SKPhysicsContactDelegate, WKCrownDelegate { class func newGameScene() -> brScene { //Load brScene.sks as SKScene guard let scene = SKScene(fileNamed: "brScene.sks") as? brScene else { print("Scene Load Failed") abort() } //fill window scene.scaleMode = .aspectFill let wkExtShared = WKExtension.shared() let crownSequencer = WKExtension.shared().sharedInterfaceController!.crownSequencer crownSequencer.delegate = self //** Can not assign or cast crownSequencer.focus() return scene } The value of "self" at the failed delegate assignment is "AppChallenge_WatchKit_Extension.brScene". It has no delegate compatibility. Of note, the protocol addition to the brScene Class of WKCrownDelegate is rendered in black by Xcode, not in green like SKPhysicsContactDelegate. I believe I could probably make the page's InterfaceController the delegate for the crown and then post notifications back to the brScene.swift to move the sprite, but that seems highly inelegant and inefficient! What is going on? Any help would be appreciated!
0
0
774
Nov ’21
Failure to upload WatchApp ipa
I have a new "independent" watchOS 8 app that I wish to put in the App Store. I archive it and try to push the archive via Xcode Organizer/Distribute. It passes all the tests and uploads roughly the correct about of data (size of .ipa) to a blobstore.apple.com URL. Then it just stops, for up to hours before I kill the process. Is there a log file somewhere which monitors the app upload process so I can try to diagnose the issue? I ran through a number on logs in Console but did not see anything related. Any suggestions?
1
0
952
Nov ’21
MacCatalyst Multi window App not calling Scene Delegate
I have a working Mac Catalyst app which opens several ViewControllers simultaneously, each in their own Scene. Once the scenes are opened and all foreground, I would like each ViewController to be notified when the user taps that window so its Scene becomes Active, i.e., topmost, first Responder and focus. However, after the initial scene creation and activation, the Scene Delegate sceneDidBecomeActive method does not get triggered by any user interaction, despite the targeted window cycling between Active and Inactive. Neither does UIKit post the "didBecomeActiveNotification" event. Inside the ViewControllers, the "viewDidAppear" method does not get invoked either. Is there a UISceneConfigurationOption required to handle an activate event? How can I detect an Activate event on an existing scene/ViewController?
3
1
1.7k
Jun ’21
UICollectioView: Animating the transition of a single cell from one customCellView to a different customCellView
I have a UICollectionView of uniform square cells in default FlowLayout. In cellForItemAtIndexPath, if a cell has been selected a different custom view cell is dequeued. On selection of a cell, I reloadData. The different custom cell view is much larger, and has several additional UIControls within it. This effect gives a detail view without pushing a new viewController and works great. The only issue is that the transition between new layouts is instantaneous. Is there a way to animate the reflow. Note that I am not changing the layout, just the size of single cell and it would be more aesthetic to watch it grow or shrink and displace the adjacent cells.
0
0
786
Sep ’20
watchOS 6 privacy Permission
I am updating an existing watchOS App previously paired to an iOS App to a new Independent App. The app uses the CoreMotion framework, specifically CMAltimeter. In the old version of the app, the user had to authorize CM access in the paired iphone for both the phone and watch.I am trying to find a watchOS equivalent of requestAuthorizationWhenInUse, but I can not find it. I must assume that Privacy Authorization is still required. Apple has examples for the Health and Notifications frameworks, but rooting around I can not find a similar request method to generate a permission alert dialog from CoreMotion. Per the Apple Dox, CoreMotion only exposes AuthorizationStatus(). The watchkit extension pList does contain the appropriate privacy permission descriptions.Anyone successfully climb this hill?
3
0
1.7k
May ’20