Post

Replies

Boosts

Views

Activity

How to add a Sticker App Extension to an existing app with an iMessage Extension?
I have a working iMessage app in the app store that does NOT have a companion app. iMessage app only. I now want to add stickers to it. I cannot get this to work; stickers do not show up in the stickers section, nor in the "Manage Sticker Apps" section. Problem exists on Xcode 16, latest OS, on all simulators and devices. I tried adding a new "Sticker App Extension" target to the project. I tried adding just the Stickers.xcassets file to the exsisting iMessage extension and the app itself. I tried googling but all examples and tutorials show how to create a complete stickers app, which works correctly. But I do not want the app. Notable mention: If I create a new "Stickers app" project it works, but if I then try to add an iMessage app extension, THAT does not work so I then have a reverse situation in which the stickers extension DOES work but the iMessage app doesn't. I somehow have the feeling that an app cannot have both an iMessage Extension and a Stickers App Extension but the documentation is, of course, in true Apple style, lacking. So how to add a Sticker App Extension to an existing app with an iMessage Extension?
1
0
250
Oct ’24
What triggers Game Mode?
What are the specific characteristics that trigger Game Mode in an iOS game? I have several casual SpriteKit games in the App Store but only one of them triggers Game Mode. What does GCSupportsGameMode do when set to true? Will it trigger Game Mode or will the OS still decide by itself?
2
0
462
Sep ’24
AVAudioPlayer init very slow on iOS 18
On Xcode 16 (16A242) app execution and UI will stall / lag as soon as an AVAudioPlayer is initialized. let audioPlayer = try AVAudioPlayer(contentsOf: URL) audioPlayer.volume = 1.0 audioPlayer.delegate = self audioPlayer.prepareToPlay() Typically you would not notice this in a music app for example, but it is especially noticable in games where multiple sounds are being played using multiple instances of AVAudioPlayer. The entire app slows down because of it. This is similar to this issue from last year. I have reported it to Apple in FB15144369, as this messes up my production games where fps goes down to nothing when sounds are enabled. Unfortunately I cannot find a solution. Anyone?
2
0
314
Sep ’24
WeatherKit REST API Invalid Signature (php)
I'm trying to make a PHP implementation to fetch data from the WeatherKit REST API. When using jwt.io to create a JWT, everything works correctly, so my keys, identifiers, etc. are set up correctly. When using jtw.io to verify my own generated JWT, the header and payload are correct, but "Invalid Signature" is displayed. The file path for the private key exists and the file is loaded correctly. My PHP code: function generate_jwt(): String { $tmpFilePath = realpath(dirname(__FILE__)).'/'; $filePath = $tmpFilePath.'../AuthKey.pem'; //$filePath = $tmpFilePath.'../AuthKey.p8'; $private_key = NULL; if (file_exists($filePath)) { $private_key = file_get_contents($filePath); } $header = [ "alg" => "ES256", "kid" => "XXXXXXXXXX", "id" => "YYYYYYYYYY.com.thing.stuff", "typ" => "JWT" ]; $header = $this->base64_url_encode(json_encode($header)); $issuedAt = time(); $payload = [ "iat" => $issuedAt, "exp" => $issuedAt + 30, "iss" => "YYYYYYYYYY", "sub" => "com.thing.stuff" ]; $payload = $this->base64_url_encode(json_encode($payload)); $signature = $this->base64_url_encode(hash_hmac('sha256', "$header.$payload", $private_key, true)); $jwt = "$header.$payload.$signature"; return $jwt; } function base64_url_encode($text): String { return str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($text)); } Any ideas?
0
0
553
Nov ’23
AVAudioPlayer init very slow on iOS 17 Simulator
On Xcode 15 (released version), the iOS 17 Simulator will stall / lag as soon as an AVAudioPlayer is initialized. let audioPlayer = try AVAudioPlayer(contentsOf: URL) audioPlayer.volume = 1.0 audioPlayer.delegate = self audioPlayer.prepareToPlay() Typically you would not notice this in a music app for example, but it is especially noticable in games where multiple sounds are being played using multiple instances of AVAudioPlayer. The entire app slows down because of it. It works fine on real devices and on iOS <=16 Simulators. I noticed that the iOS 17 simulator immediately shows an error in the console: 66.051 HALC_ProxyIOContext.cpp:1.329 HALC_ProxyIOContext::IOWorkLoop: skipping cycle due to overload and in the past iOS Simulators have been having trouble with audio. Unfortunately I cannot find a solution. Anyone?
7
3
2.1k
Sep ’23
Xcode 15 (release version) SpriteKit in Simulator Very Slow
On Xcode 15 release version 15.0 (15A240d) the iOS 17 Simulator is very slow when running SpriteKit apps. The fps barely gets over 15 fps and everything is lagging. This is unusable for testing games. (M1 Mac mini 16GB RAM) diagnosticd and SpringBoard seem to be hogging the processor. This continues whether debugging is attached but also when the Simulator is idle. It does not matter which type of device is used. iOS 16 and lower Simulators are fine. In the previous version everything was fast and smooth, I could run 4 or 5 simulators at the same time with SpriteKit games. What to do? [edit: updated it only occurs on iOS 17 Simulators.]
3
3
1.4k
Sep ’23
StoreKit2 - purchase() dialog only appears after minutes of waiting
I have 2 apps that use StoreKit2 to handle purchases auto renewing subscriptions. It is implemented according to Apple's example on this page. On Sandbox, it works correctly. In production, it works correctly for most users (I can see by the sales numbers) but a small percentage of users report that the system purchase dialog is not appearing at all. Upon further investigation it turns out that the dialog sometimes only appears after minutes of waiting, sometimes up to 5 minutes. When it finally appears, it works correctly. On my own devices with production versions (downloaded from the App Store) I also get the delay. Other apps (by other developers) show the dialog immediately. Therefore I am guessing there may be something wrong with my code. What may cause the purchase() dialog to appear after such a long waiting time?
1
2
617
Aug ’23
GKLocalPlayer localPlayer cannot authenticate: "this application is not recognised by Game Center" error GKServerStatusCode 5019
When authenticating the GKLocalPlayer.localPlayer with Game Center the console logs a message: _authenticateUsingAlert:Failed to authenticate player with existing credentials.Error: Error Domain=GKErrorDomain Code=15 "The requested operation could not be completed because this application is not recognised by Game Center." UserInfo={GKServerStatusCode=5019, NSLocalizedDescription=The requested operation could not be completed because this application is not recognised by Game Center., NSUnderlyingError=0x600001fc57a0 {Error Domain=GKServerErrorDomain Code=5019 "status = 5019, no game matching descriptor: ios:***.***.***:1.4:4+-1" UserInfo={GKServerStatusCode=5019, NSLocalizedFailureReason=status = 5019, no game matching descriptor: ios:***.***.***:1.4:4+-1}}} After this, I CAN access the player properties such as avatar and name, but Game Center will not show any leaderboards or achievements, nor can scores be submitted. iOS 15.2, on any device or Simulator the same happens. I have tried EVERYTHING I could find on the web: check correct bundle ID create a leaderboard in App Store Connect create an achievement in App Store Connect create a whole new app in App Store Connect create a whole new project in Xcode delete and re-add Game Center capability use a different Apple ID to sign in to Game Center use a different Apple Developer Account and do the above again I do have two other games in which everything works fine. In many old posts about this, no one ever got any answer or solution, so I am thinking Apple's backend system is buggy. If anyone has ANY information on how to solve, please help.
4
0
2.5k
Jan ’22
iCloud ubiquitous container not writable from Finder
Hi, my iOS/macOS app uses iCloud drive to store files. Everything works correctly on iOS / iPadOS: Files can be created, moved (to and from), opened, etc. Even in the macOS terminal the same things are possible. However, using the Finder on macOS (Catalina and Big Sur), the cloud container is not writable for files, ie. no files can be dragged and dropped into the folder. Dragging or creating a folder works fine and includes the child files. Dragging a file into a subfolder will again result in a "no entry" mouse cursor and file cannot be dropped. How to fix this so that in the Finder, files can be moved to the container? Code: let containerURL = FileManager.default.url(forUbiquityContainerIdentifier: nil) let documentDirectoryURL = containerURL!.appendingPathComponent("Documents") let documentURL = documentDirectoryURL.appendingPathComponent("myFile.txt") let text = String("test message") text.write(to: documentURL, atomically:true, encoding:String.Encoding.utf8) My info.plist settings: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>iCloud.ALS</key> <dict> <key>NSUbiquitousContainerIsDocumentScopePublic</key> <true/> <key>NSUbiquitousContainerName</key> <string>ALS Levels</string> <key>NSUbiquitousContainerSupportedFolderLevels</key> <string>Any</string> </dict> </dict> </plist>
0
0
958
Jul ’21
Xcode 12.5 crashes when opening Organizer window
Xcode version 12.5 (12E262) When opening the Organizer window (Window - Organizer), even when there is no project open, Xcode crashes after a few seconds. • I tried deleting all my archives, but that did not help. • I tried rebooting the computer, but that did not help. I can now no longer upload anything to App Store Connect, this is a serious issue. Anyone have a tip?
18
0
5.9k
Apr ’21