iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Converting paid app to freemium with IAP
Hello, I have an existing app which is beeing sold in the app store since 2010. Now I want to convert this app into a free app with optional in-app purchases. A part of the functionality which paid users currently have should then be accessible only by IAP. Therefore, I must identify my existing customers, to not make them pay again for functionality they have paid already. Googling around reveals that this is not easy to do, if it was possible at all. However, I found this post: https://stackoverflow.com/questions/3735635/convert-existing-ios-paid-app-to-freemium-model-with-in-app-purchase Quote: "There is now an Apple-approved way to do this on both iOS and macOS. The originally downloaded version of the app can be obtained from the receipt using the info key Original Purchased Version. You can then decide whether to unlock features if that version predates the switch to IAP." Now I have played around with this a bit, or more precisely: NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; However, in my tests, receipt will always be nil. The URL also points to some local location with sandbox in the name. Am I doing something wrong in general, or is this just not supposed to work how I thought it would? Note that I have installed my app from the app store on my device, then launched the above code on my device (so I'm NOT testing this in the simulator). I also read about SKReceiptRefreshRequest, however I cant figure out how to use it. So the question is, how would I figure out if a user has already purchased the orignal paid version? My app does not have a server-component, and by checking some NSUserDefaults key would result in charging users which reinstall the app on a new device. So what should I do?
4
0
2.0k
Sep ’23
api.sandbox.push.apple.com:443 & api.push.apple.com:443 Push notification not receiving
We have configured the push notification service (Server-provider) to communicate with APNS with hostname: api.sandbox.push.apple.com and Port: 443. APNS request is going successfully but from APNS to device (iPhone 6S ) not coming. We have whitelisted the above port and other ports also(2195, 2197). but. still not able to receive the notification. We have also cross verified with the old gateway.sandbox.push.apple.com:2195 and it's working fine but with new api.sandbox.push.apple.com:443, not working. Could someone from Apple Community help us to get resolved this issue? Thanks in advance!!
6
0
5.6k
Oct ’23
iOS In-House Enterprise app not installing
We have an iOS In-House app that is not installing using the OTA method. The app is no longer able to be installed using the itms-services:// protocol. The last time I tried it was in November 2020 and it worked then. The uri looks like this itms-services://?action=download-manifest&url=https: //dl.dropbox.com/s/abcdef123/manifest.plist . Our Enterprise certificate and profiles are up to date and valid. I was able to install the app to an iphone using Xcode and an Ad-hoc deployment of the app. The dropbox links are all shared and accessible to anyone with the link. When I copy the itms-services uri to Safari on an iPhone I get the popup ... "Open this page in "iTunes"?" with the options Cancel and Open. When I click Open the popup goes away but then nothing else happens. The app does not install. I connected to XCode Console to view the log messages for the device while clicking Open on the popup and the only message that stood out to me was .. Process: itunesstored Message: NetworkRequestQueue: Received unknown action: private PID: 162 Does Apple still support OTA installs for enterprise developers? What else can I do to troubleshoot?
2
0
3.4k
Oct ’23
CoreML fails to decrypt a model
We've 10 CoreML models in our app, each encrypted with a separate key generated in XCode. After opening and closing the app 6-7 times, the app crashes at model initialization with error: 2021-04-21 13:52:47.711729+0300 MyApp[95443:7341643] Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=com.apple.CoreML Code=9 "Failed to generate key request for 08494FB2-B070-440F-A8A5-CBD0823A258E with error: -42905" UserInfo={NSLocalizedDescription=Failed to generate key request for 08494FB2-B070-440F-A8A5-CBD0823A258E with error: -42905}: file MyApp/Model.swift, line 43 Looks like iPhone is blocking the app for suspicious behavior and the app fails to decrypt the model. We noticed that after ~10 hours the app is unlocked, it successfully decrypts and initializes the model. Opening and closing the app many times in a short period of time is indeed unnatural, but the most important question is how to avoid blocking? Would Apple block the app if a user opens and closes it 10 times during a day? How does the number of models in the app affect probability that the app will be blocked? Thanks!
7
0
2.9k
Aug ’23
AVSpeechSynthesisVoice.speechVoices
It's a little bit unclear to me whether I get a list of available or installed voices on the device. If an app requests a voice which is available but not installed, what happened? Is it upon the app to install the missing voice or is this done by iOS automatically? For some reasons, a male and female gender is not offered for each language. What's the reason for?
3
0
1.4k
Oct ’23
Is it OK to use UIDocument for a shoebox-style app?
I have an existing app which uses a JSON-based file format currently saved to Application Support (so not user visible). It only needs a single data store per-user. I would like to integrate it with iCloud to make this file available on other devices. Is it considered acceptable to use UIDocument on its own for loading/saving the single file? By this I mean without using UIDocumentBrowserViewController or another file picker. Just my app loading right into the main UI but using UIDocument to open/read/save/close the data file. I am hoping this would allow me to let UIDocument do most of the boilerplate work around NSFileCoordinator and NSFilePresenter. Can anyone confirm if this is a thing that is known to be OK? Or am I going against the frameworks here?
1
0
705
Aug ’23
Failed to Add VPN Configuration
While trying to add a new VPN configuration , the ios Network Extension fails for a particular device with my App with the following error default 23:34: 34.140388-0400 Adding 918D08B1-2814-47C0-AAA9-0A0A8C92049C to the loaded configurations  error 23:34:41.386023-0400 nehelper : Cannot save configuration , the total size of the NetworkExtension configuration is to large (2643248 bytes)  default 23:34:41.510241-0400 kernel memorystatus: set assertion priority(10) error The same behaviour is seen with other VPN Providers like Tunnel Bear. Question: As this issue is seen only on a particular device. Has anyone seen this issue/able to mitigate , and also shed more details why this issue happens.
7
0
2.7k
Aug ’23
[SwiftUI] How do I catch the "No image named MYEXAMPLE found in asset catalog" warning? Alternatively, how do I determine if something exists in the asset catalog?
I'm trying to store image data locally and the name of the image is retrieved from an API. In the situation where an image does not exist locally, I want to put a placeholder. Right now it just puts a white background. Whenever I retrieve from the API I get a purple exclamation which is a warning but not an exception. How can I intercept this warning and make it show a placeholder instead? One problem is that Image is not an optional. It just blithely accepts whatever is fed into it which is annoying. Is there a way to query the asset catalog if it contains something?
1
0
706
Oct ’23
Can I bypass apple in-app purchase to unlock premium content in my app.
As far as I know, an app should use an In-app purchase to unlock premium content, features, or levels, etc. Apple won't allow making payments via third-party payment gateways or even providing a link to do payment other than in-app purchase is against the guidelines. Today I found an app in AppStore where they use a third-party payment gateway to unlock their premium content. Attaching the screenshot Here they are asking for credit card details and entering the card details completes their payments process (Worth mentioning they have cool UX for this!). I am wondering how did they manage to get into the store? or did apple update the policies? or is it a new feature? I am clueless. Any help is greatly appreciated.
2
0
3.2k
Jul ’23
about how to implement Picture in Picture mode for the new video calling service
I have a question about how to implement Picture in Picture mode for the new video calling service, I have already read some of the documentation provided by Apple. Is it possible to implement Picture in Picture mode even if I use an external SDK for video calling such as Agora to implement the video calling service? https://www.agora.io/en/ Is it possible to set the call screen to Picture in Picture mode for a non-video call? Do you think it would be difficult to implement on iOS15 or earlier (e.g. iOS14)? (I read this article.) In iOS 15 and earlier, you cannot keep the camera active during PiP, so unfortunately video calls are not possible. However, in iOS 15, the "Multitasking Camera Access Entitlement" allows you to use the AVPictureInPictureController to keep the camera recording while in PiP mode). Is this definitely feasible this fall when iOS15 is available?
1
2
940
Oct ’23
Crash with NSURL URLWithString
I am seeing crash reports with our users at this line of code NSURL *url = [NSURL URLWithString:self->urlAddress]; self->urlAddress is never nil. My understanding is that if self->urlAddress is malformed in someway then URLWithString should return nil but it seems to crash the thread as below. Has anybody any suggestions as t what might be wrong? Thread 3 name: Thread 3 Crashed: 0 CoreFoundation 0x00000001a73704a0 CFStringGetLength + 60 (CFInternal.h:889) 1 CoreFoundation 0x00000001a739b5b4 _CFURLCreateWithURLString + 84 (CFURL.c:2046) 2 Foundation 0x00000001a8635908 +[NSURL(NSURL) URLWithString:relativeToURL:] + 52 (NSURL.m:463) 3 Dubline 0x0000000102f3391c __58-[settingsAccountViewController reloadDublineSettingsPage]_block_invoke + 1024 (settingsAccountViewController.m:273) 4 CFNetwork 0x00000001a79f23dc __40-[__NSURLSessionLocal taskForClassInfo:]_block_invoke + 540 (LocalSession.mm:687) 5 CFNetwork 0x00000001a7a04768 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 244 (LocalSessionTask.mm:584) 6 libdispatch.dylib 0x00000001a6fb9a84 _dispatch_call_block_and_release + 32 (init.c:1466) 7 libdispatch.dylib 0x00000001a6fbb81c _dispatch_client_callout + 20 (object.m:559) 8 libdispatch.dylib 0x00000001a6fc3004 _dispatch_lane_serial_drain + 620 (inline_internal.h:2557) 9 libdispatch.dylib 0x00000001a6fc3c34 _dispatch_lane_invoke + 456 (queue.c:3862) 10 libdispatch.dylib 0x00000001a6fce4bc _dispatch_workloop_worker_thread + 764 (queue.c:6589) 11 libsystem_pthread.dylib 0x00000001f304a7a4 0x1f3047000 + 14244 12 libsystem_pthread.dylib 0x00000001f305174c 0x1f3047000 + 42828
3
0
1.7k
Jan ’24
Sharing the original URL in iOS Safari via the browser's share button
Currently in iOS Safari and Chrome, when you share a link via the share button, the link that gets copied is the canonical URL. The site that I am working on has a different website listed as the canonical URL (it's a requirement that can't be changed). Is it possible to force iOS Safari and Chrome so copy my website's original URL, instead of the canonical URL? My canonical urls are included in my site via the following tag: <link rel="canonical" href="www.example.com">
4
0
2.6k
Aug ’23
iOS 15 More Tab Crash
Hello, The app I'm working on crashes by trying to reference a deallocated object. The object is a subclass of UITabBarController, and this crash only happens when there are enough view controllers in the tab bar that the more tab becomes available. When turning on zombies, this is the message that gets printed: *** -[UITabBarControllerSubClass removeChildViewController:]: message sent to deallocated instance 0x7fefa98b2a00 In order for the crash to happen, the user has to perform an action that re-initializes the tab bar, such as logging out. This crash does not happen in iOS 14. Does anyone know what might be happening here?
7
1
3.3k
Aug ’23
Can't add new email address with iCloud+ Custom Domain
I've set up a couple of domains (seemingly) successfully with iCloud+ Custom Domains. All the DNS entries are correct. Now, when I attempt to add an email address I get the error "There was a problem with adding this email address. Please try again later." This has been happening for over 24 hours. I'm not quite sure how to proceed - I know this is in Beta, but I keep reading how it is working for other people so its hard to think this is a general problem. I'm adding entirely new domains so there is no chance that the email addresses are previously known by Apple / used for a previous AppleID. Any ideas please?
11
0
2.7k
Apr ’24
Xcode 13 app archiving is modifying framework plist
When archiving & exporting App with Xcode 13. The Frameworks of the created app will have their Info.plist modified. CFBundleShortVersionString is being changed to have the same value as the application version. Steps to reproduce: Create iOS App project with v1.0.0 Add dynamic framework dependencies. ex: Framework A v3.0.0, Framework B v12.0.0. Archive Project. Distribute app AppStore Connect Export Finish the rest of the process with default values. Investigate generated IPA file Investigate .app file inside IPA Investigate frameworks inside .app file. CFBundleShortVersionString of all the frameworks is 1.0.0
12
3
18k
May ’24