Post

Replies

Boosts

Views

Activity

High subscription refund rate in China?
Hello, my indie app has somewhat significant traction in China (both downloads and subscription purchases), but I also have high refund rate there, like multiples of other countries... Perhaps even as 80 % or more of my refunds are in China although the share of downloads and purchases is way lower. I am curious if someone else also has this issue? My app has the "Blinkist trial" onboarding which shows the timeline and has notification on day 5 (for weekly trial), that paid subscription starts soon. However even after stopping showing this onboarding in China for new users I still have most of my refunds from China. I am trying to understand whether this may be broader "phenomenon" or maybe something super specific to my app. As far as I know Apple doesn't share the refund request reasons with developers and I did not get any support emails that would hint at why people are asking for refund. Thanks! Since Apple can terminate your developer account if you have "high" refund rate, I would like to get to the bottom of this.
1
1
499
Dec ’24
NEPacketTunnelProvider does not seem to be capturing all the traffic
Hello, I initially started the discussion over at Swift Forums - https://forums.swift.org/t/issue-with-connect-proxy-some-connections-dont-work-probably-sockets/45575 because I am using SwiftNIO but it appears that it makes more sense here. I have an app with NetworkExtension of the packet tunnel provider type. So I am using the NEPacketTunnelProvider. As part of the extension, I have SwiftNIO server with connect proxy which is used to route the traffic. This works great in almost all cases, but apps like Signal or WhatsApp don't work. They don't display any kind of "no connection" indicator but the messages aren't send or received. Over at Swift Forums I got an answer from Quinn “The Eskimo!” that I think points to the actual problem: My experience is that a lot of these ‘chat’ apps explicitly bind their connections to the WWAN interface, which means they don’t use the default route and thus aren’t seen by the packet tunnel provider. My packet tunnel provider is configured to use the default routes for IP4 and IP6. So my concern is how to configure it, that it works also for the chat apps? There are couple of apps from the App Store that I tried which use this same approach and while they are active, Signal works fine. Yes, I know this solution is not ideal and not the main intended usecase for packet tunnel, but it is the only option available on iOS.. Thanks for help! Happy to clarify further.
9
0
2.4k
Jul ’23
How to setup `matchDomains` for NEPacketTunnelProvider?
Hello, in my usecase, I want to use the matchDomains property, so my VPN (NEPacketTunnelProvider) handles traffic for just some apps and not everything that happens on the device. But settings matchDomains to anything other than [""] doesn't seem to work properly. It works for websites in Safari but in my testing not for other apps. Let's use Instagram as an example: let proxySettings: NEProxySettings = NEProxySettings() proxySettings.matchDomains = ["instagram.com"] With this settings, using the Instagram app doesn't send traffic to my VPN. However if I set something like "theverge.com" as the domain, it gets set to my app. According to the docs, the matchDomains uses suffixes: If the destination host name of a HTTP connection shares a suffix with one of these strings then the proxy settings will be used for the HTTP connection. Otherwise the proxy settings will not be used. I also tried wildcards like *.instagram.com without much luck. How would I go about this? Is there any internal limits on how many domains I can match like this? Thanks
9
0
1.8k
Jul ’21
Live Text API fails: "failed because the buffer is nil"
Hello, I am trying to play around with the Live Text API according to this docs - https://developer.apple.com/documentation/visionkit/enabling_live_text_interactions_with_images?changes=latest_minor But it always fails with [api] -[CIImage initWithCVPixelBuffer:options:] failed because the buffer is nil. I am running this on a UIImage instance that I got from VNDocumentCameraViewController. This is my current implementation that I run after the scanned image is displayed: private func setupLiveText() { guard let image = imageView.image else { return } let interaction = ImageAnalysisInteraction() imageView.addInteraction(interaction) Task { let configuration = ImageAnalyzer.Configuration([.text]) let analyzer = ImageAnalyzer() do { let analysis = try await analyzer.analyze(image, configuration: configuration) DispatchQueue.main.async { interaction.analysis = analysis } } catch { print(error.localizedDescription) } } } It does not fail, it returns non-nil analysis object, but setting it to the interaction does nothing. I am testing this on iPhone SE 2020 which has the A13 chip. This feature requires A12 and up.
4
0
2.3k
Sep ’22
Detect images in document scans with Vision?
Hello, I am working on an app that scans documents and recognizes the text with help of Vision framework. This works great. I would also like to "recognize" or detect individual images which are part of the document. Does Vision has any support for this or should I be looking into training my own ML model? Below is an example document - I would like to extract the text (already done) and also the image of the building.
2
0
1.1k
Oct ’22
New subscription stuck in "Waiting for Review"?
Hello, I submitted new app update almost a week ago for review, it got rejected one time (I had to add links to privacy policy) and then the version was approved. But my newly added subscription has some "Developer Action Needed" / "Rejected" issue - probably with the localization. I wasn't able to discover the root cause for the rejection so I updated the info to make it clear in my view and resubmitted. However I did not get any confirmation email or something like that and my subscription is "Waiting for Review" for days now, which means I am not able to proceed with the launch of new version. Is there anything I can do? I looked into requesting the expedited review - but I dont see any option to specify I need review of subscription. If I have App Store product page in multiple languages - must the subscription localizations match?
3
0
2.1k
Jan ’23
Weird NSCocoaErrorDomain errow when trying to autorize Screen Time API
Hello, we have rare case of AuthorizationCenter.shared.requestAuthorization(for: .individual) failing to autorize user on real device - iPhone XR (iOS 16.1.2). It does not throw the standard FamilyControlsError which we are handling, but NSCocoaErrorDomain. This is the entire po description: Error Domain=NSCocoaErrorDomain Code=4864 "The given data was not a valid property list." UserInfo={NSCodingPath=(), NSDebugDescription=The given data was not a valid property list., NSUnderlyingError=0x283af4d80 {Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}}} The localized one says: "The data couldn’t be read because it isn’t in the correct format." This sounds like some error deep in iOS. The testing device has Apple ID logged in and uses passcode. Anything we can do on our end to solve this issue?
3
0
2k
Jan ’24
Specify WiFi password for ASDiscoveryDescriptor?
Hello, I am looking into the newly announced Accessory Setup Kit and I'd like to replace my manual WiFi connection setup with it, but I cannot find a way how to specify WiFi password when configuring ASDiscoveryDescriptor, only ssid or ssidPrefix can be specified? Is it really not possible to connect to WiFi with password with this new framework? That kind of makes it unusable for my use case :( Since the accessory has password.
7
0
1k
Jul ’24
Cannot confirm my trader info - apps removed soon in the EU?
Hello, I submitted my trader information in March 2024 for the Digital Services Act. Last Friday I got App Store Connect email saying that my info couldn't be verified and that I need to resubmit otherwise my apps won't be available in the EU in 14 days. This is quite scary, I don't want to have my apps removed but I cannot resubmit either. In ASC Business section I see "In Review" as the status for my Digital Services Act compliance so it seems there is nothing I can do. Contacted developer support on Monday but haven't heard back. Anyone with the similar situation who can offer any advice?
7
0
1.4k
Jul ’24
Safari Content Blocker fails to reload with large amount of rules (but under limit)
Hello, I am developing Safari Content Blocker extension and discovered that it frequently fails to load with large amount of rules. Currently I have over 45k and most of the time when I reload the extension on iOS 18 (iPhone 12) it ends with error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.SafariServices.ContentBlockerLoader" UserInfo={NSDebugDescription=connection to service named com.apple.SafariServices.ContentBlockerLoader} #0 And the simpler message is just: Couldn’t communicate with a helper application. From what I managed to find (for example here - https://developer.apple.com/forums/thread/756931) the limit for blocking rules should be 150k items. It was previously 50k but got increased years ago. Is there anything special I need to do to get the extension to work reliably with say 100k items? I am usng the JSON format from the docs: { "trigger": { ... }, "action": { ... } }, { "trigger": { ... }, "action": { ... } } ] My trigger is url-filter and the action is type: block I was thinking about providing multiple JSON files in attachments property of NSExtensionItem but apparently that is not supported. Thanks for help!
2
0
594
Feb ’25
Need clarifications regarding some properties of NEPacketTunnelNetworkSettings
Hello, I am working on a NEPacketTunnelProvider and I am not exactly sure if I correctly understand the NEPacketTunnelNetworkSettings. For example the ipv4Settings according to docs: This property contains the IPv4 routes specifying what IPv4 traffic to route to the tunnel, as well as the IPv4 address and netmask to assign to the TUN interface. So this seems like unless I set all the possible routes here, the tunnel should not work for all the traffic? Currently I have this: swift let ipv4Settings: NEIPv4Settings = NEIPv4Settings( addresses: ["192.169.89.1"], subnetMasks: ["255.255.255.255"] ) Which seems to work pretty well, both for WiFi and cellular. In the past I tried various other addresses, even manually including all the IPV4 routes but I never noticed any effect regarding the tunnel. Then there is the includedRoutes property. The routes that specify what IPv4 network traffic will be routed to the TUN interface. So this is basically another way to set the address like in the constructor for NEIPv4Settings? This seems to work best when I don't set anything. I tried setting all the routes but that did not change things a bit. The only difference is when I set includedRoutes to NEIPv4Route.default(). Then some apps stop working when the tunnel is active. This is strange, because even setting all the available routes + default one doesn't fix this "issue". What is the relation between these properties? It is best to not set includedRoutes if the tunnel works fine? And lastly. What about dnsSettings? This looks like another optional property. Does it make sense to manually specify DNS to point maybe to 1.1.1.1?
3
0
643
Apr ’21
Trying to implement Siri Shortcuts with Intents.. Need some clarification
Hello, I am working on a small app to easily create time relative reminders. Meaning I can quickly create reminder that will remind me about something after 45 minutes from now.. I want to add configurable shortcuts, so users can use this app via Siri and the Shortcuts app. I have created the Intents.intentdefinition file and it's (so far one) shortcut correctly displays in the Shortcuts app with the parametrs. But I am unsure how should I now handle it? Some tutorials and docs mention the delegate methods in SceneDelegate while others point to Intents Extension which is supposed to handle the shortcut? swift override func restoreUserActivityState(_ activity: NSUserActivity) { } This shortcut what I want does not need more user interaction than just providing the two input parameters. So the simplest way to handle that would be nice. Ideally if that work could happen in background without opening my app? Because after the reminder is added, there is nothing to do in my app. Is that possible?
0
0
621
Apr ’21
How to re-enable disabled VPN configuration?
Hello, I noticed an issue with my VPN configuration created with NETunnelProviderManager. When the user has multiple apps that use VPN configuration and are active, I cannot activate my network extension. I am getting this error: NEVPNError.Code.configurationDisabled For ObjC it's NEVPNErrorConfigurationDisabled An error code indicating the VPN configuration associated with the VPN manager isn’t enabled. So if this happens, I need to open Settings - VPN and select my app's profile. How to do this programatically? Other apps are able to re-enable their VPN profile, if another one was selected.
7
0
3.1k
Aug ’22
Issues with saving `AVAudioFile` - playable, no sound
Hello, I am trying to use AVAudioFile to save audio buffer to .wav file. The buffer is of type [Float]. Currently I am able to successfully create the .wav files and even play them, but they are blank - I cannot hear any sound. private func saveAudioFile(using buffer: [Float]) { let fileUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent("\(UUID().uuidString).wav") let fileSettings = [ AVFormatIDKey: Int(kAudioFormatLinearPCM), AVSampleRateKey: 15600, AVNumberOfChannelsKey: 1, AVEncoderAudioQualityKey: AVAudioQuality.high.rawValue ] guard let file = try? AVAudioFile(forWriting: fileUrl, settings: fileSettings, commonFormat: .pcmFormatInt16, interleaved: true) else { print("Cannot create AudioFile") return } guard let bufferFormat = AVAudioFormat(settings: settings) else { print("Cannot create buffer format") return } guard let outputBuffer = AVAudioPCMBuffer(pcmFormat: bufferFormat, frameCapacity: AVAudioFrameCount(buffer.count)) else { print("Cannot create output buffer") return } for i in 0..<buffer.count { outputBuffer.int16ChannelData!.pointee[i] = Int16(buffer[i]) } outputBuffer.frameLength = AVAudioFrameCount(buffer.count) do { try file.write(from: outputBuffer) } catch { print(error.localizedDescription) print("Write to file failed") } } Where should I be looking first for the problem? Is it format issue? I am getting the data from the microphone with the AVAudioEngine. Its format is created like this: let outputFormat = AVAudioFormat(commonFormat: .pcmFormatInt16, sampleRate: Double(15600), channels: 1, interleaved: true)! And here is the installTap implementation with the buffer callback: input.installTap(onBus: 0, bufferSize: AVAudioFrameCount(sampleRate*2), format: inputFormat) { (incomingBuffer, time) in DispatchQueue.global(qos: .background).async { let pcmBuffer = AVAudioPCMBuffer(pcmFormat: outputFormat, frameCapacity: AVAudioFrameCount(outputFormat.sampleRate * 2.0)) var error: NSError? = nil let inputBlock: AVAudioConverterInputBlock = { inNumPackets, outStatus in outStatus.pointee = AVAudioConverterInputStatus.haveData return incomingBuffer } formatConverter.convert(to: pcmBuffer!, error: &error, withInputFrom: inputBlock) if error != nil { print(error!.localizedDescription) } else if let pcmBuffer = pcmBuffer, let channelData = pcmBuffer.int16ChannelData { let channelDataPointer = channelData.pointee self.buffer = stride(from: 0, to: self.windowLengthSamples, by: 1).map { Float(channelDataPointer[$0]) / 32768.0 } onBufferUpdated(self.buffer) } } } The onBufferUpdated is the block that provides [Float] for the saveAudioFile method above. I have tried some experiements with different output formats, but that ended up with unplayable audio files.
1
0
1.9k
Jan ’22