SignalR-ObjC iOS app does not communicate with the server when deployed through iTunes - iphone

I'm writing an iOS app which uses SignalR to communicate with a web server. I have created two clients for the web server, one is the iOS app, the other is an HTML client which I'm using for testing purposes.
I have two iPhone handsets which I'm using to test the iOS client. These are:
Handset a) The app was installed by debugging the app in XCode on the phone.
Handset b) The app was installed by creating an archive in XCode and installing it through iTunes.
The iOS app works correctly on handset a, but not on handset b. The HTML test client works correctly through the browser on both handsets.
Analysis of my web server logs shows that when handset b uses the iOS app, the web server does not pick up the initial connection at all, regardless of signal strength or length of time.
Is it possible that compiling the app into an archive through XCode is, in some way, not picking up the SignalR-ObjC libraries properly? Is there some other step that I haven't found in the SignalR-ObjC documentation?

It turns out that deploying to the phone via XCode deploys the Debug build, whereas deploying via iTunes deploys the Release build. For reasons I'm yet to work out, the libraries that I am using were not packaged properly in the Release build.

Related

iPhone test flight xcode7 xcode8

I have built a application in Xcode 7 with Push Notification using test- flight in development. I also have a created a script to push notification to the devices using the token of the devices that I stored in a database.
I simple flag the devices in the database and my scripts read the tables and send a notification to the device(s). Works!
All was well until xcode8.
Now The only way the scripts work is if I "attach" the devices to the mac and build and install the app using the attached cable. I then detached the devices and the scripts works.
If I "archive" the app to iTunes and then using test flight as an external user, i then install the app from test flight, I never get a notification when I run the scripts.
So basically, If I attached the device locally and build, install using a cable it works great. but if uploaded to iTunes and using test flight it does not.
below is as much screen shots
/Users/webcastman/Desktop/Screen Shot 2016-10-26 at 1.55.39 PM.png
/Users/webcastman/Desktop/Screen Shot 2016-10-26 at 2.14.20 PM.png
/Users/webcastman/Desktop/Screen Shot 2016-10-26 at 2.15.12 PM.png
/Users/webcastman/Desktop/Screen Shot 2016-10-26 at 2.16.13 PM.png
The first step in sending a remote notification is to establish a connection with the appropriate APNs server link:
•Development server: api.development.push.apple.com:443
•Production server: api.push.apple.com:443
When you are installing app in your device through Xcode, I think its build using development provision profile if you have selected Automatic in codesign settings. and when you are archiving and uploading on testflight its build using Distribution profile.
You need to customize your script to send notification for development and distribution(Production) app.
When you are installing app in your device through Xcode, I think its build using development provision profile.
if you are using gateway.sandbox.push.apple.com, port 2195, change it with production url.
•Sandbox: gateway.sandbox.push.apple.com, port 2195. (for development)
•Production: gateway.push.apple.com, port 2195. (for production)
you also need different APNS certificate (.p12 or .pem- whatever you are using in your script) for Development and production build.
After changing this, you will start getting notification for builds installed through test flight too.

simulating app upgrade in iOS

I am trying to simulate an upgrade from version 2.0 to 2.1. I have version 2.0 hosted in testflight, so I did install it in my device. Then I tried running the app from xcode. However what happened is that the app did not get overlapped, instead it created two apps with the same name. How can I make it such that when I run the app from xcode it overlays the old version?
I've made sure that the bundle identifier is the same.
Well the info you can get while updating can be found # this link here.
when user updates an app, Documents folder is stored as is, including
NSUserDefaults (but, sometimes user download app via iTunes and
replace the whole application, crying 'OMG! update killed all my
levels progress!'); Application bundle is erased and replaced by new
one (anyway, it is readonly for user); Re-deployment of new build
version will be enough;
You can't access the appstore inside the simulator because: # link here
It's a simulator not an emulator. Even if there was an App Store in
the Simulator, none of the apps in the store would work since they are
compiled for ARM CPUs while the Simulator runs x86 code.
Another stack overflow # link here states:
Build and install your old version, generate some data, and then
install the new version on top of it.
For testing before submitting to the Appstore I generally download
from the AppStore again the old version, and then install with Xcode
the newer version - for your next update... ;-)
And another stack overflow (that I lost the link for) states:
No, the simulator runs i386 binaries and iPhone appstore apps are ARM
binaries apps.
iOS apps are compiled to machine code, Android apps are run in a
Virtual Machine using byte code and are translated to machine code at
the time they are run.
So no, I don't believe you can run it in the simulator, how ever you can have older projects saved on the iPhone and test both out. And the apple documentation is # this link here.
Read this: https://developer.apple.com/library/ios/technotes/tn2285/_index.html
You cannot simulate update in XCode (neither in simulator or connected device). You have to create IPA file and simulate update process via iTunes.

Get iPhone app to iPod from remote machine for testing

My problem is - I work on a remote mac through Remote Desktop Connection - from a windows host.
I have my app ready on remote mac.
I have my iPod with me, connected to my windows host.
How do I get this app onto my device for testing purpose?
My access to the mac is through RDP.
I edited the rdp connection to allow local usb access to my remote mac, (remotely) hoping that my mac would see it as a device. But it didn't.
Is there any way it would see my iPod?
(I already read this and it requires mac-to-ipod direct connection.)
Or is there any other path I can get my app package on my device for testing through windows machine?
Firstly you will have to add your iPod to the developer portal if you haven't already. Next you can do a build and archive which will export your app into organiser. Click on the app version in organiser and click the distribute button and make sure you select ad-hoc distribution. This will give you a .app packaged version of your app which can then be sent across to your windows machine from your remote desktop where you can then drag it into iTunes and install it on your iPod.
If you are testing lots of different builds of your app over a short space of time then i would suggest using test flight, which can be found easily when googled. It allows you to upload versions of your app through and ad-hoc .app package which ca then be installed across all your devices using the test flight app on your phone. I would only recommend doing this if you are doing lots of builds and testing on lots of devices though.
Hope this helps
Sam

How to setup PhoneGap without xCode installation?

I am beginner to PhoneGap app development. Below are my queries.
1. Is it possible to setup PhoneGap SDK without Xcode installation.
2. If YES then how to do same.
3. If NO then is there any way I can write a iphone application without Xcode installation(I dont want to pay 99$, because I m a begineer).
4. I have a MAC, Windows, Linux PCs. Tell me all the free SWs. Its ok if I am not able to test the application initially.
Is it possible to setup PhoneGap SDK without Xcode installation.
No.
If NO then is there any way I can write a iphone application without Xcode installation(I dont want to pay 99$, because I'm a beginner)
XCode is free. It's in the AppStore. The $99 is to give you the ability to distribute applications in the AppStore and run it on a device. You will still be able to develop and run applications in an emulator for free.
I you don't want to install the dev environment, you can use their cloud service to build native apps written in HTML+CSS+Javascript. It's free and allows you to target all the supported platforms.
https://build.phonegap.com/
You only have to upload your finished app and get a compiled, native app.

How to add adhoc application on multiple iphone on the same computer in itunes?

How to install my app in adhoc release on multiple device with the same computer/itunes, when i try to do it, itunes sync the devices..so i clean them up ...
Apple has solved your problem with an Enterprise Utility called the "iPhone Configuration Utility" which you may freely download from their information webpage here: http://support.apple.com/downloads/iPhone_Configuration_Utility_2_0_for_Mac_OS_X
Once you install this and connect a device and close iTunes (which typically launches in response to the device connection) you can easily use its simple interface to manage your adhoc provision profiles, add the device and install or remove adhoc apps directly.
I used this app months ago to put the Crash Landing demo I'd built with the SDK directly on my wife's 2.1 iPhone 3G from my desktop dev Mac without messing up her own laptop Mac iTunes sync management of her apps, music, etc. FYI: I've not tried this since the June update to v2.0 of the Utility which accompanied the release of OS 3.0. edit: I couldn't resist testing this (yes, it still works)
The only downside I noticed to this method is that the iPhone/Touch user will have to later delete the app manually on their device, as their iTunes management won't list the app in the device applications tab to be unchecked.
it should just work, as long as the mobileprovision file that you're using includes all of the devices that you're trying to use. (also assuming that all of the devices are set to sync to that one computer's iTunes library.)
If the device is jailbroken you can install sshd and copy the application directly.