Posts

Post marked as solved
4 Replies
7.7k Views
All right, so I have an app that requires reading the data from the SIM card. More precisely I need the Carrier name, MCC, MNC, ISO Country code and current Radio Access Technology (Okay this does not directly come from the SIM card but it is linked). It works perfectly on every phone, but I realized (after testing) that I'm in trouble with the newest iPhones that have an eSIM set up. I have no idea how to tell my app to read the data of the physical SIM card instead of the eSIM.I tried to search a bit on the Web about that but I found absolutely nothing...The code I use:let telephonyInfo: CTTelephonyNetworkInfo = CTTelephonyNetworkInfo() carrierNetwork = telephonyInfo.serviceCurrentRadioAccessTechnology?.first?.value ?? "null" carrierNetwork = carrierNetwork.replacingOccurrences(of: "CTRadioAccessTechnology", with: "", options: NSString.CompareOptions.literal, range: nil) let carrier = telephonyInfo.serviceSubscriberCellularProviders?.first?.value // actually here originally I tried to use ?.values.first, but the result is the same let countryCode = carrier?.mobileCountryCode ?? "null" let mobileNetworkName = carrier?.mobileNetworkCode ?? "null" let carrierName = carrier?.carrierName ?? "null" let isoCountrycode = carrier?.isoCountryCode?.uppercased() ?? "null" /* so the problem is that the values I get are the ones from the eSIM when it is set up. If it is not, then I get the values I want. Apparently, when the physical SIM card line is set as primary, it works. But I need that code to systematically use the physical SIM data. */Example:I expect [physical SIM card]: Carrier name: Free, MCC: 208, MNC: 15, ISO Country Code: fr, CTRadioAccessTechnology: WCDMA.But instead, I get [eSIM]: Carrier name: Swisscom, MCC: 228, MNC: 01, ISO Country Code: ch, CTRadioAccessTechnology: LTE.EDIT: If you know how I can read both, that's also fine to me, my goal is to detect if the user uses a Free Mobile [208 15] SIM card.Thank you in advance,
Posted
by PlugN.
Last updated
.
Post not yet marked as solved
7 Replies
11k Views
Hello, With the new App Store Connect, iOS apps become available on the new Macs with Apple Silicon natively. A couple of my apps got quite some complications with Catalyst and do not need it anymore. I would like to know how to completely remove a platform from App Store Connect, without impacting the iOS version, so that I can let my iOS app be available on the Mac App Store instead of the Catalyst app. Thank you
Posted
by PlugN.
Last updated
.
Post not yet marked as solved
2 Replies
834 Views
Hello,Please let someone at Apple read this.I am seeking for help, but more importantly to report a serious bug in the provision profile generation when I include the "Hotspot Helper" extra-entitlement in it.I tried to contact the direct email support, however they responded me to contact the paid code-level support.I am now sure that this issue is to be resolved by Apple, not by me, so it is out of the question that I use the code-level support for this.Original issue :Xcode crashes as soon as I try to build with my imported provisioning profile on an iOS device.There are three scenarios:If you build on a simulator, everything went as planned : successfully builded and running.If you build it on macOS using Catalyst, it says it did successfully achieved the build, but does not launch the app and states « Finished launching app » on the top bar.If you build it on a real or generic iOS device, Xcode instantly crashes before even starting the building process (« Planning build »).I tried to manually build the project using the terminal, and here is what I got:2020-03-02 21:28:45.399 xcodebuild[42606:2264629] -[__NSArrayM hasSuffix:]: unrecognized selector sent to instance 0x7fd3852562d0 ** INTERNAL ERROR: Uncaught exception ** Uncaught Exception: -[__NSArrayM hasSuffix:]: unrecognized selector sent to instance 0x7fd3852562d0 Stack: 0 __exceptionPreprocess (in CoreFoundation) 1 objc_exception_throw (in libobjc.A.dylib) 2 -[NSObject(NSObject) __retain_OA] (in CoreFoundation) 3 ___forwarding___ (in CoreFoundation) 4 _CF_forwarding_prep_0 (in CoreFoundation) 5 -[IDEEntitlementsMerger entitlementsByMergingProfileEntitlements:appEntitlements:bundleIdentifier:appName:profileName:warnings:error:] (in IDEFoundation) 6 -[IDEProvisionableStatusEvaluation mergedEntitlementsWithWarnings:error:] (in IDEFoundation) 7 +[IDEProvisioningCommandInputs inputsFromEvaluation:] (in IDEFoundation) 8 -[IDEProvisionableStatusEvaluation provisioningCommandInputs] (in IDEFoundation) 9 __97-[IDEProvisioningManager evaluateProvisioningForProvisionable:overrides:deviceRequirement:isXBS:]_block_invoke_2.374 (in IDEFoundation) 10 __131-[IDEProvisionableManager immediatelyEvaluateWithOverrides:deviceRequirement:shouldRepairIfNecessary:isXBS:callbackQueue:callback:]_block_invoke.364 (in IDEFoundation) 11 __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation) 12 __DVTDispatchAsync_block_invoke (in DVTFoundation) 13 _dispatch_call_block_and_release (in libdispatch.dylib) 14 _dispatch_client_callout (in libdispatch.dylib) 15 _dispatch_lane_serial_drain (in libdispatch.dylib) 16 _dispatch_lane_invoke (in libdispatch.dylib) 17 _dispatch_workloop_worker_thread (in libdispatch.dylib) 18 _pthread_wqthread (in libsystem_pthread.dylib) 19 start_wqthread (in libsystem_pthread.dylib) zsh: abort xcodebuild build plugn@MacBook-Pro-de-PlugN FWi-Fi %Then I had the idea to generate a new provisionning profile, without the "Hotspot Helper" entitlement.One thing I immediatly noticed is that the "App ID" section on the Preview had the correct ID, whereas the other profile had "Unknown".I imported this new profile in Xcode to see if it was accepting to build the app, and it did it immediately, without any complaints!I opened the two provisioning profiles in TextEdit to compare them, and they were pretty similar (well of course except one of them had the extra entitlement), but one thing stroke me right away:The provisioning profile that successfully worked in Xcode had the following structure for the App ID :<key>application-identifier</key><string>*******.xx.xxxx.xxxxx</string>With *** being the Team account number and the *** my application identifierAnd the provisioning profile that failed to work and made Xcode crash, and made the App ID unknown from the preview had the following structure :<key>application-identifier</key><array> <string>*******.xx.xxxx.xxxxx</string></array>I am quite sure this is where the problem comes from, but I cannot edit the file so I need someone at Apple to confirm me this issue and fix it as soon as possible if it is indeed where the crashes comes from.Thank you in advance,PlugN
Posted
by PlugN.
Last updated
.
Post not yet marked as solved
0 Replies
613 Views
Hello,This is the notification some of my app users are encountering on iOS 13. The app has an extension that works with Apple Shortcuts.It returns an integer, and it is meant to be used with the new Shortcuts Automation feature. Here is the code :func handle(intent: CarrierIntent, completion: @escaping (CarrierIntentResponse) -> Void) { RoamingManager.engine(g3engine: true) { result in var performOperations = false if result == "HPLUS" || result == "WCDMA" || result == "EDGE" { performOperations = true } else if result == "POSSHPLUS" { NotificationManager.sendNotification(for: .alertPossibleHPlus) } else if result == "POSSWCDMA" { NotificationManager.sendNotification(for: .alertPossibleWCDMA) } completion(CarrierIntentResponse.success(carrier: performOperations ? 1 : 0)) } }What have I done wrongly? Thanks.
Posted
by PlugN.
Last updated
.
Post not yet marked as solved
1 Replies
931 Views
Hello dear developers,Allow me to share with you my nightmare with SiriKit. I'm pretty new to this. So it's possible that I have done things wrong. I would really appreciate your help to get out of this situation. I have a couple of custom intents declared with one intent definiton file.Let's kick off with Chapter 1 - "Destroyed localizations"I localized my Intents by going on my Intent Definition file, and checking all my languages on the right side of the screen, including the BASE one. I translated every file. But some of the text are not beeing translated. The title, subtitle and output variable display name are translated correctly though, so it's not that disturbing. But when I upload the package to the App Store, I recieve an email warning me that the title and subtitle of my intents are NOT translated in French (at least not found), but the rest of the elements and languages are fine! What a nonsense is this? What should I do, I litteraly can see all my translations done and checked, and they work on my device, except other translations, not being the ones mentionned in the mail, are failing to work?Chapter 2 - "Ghost Intents donated"Every time I donate my intent, it gets doubled. When I go in the Apple Shortcuts app, I can see 2 to 4 times the same Intent there. They all work, so I can pickup whatever Intent I want, the result will be the one I expected. But why is it doubled, trippled, or even quadrupled? What have I done wrongly? They are being donated in the viewDidLoad().Chapter 3 - "Lucky Luke-class handler"When I execute an Intent in Shortcuts, everything goes well, I get my results and everyone is happy. However, if I decide to run multiple intents from my app one after another, one of my intents, and only this one, will systematically fail ("a communication problem with the app occured") if being executed after another one. It works if I revert the order. Intrestingly, the Intent failing is the first I ever made when I started dealing with my Intents Definition file. However these Intents are absolutely not linked, so I don't understand how the order could matter in any way. I tried to diagnose this with Xcode, here is what I got:2019-10-07 01:20:24.976279+0200 Shortcuts[6444:576136] [lifecycle ] [u AD0D3A30-0963-44E9-A24D-FDC14F80C21B:m (null)] [fr.plugn.fmobile.FMobileG3(2.0)] Connection to plugin interrupted while in use.2019-10-07 01:20:24.976641+0200 Shortcuts[6444:575523] [Intents] -[INCExtensionRequest _extensionContextHost] Unexpected extension context class (null)2019-10-07 01:20:24.976719+0200 Shortcuts[6444:574337] [WorkflowExecution] -[WFAction runWithInput:userInterface:parameterInputProvider:variableSource:completionHandler:]_block_invoke Action <WFHandleCustomIntentAction: 0x10a617c10, identifier: fr.plugn.fmobile.CarrierIntent, parameters: 1> finished with error: Error Domain=WFIntentExecutorErrorDomain Code=100 "Un problème de communication avec l’app est survenu." UserInfo={NSUnderlyingError=0x2804b7d50 {Error Domain=INCExtensionErrorDomain Code=1301 "(null)" UserInfo={NSUnderlyingError=0x280519290 {Error Domain=NSCocoaErrorDomain Code=4097 "connection on anonymousListener or serviceListener from pid 6656" UserInfo={NSDebugDescription=connection on anonymousListener or serviceListener from pid 6656}}}}, NSLocalizedFailureReason=Impossible d’exécuter Obtenir le Statut d'Itinérance Nationale, NSLocalizedDescription=Un problème de communication avec l’app est survenu.}2019-10-07 01:20:24.976792+0200 Shortcuts[6444:576136] [lifecycle ] [u AD0D3A30-0963-44E9-A24D-FDC14F80C21B:m (null)] [fr.plugn.fmobile.FMobileG3(2.0)] Connection to plugin invalidated while in use.I know that's already a lot of informations I'm trying to solve, so I'm going to skip you the Chapter 4 - "Xcode is absolutely crazy", where it's giving me some random red errors without any sense (example: () -> Bool [...] return true ---> "Cannot convert variable of type 'String' to type 'NSNumber'"), vanishing after restarting Xcode and rebuilding. Fun fact, when I get all these red errors, it is still succeding the Build with Cmd+B and running the app perfectly on the device, despite the 60-190 red fake errors.So. Any chance of me getting through this? Do you have any idea what I could have done wrong? Thank you in advance,- PlugN
Posted
by PlugN.
Last updated
.
Post not yet marked as solved
2 Replies
1.5k Views
Hello,I have a standard UITextField element in my app, and the prediction bar shows properly on the keyboard, however the predictive emojis doesn't work at all (like, when I write "haha" or "beach", it doesn't propose me any emoji on the right side of the bar). In every other apps that I have on my phone, it works. What did I do wrong with my UITextField? I would appreciate your help!Thank you in advance,PlugN
Posted
by PlugN.
Last updated
.