Posts

Post marked as solved
5 Replies
526 Views
I've just spent a couple of hours zeroing in on a very weird bug. It seems that the Swift 5.9 compiler in XCode 15b4 is being overly-aggressive in clearing weak vars, compared to previous versions. I have a method that returns an SKAction?. In the debugger, I traced code and verified that the value it attempts to return is a some : <SKMove: 0x280422b40> However, the caller saves that value into a member which appears immediately after assignment nil I tried adding a local variable for the return value, as seen below. That worked but override func perform() -> Bool { if cachedSKA == nil { let xcodeBugWorkaround = gameAction.makeSKAction() // was assigning nil with xcode15b4 cachedSKA = xcodeBugWorkaround // cachedSKA now shows in the debugger as non-nil if let activeScene = tgTouchgram.mostRecentlyStartedPlaying?.activeSKScene, let foundNode = referredNode(on: activeScene) { cachedTarget = foundNode } } // BUG - still fails at this point - cachedSKA appears nil again guard let ska = cachedSKA, let targetNode = cachedTarget else { return true } targetNode.run(ska) return true } The problem appears to be because cachedSKA is a weak vars. I am fairly certain it is being set to nil incorrectly. Even though, within this method, the value is used, it is clearing the property as the sole holder of the object reference. A fussy walkthrough reveals the compiler's changed behaviour is probably legal but certainly unexpected. Working version, still keeping the property as weak: override func perform() -> Bool { var localSKA: SKAction? = cachedSKA if localSKA == nil { localSKA = gameAction.makeSKAction() cachedSKA = localSKA if let activeScene = tgTouchgram.mostRecentlyStartedPlaying?.activeSKScene, let foundNode = referredNode(on: activeScene) { cachedTarget = foundNode } } guard let ska = localSKA, let targetNode = cachedTarget else { return true } targetNode.run(ska) return true }
Posted Last updated
.
Post not yet marked as solved
1 Replies
985 Views
On the Digital lounges page there are links such as https://slack.com/app_redirect?channel=C03HCBT0N58 When I click one I end up on a random Slack channel I've been a member of for a long time, with a failure, eg: https://haiku-community.slack.com/app_redirect?channel=C03HCBT0N58 and message like this. There’s been a glitch… We’re not quite sure what went wrong. You can go back, or try looking on our Help Center if you need a hand.
Posted Last updated
.
Post not yet marked as solved
0 Replies
666 Views
Most of the interaction in Touchgram occurs in the iMessage app extension. There is a full host app as well. I'm about to add a number of IAP for tool subscriptions as well as buying digital currency, to pay for assets. Can I use StoreKit inside the extension or does the workflow for handling purchases and receipt validation all have to happen inside my host app? Note Touchgram is probably the most complex iMessage app extension ever built (especially when I wrap v1.3) - it's effectively a full Keynote-level layout system plus gesture recognition plus exposing SpriteKit features such as shaders, animations & particles... all inside iMessage...to send interactive messages. There is a lot happening in that extension! What's currently in the live app on the store is a long way behind what's due to be released after WWDC.
Posted Last updated
.
Post not yet marked as solved
1 Replies
849 Views
I'm trying to get a trivial bugfix release for Touchgram up with added App Preview videos and have twice being metadata rejected.Touchgram is a rich content-creation app where the app UI is trivial and everything happens inside iMessage.I tried to show Messages being launched from Springboard, because people were a bit confused about the difference between the main app and using it in Messages.Your app preview includes content that does not sufficiently reflect the app in use. Specifically, your preview:- Displays other apps.- Shows footage other than the app in use.They included a screenshot of the springboard starting frame.I then trimmed the video further to show how it starts with the app icon in the middle of the Compact view of iMessage and they clipped that frame and left the status as rejected for the same reaons as above.Have just further trimmed the video so it shows the iMessage extension in Compact mode, which means iMessage's transcript and the bar of app icons is visible. Will be very interesting to see if this is accepted.Major FearsI have an alternate theory that the App Preview is regarded as only being for the app, even when 99% of your functionality is in the extension. So I may never be able to put up a video showing it in use in iMessage.The entire video, which I had cut into segments, is here on Youtube.Has anyone ever seen an iMessage app extension with preview videos on the app listing?
Posted Last updated
.