Does XCode iOS Simulator require internet access? - ios

I am trying to build an iPhone application in Xcode 6.1, however the code was delivered from an external company.
For security reasons, the test server that the application is (supposed to be) talking to is on a separate network which does not have internet access.
When I build and run the app on the simulator with this network, there is an error thrown (on the app) almost immediately and the app doesn't run.
When I build the app using a network with internet access, the app starts successfully - but obviously can't reach the destination server.
The company are INSISTING that internet access is required to validate my iOS provisioning profile...whereas I am pretty sure its something in the app.
Is internet access REQUIRED to build and run an application on the simulator from XCode?
I think this is the error...but I'm a C#/Windows guy who knows v. little about XCode!
Pretty sure this is an error thrown by the application and not the emulator.
*********************************** Server Response END FAI BLO******************************
2014-11-12 14:33:04.019 FCiOS12P2[11017:60b] **** error is :Error Domain=KFCRMSErrorDomaininResourceUpdate Code=3126 "The operation couldn’t be completed. (KFCRMSErrorDomaininResourceUpdate error 3126.)"
2014-11-12 14:33:04.020 FCiOS12P2[11017:60b] Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo=0x7978acd0 {NSLocalizedDescription=remote notifications are not supported in the simulator}
2014-11-12 14:33:09.059 FCiOS12P2[11017:60b] FCAlertView: FCAlertOverlayWindow dealloc
2014-11-12 14:33:09.060 FCiOS12P2[11017:60b] FCAlertView: FCAlertViewController dealloc
2014-11-12 14:34:29.706 FCiOS12P2[11017:60b] Reachability Flag Status: -R -----l- networkStatusForFlags
2014-11-12 14:34:29.707 FCiOS12P2[11017:60b] -[NetworkStatusManager checkNetworkStatus:] [Line 89] The internet is working via WIFI.

You don't need a provisioning profile to use the iPad simulator, and you don't need internet access to use the iPad simulator.

This line Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator"
Should mean that your app uses push notification but you can't get the token on the simluator.
Anyways the answer is NO, you don't need internet access to run app on the iPad simulator

The application you are dealing with uses microsoft RD client? It has recently been updated to 8.1.0.The error you are facing in URL not recognized.This will not work on simulator.There is a bug on wifi desktop application using this client are working if connected to LAN
If its about RD 8.1.0 client you cannot solve it wait for update
debug on device .

Related

App crashes on iOS simulator when forced to Sign In With Apple ID

I have been testing my app successfully for months now. Within the last week when I launch my app on the simulator I get a "Sign In With Apple ID" prompt. Whether I cancel or sign in successfully it closes my app and Android Studio loses connection to the app and posts the following:
Unsupported value: Error Domain=AMSErrorDomain Code=2 "An unknown error occurred. Please try again." UserInfo={NSLocalizedDescription=An unknown error occurred. Please try again.} of type NSError
I have tried different OS versions in the simulator
The app works fine and normally in on a real device (Android and iOS)
OSX, Xcode, Android Studio, Flutter are all up to date
Does anyone know what's going on here and how I can help it?

Xcode: iOS app suddenly always crashes on launch

I created a quite simple app that can receive push notifications and display content. This is working without any problems since month.
Since yesterday the app suddenly crashes every time I want to launch it.
I'm using an iPhone 8 Plus with iOS 12.4.1. Restarting the app, hard and soft reset of the iPhone didn't help.
The console says the following:
fehler 07:37:35.510970 +0200 assertiond Unable to obtain a task name
port right for pid 542: (os/kern) failure (0x5)
fehler 07:37:35.511100 +0200 assertiond Failed to start job with error
{
description = "Unable to get valid task name port right for pid 542";
failureReason = "The process failed to exec";
recoverySuggestion = "Consult /var/log/com.apple.xpc.launchd/launchd.log for more information"; }
fehler 07:37:35.511894 +0200 SpringBoard [MyCompany.MyApp] Bootstrap
failed with error:
fehler 07:37:35.512091 +0200 SpringBoard Bootstrapping failed for
with
error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap
process with bundleID MyCompany.MyApp"
UserInfo={NSLocalizedDescription=Unable to bootstrap process with
bundleID MyCompany.MyApp, BKSProcessExitReason=0,
NSLocalizedFailureReason=Failed to start job,
NSUnderlyingError=0x28146e760 {Error Domain=NSPOSIXErrorDomain Code=3
"No such process" UserInfo={NSLocalizedFailureReason=The process
failed to exec, NSLocalizedRecoverySuggestion=Consult
/var/log/com.apple.xpc.launchd/launchd.log for more information,
NSLocalizedDescription=Unable to get valid task name port right for
pid 542}}, BSErrorCodeDescription=bootstrap-failed}
Does anybody have an idea why my app is suddenly crashing?
It might be happening if the developer certificate you used to create this app has been revoked or another app (still in development mode) with same bundle identifier is using your developer certificates. It happens when we build apps for testing purpose with free developer account which shares the certificate identities.
I had the same problem on my iPhone. It stopped working after a few days, so I checked around to see if I could find an answer. I found this, and it worked for me:
"Without enrolling in the Apple Developer Program, your app will only
last for 7 days on your device. After that, you’ll have to re-deploy
it to your device via Xcode. If you’re enrolled in the Apple Developer
Program, you won’t have this inconvenience."
I know it doesn't apply to the original question since he says he has a developer license, but it would apply to many others who don't pay for a license and if your license have expired.
I'm not sure if it's allowed to post a link to where I found the question, so just take it away if that's the case, but I do like to refer to where I got it from, when it's not me. https://codewithchris.com/deploy-your-app-on-an-iphone/

WL.Client.login() then nsurlerrordomain error 1012

Worklight 6.2 building a hybrid application targeting iPad - we get the symptoms described below in the xCode Simulator irrespective of exactly which target device we select.
The application currently attempts a call to
WL.Client.login()
from within wlCommoninit()
Our target server is a full WL Server running on a Liberty instance on a remote machine, we use HTTPS and a specified IP Address
https://w.x.y.z:443/worklight
We have adjusted the Deploy Target and rebuilt the app before running XCode.
The WL.Client.login() error callback fires and we see log messages indicating that we are attempting to hit the correct URL. We also see this error message
NSURLErrorDomain error -1012
We do have a complex network setup, with a firewall between the iOS simulator and the server and yet if we run up Safari on the simulated device we can correctly access the URL.
Questions:
Does that NSURLErrorDomain reflect the cause of the failure? Or is it just part of the error processing?
Any suggestions for further diagnosis?
Further investigation indicated that we did have the wrong URL configured. It seems that
NSURLErrorDomain error -1012
is not in itself an indicator of the problem. Rather, the error follows from the failure to reach the specified host. Conclusion: study the logs prior top that NSURLErrorDomain message.

IBM Worklight - How to enable App Authenticity in a native iOS app?

We have a iOS and Android Hybrid App Environment in which we have App Authenticity successfully running (drop down available to control the feature) using:
<mobileSecurityTest name="app">
<testAppAuthenticity/>
<testUser realm="wl_anonymousUserRealm"/>
<testDeviceId provisioningType="none" />
</mobileSecurityTest>
We added a "iOS Native API" project to our Worklight project that we use for our native iOS client development in XCode 5. We are successfully able to connect to the WL server and call all our existing adapter procedures in our different adapters.
For this native API project, we now would like to enable App Authenticity as well. When we use the same MobileSecurityTest as in the hybrid app in the application descriptor of the native API project we can deploy it to our WL server and the App Authenticity feature is enabled (drop down available to control the feature) at the iOS Native API entry in the console.
On the native iOS app/project we set:
bundle ID is exactly the same as in the hybrid project and the same as in the Apple Developer portal
Key Chain is enabled in the project and also set to worklight.group (as in the hybrid XCode project)
we are not able to get a successful authentication running when we want to connect to WL server. We see that the DeviceAuthManager tries to get the UUID from the device, but then the server returns an error response:
2013-09-24 08:58:35.530 App[32535:c07] DeviceAuthManager:getWorklightUniqueDeviceId --> returning UUID from the keychain
2013-09-24 08:58:35.564 App[32535:c07]
isCustomResponse
2013-09-24 08:58:35.564 App[32535:c07] this is it: Status: 403
InvocationResult: (null)
InvocationContext: {
delegate = "<MyConnectionListener: 0x7d73ec0>";
}
Response text: /*-secure-
{"WL-Authentication-Failure":{"wl_authenticityRealm":{"reason":"com.ibm.json.java.JSONObject cannot be cast to java.lang.String"}}}*/
2013-09-24 08:58:35.564 App[32535:c07] [ERROR] Worklight: -[WLRequest requestFailed:]:309::Status code='403' error='(null)'
2013-09-24 08:58:35.565 App[32535:c07] [ERROR] Worklight: -[WLClient onInitRequestFailure:userInfo:]:410::
We did try this with and without a registered ChallengeHandler that just prints the response. The same results, just that we can see the error response printed in the isCustomResponse method if we have the ChallengeHandler.
Also, a Worklight dialog is shown automatically that says "Error: An error was encountered while processing the request from the application (CLOSE)".
We can see that in 6.0 there is the worklight.plist value:
<key>wlUid</key>
<string>wY/mbnwKTDDYQUvuQCdSgg==</string>
is that also necessary in 5.0.6? Our plist file there does not have that.
When we change the environment value in the worklight.plist file from iOSnative to our app name (or something else) we get a response Response text:
{"errorCode":"UNEXPECTED_ERROR","errorMsg":null}
so I assume this value iOSnative is a fixed value that has to be there?
Sept 30th: WL 6.0.0.1 Update
In WL 6.0.0.1 it seems to not show the same bug when we used it with a Studio 6.0.0 generated iOSApi Environment deployed to a Consumer Server on Tomcat.
Now we are getting an:
Invocation Failure: Status: 403
InvocationResult: {
"WL-Authentication-Failure" = {
"wl_authenticityRealm" = {
reason = "forbidden state";
};
};
}
when we have Enabled, blocking and we can connect and call Adapters when we change to Enabled, servicing. (which was not possible with the 5.0.6 bug before)
Now we assume we need to somehow setup our iOS Certificates or Signatures that we use to sign the app for the iOS Simulator and for the iOS Devices (Developer and Distribution Certificates) on the Wl server, so that the WL Server allows a connection?
Could someone help us with the steps that we need to take to setup an iOS native App Authenticity in our XCode 5 project to successfully connect to the server and after that call our adapters with Enabled, blocking.
We did add worklight.group to the turned-on Keychain Sharing capability of the iOS app.
We copied all Wl iOSAPI files including the plist file with the wlUid into the iOS app xCode5 project?
As mentioned above, it works with Enabled-Servicing and with Disabled AppAuthenticity fine.
For App Authenticity to function in a native iOS application using the Worklight Native API for iOS, the steps are the same as in a Hybrid application on the Eclipse side:
Setup the securityTest in authenticationConfig.xml
Add the securityTest to the iPhone environment application-descriptor.xml
Add your bundleId to the iPhone environment in application-descriptor.xml
There is, however, 1 extra step to do - in Xcode.
Once you open the generated Xcode project:
Under Build Settings > Linking > Other Linker Flags
Add the flag -ObjC
Now you can Clean and/or Run the project on the iOS Simulator/device. Should work.

mobileconfig file adding access to location services

We have an Enterprise app which needs to use Core Location. Our Ipad which will be distributed to our employees has some built in apps successfully "locked" out for certain apps, like Safari and Camera, et al. We do allow other built in apps such as mail and contacts and maps which is my problem at the moment. The Maps will load but it shows only a blank grid. No Map and location manager fails as shown in the error below.
Some one else create the profile and made the changes to the iPad. This person is unreachable and I have been given the challenge to fix it. I'm guessing it has something to do with the mobileconfig file because when I deleted it from a test iPad, all was well. I need to update the mobileconfig file but have no idea what to do to allow location updates. We do have a specific server we connect to, but like I said it works on the test iPad that does not have the mobileConfig profile installed. Please HELP!
Thanks
The message I get is:
Nov 6 11:45:23 iPad locationd[40] : PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo=0x1d687fc0 {NSErrorFailingURLStringKey=https://gs-loc.apple.com/clls/wloc, NSErrorFailingURLKey=https://gs-loc.apple.com/clls/wloc, NSLocalizedDescription=Could not connect to the server., NSUnderlyingError=0x1d67c020 "Could not connect to the server."}
Nov 6 11:45:23 iPad locationd[40] : NETWORK: no response from server, reachability, 2, queryRetries, 2
Nov 6 11:45:37 iPad Aerobics[117] : location manager failed with location: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"
Turns out the new .mobileconfig profile was not the cause, or it was but not directly. I needed to logon to our server and establish connection with location manager, then logon to our private server and do it again which included a compass error but fixed that by waving the ipad around - lol. Spent a full day trying to resolve this so I hope it helps someone.
Thanks to all who looked into my issue.

Resources