Cannot view Quicktime movies over HTTPS in Safari or UIWebView - iphone

I am trying to get my iPhone application to work with HTTPS in addition to HTTP, but using UIWebView or MPMoviePlayerController to view a Quicktime MOV file doesn't seem to work over HTTPS. I get "This movie could not be played". I tried in Safari to eliminate my app as being the problem, and the same thing happened. If I use HTTP, it works fine.
This thread has a similar discussion, but no resolution: http://discussions.apple.com/thread.jspa?messageID=12908818
I am not using self-signed certs; my machine has a registered SSL cert, and I pushed both the GoDaddy intermediate cert and the normal cert to my iPad (4.2.1) using iPhone configuration utility. I verified this works because Safari doesn't prompt me about the certificate when visiting the secured site, like it would before. I can view the movie over HTTPS using normal browsers such as FF or Safari on OSX, just not iOS. It also appears to work in the simulator as well, but I have tried both iPhone 4.1 and iPad 4.2.1.
Is there any workaround that will let me view video over HTTPS?

After experiencing the very same problem and symptoms, I was able to gain access to the Apple Developer Forum thread mentioned here
The upshot of the Apple thread is that you must have a valid Intermediate Certificate installed on the server. It is not enough to have only the server certificate installed.
I have tested this with Mac OS X 10.6 Server. I installed the server certificate and while desktop browsers were able to stream a video over HTTPS, iOS devices (iPhone and iPad) both gave the "This movie could not be played" error.
Installing the Intermediate Certificate fixed the problem.
Other devices, like Android phones and tablets, and RIM PowerBook (via Flash) had no problems playing the video without the Intermediate Certificate. I suspect it is a case of iOS being overzealous with its security, a "Feature" if not a bug ;-)
I'm not a PKI expert, so I cannot tell you why this works. Perhaps another contributor can explain the PKI voodoo behind this.

Marking this as resolved. This parallel thread on apple dev. forums:
https://devforums.apple.com/message/361209#361209

Related

Is it possible to test an app in an iOS device without having a Mac?

I believe this is a duplicate question, but examining the others I could not find my problem exactly.
I have developed a flutter app and I intend to publish it. So I rented a virtual Mac, loaded the project in XCode and tested it on a simulator. Everything worked fine.
I have an Apple Developer Account, Certificates, registered an iPhone, etc., but it seems that I have to physically connect the device to the computer to be able to run it on the iPhone. No way to do that remotely (I'm in Brazil and the virtual Machine in NY).
XCode tells me to plug in the device so it can register it (but I have registered it already in the developer's site).
I thought it would be possible to generate some kind of executable to download to my iPhone, but it appears that is note the case.
Is there any other way I can do that?
Maybe I can skip this step and try to publish the app, because it is the same project as an Android app already tested and published in Play Store.
The answer is yes, the modern answer is probably TestFlight. But this has always been possible using OTA downloads. To do this, archive your app, create an OTA manifest and put this on a web server somewhere. Then you can download the app straight to your phone (assuming it's signed with the correct provisioning profile and all that). We used to do this a lot before TestFlight came along.
This question and
this article are somewhat related to what you want to do
I was having trouble to test without an iphone what I did is register this device on my account https://messapps.com/wp-content/uploads/2016/08/udid.png and so far I could build the app for iOS.

App download with webclient not working on device but work on emulator, monotouch iphone

I'm downloading json data in my monotouch iphone application by webclient. and using json.NET 4.0 R3 for MonoTouch for parsing json data.
Every thing is right on emulator but on when I create a ad-hoc api file and install it on the iphone it does not work.
I have not device on my hand to debug it and find the errors. can any body help me from what may be the diffrent on emulator and device?
I have no idea if this is your issue without further information, but I know I ran into an issue with my app where it worked fine in the simulator but failed on the device. My issue was because of trampolines. I had to increase mine when running on a device. Here is an example of this problem: MonoTouch SIGABRT "Ran out of trampolines of type 2" error
EDIT
I had that issue (where the app wouldn't download) also with my in-house deployment. Are you using the correct certificate to sign the app for distribution? You need to make sure that you are using a Distribution certificate. You need to make sure you have a certificate here: https://developer.apple.com/account/ios/certificate/certificateList.action?type=distribution and a provisioning profile here: https://developer.apple.com/account/ios/profile/profileList.action?type=production.
Have you connected a physical device (provisioned for development) for debugging and made sure that it correctly works on the device? This needs to be your first step. If this works, then the issue is likely a certificate/provisioning profile problem and has nothing to do with MonoTouch.
It is not from webclient. Please consider on your codes for parsing json by json.NET 4.0 R3 for MonoTouch. It is better that use JSON.Net componnet that xamrin himself published.

Enable Passcode Lock in xcode IOS Simulator

I'm using IOS Simulator v6.0.
Device is iPhone (all iPhone devices behave the same with regards to my problem)
IOS version is 6.1
I'm attempting to download a p12 via a web app using the built-in safari browser.
When the download completes the user is automatically taken to the settings app (which I understand is necessary to complete installation of the p12) - but there is no option to complete the installation. Ive read that a Passcode Lock is required for enabling certificate imports. However, I can't find out how to enable a passcode lock within the iPhone IOS simulator.
The doc I've read says the option should be within: Settings -> General -> Passcode Lock
Except its not. Is this a simulator specific restriction? Can I overcome it?
Neil,
Yes, as you've pointed out, the iOS Simulator is not a 100% accurate replication of the operating environment found in an actual iOS Device -- certain classes of interactions that are dependent on specialized hardware (cameras, gyroscopes, magnetometers, hardware-based encryption technologies, etc.) are naturally unsupportable in a simulated environment. Other classes of interactions that would seemingly be 'software-only' kinds of interactions are also prohibited on Simulator (Push Notifications, iCloud, etc.) -- these are attributable to a couple of things:
Unlike physical devices, you do not provision the iOS Simulator. Since Provisioning Profiles include entitlements for these Apple services, there is no (current) way for Simulator to understand how to connect to your specific app's slice of these services.
Simulator does not have a unique hardware identifier, so connections from your Simulator would be indistinguishable from connections on any other Developer's Simulator.
And finally there are the class of interactions that don't fit either of the exclusions from above that can only be attributable to design decisions made by Apple. Passcode lock, for example, can simply be enabled by security-conscious iOS device users...or it can be enforced by IT departments by way of Mobile Device Configuration policies (via ActiveSync, MDM servers, etc.) Adding only the generic, non-IT-mandated version of Passcode Lock would cause intra-Simulator feature parity as only the most Generic Passcode lock behaviors would be supported, leaving MDM users out in the cold. To avoid this, Apple would then have to endow Simulator with the knowledge to support .mobileconfiguration profiles, connect and periodically check with MDM servers (thus requiring unique hardware identifiers), and ultimately include the Mail.app in Simulator to allow for Exchange connections to be setup to enforce ActiveSync managed configurations.
As you can see, the relatively simple feature quickly spiders out to a host of other iOS elements that would also need to be simulated. Taking this to the most unlikely, extreme edge case, Simulator would become a full-fledged software-only iPhone where you receive calls and texts, check email, etc. directly from the iPhone shaped interface on OS X...not an experience Apple would like for users to have even though those users are their 3rd-party developers.
Though there are some interactions we can easily deduce the rationale for their omission from the simulator, only Apple really knows why they elected to exclude other interactions from Simulator.
So, back to your questions:
Is this a simulator specific restriction?
Yes, this is currently not supported in iOS Simulator as of Xcode 4.6.2.
Can I overcome it?
To the best of my knowledge, no.
I do, however, think that your lurking question about installing a Certificate in Simulator is something that you can do something about -- In fact, I installed a self-signed certificate authority into my Simulator to do some security testing about 2 months ago based in large part to some of the work presented by the Developers of the Charles web proxy.
If you download their shell scripts you can see how they injected self-signed certificates into the Simulator keystore -- assuming your ultimate goal is to get a certificate installed, you may be able to apply a similar process to your own certificate.
Do make sure to backup the default keystore; It would be really easy to accidentally break the binary data in that file and render your Simulator useless for all SSL connections.
As is likely tacitly understood, this is not a supported operation in iOS Simulator -- tweak Simulator at your own risk.
Good luck, and if all else fails, push your app to device where you can definitely get a certificate installed.

Anyone else having problems installing iPhone Enterprise apps on released IOS 5?

Anyone having problems deploying Enterprise apps on iPhone/iPads running the released version of iOS 5 using the OTA ("over the air") methodology?
During the installation process, we get the alert box: "the app could not be installed at this time". Tapping the Retry button does nothing. In some cases, repeated tapping of the Retry button eventually results in a gray, empty launch icon being left on the home screen. No app installed. No other errors.
Anyone else seeing this or have a resolution?
The below description is a bit involved, but please bear with me as it may help others who run into the situation. I will post the resolution if get a resolution from Apple. So far, no joy there.
Our app refuses to install OTA on iOS 5. This same app WILL install on iPhone/iPad devices running iOS 4.x.x AND the same app will install on iOS 5 devices physically connected to a desktop machine using the iTunes app.
The Apple Developer forums under the IOS 5 Beta category complained about the problem but no indication of resolution as of last week just before the official release of iOS 5.
Cookies are set to be accepted.
Bowser cache and history cleared.
Using mobile safari originally installed with original iOS version 4.x.x.
System hardware and operating system configuration
iPad 2, iPhone 4 or any iPhone device running iOS 5 RELEASED version.
Browser and version
Mobile safari that is installed with iOS 4 on ipad2. Don't know if mobile safari upgrades with ios 5 upgrade.
Using a corporate wifi network. Yes, we are behind a firewall and use a proxy server. Since iOS4 devices install without problems, I don't think installation being blocked by the proxy or firewall.
Enterprise app built with Xcode 4 and ios5 sdk provided with it. Built to be backward compatible with iOS 4.0.
Distribution provisioning profile is correct as we have been using it for several weeks.
This app installs properly on iOS 4 devices both over the air and via iTunes application method.
This app installs properly on ios5 devices through the physical connection with iTunes application on the Mac desktop.
Steps to reproduce:
User types in the URL in mobile safari on iPhone/iPad running ios5.
The resulting webpage shows the download app link.
User taps on the link and is asked if they want to install the app.
User taps the yes, install button.
App proceeds to install.
A gray launch icon shows up on the home screen with the progress bar empty at the bottom of the icon.
Message below the icon indicates "loading".
Seconds later, user gets the "cannot download app at this time" error message as seen in screen shot attached.
Tapping the retry button results in the same action just described.
Tapping done results in the download stopping.
If you tap retry several times, user sometimes is left with the gray empty launch icon, which will not launch and cannot be deleted.
Note: In the apple developer forums, under the iOS 5 beta category, people are describing the exact same problem with no resolution.
Had the same problem, and was able to resolve it. However, the error noted is not specific to a single cause that handles every case... some detailed investigation needs to occur.
Your best bet is to connect the device to your Mac, and using the Organizer of xCode view the console logs while you are attempting to do a wireless deployment. There will be some useful information available -- please post the logs.
For my case -- the icon files were missing from the build, as a result of moving from xCode3 to xCode4 and also, the distribution plist was referencing an image that returned a 404. Both were logged in the console, but not very clearly.
Also, as a sanity check, manually verify the URL to your IPA file also.
I had this same problem and was sure everything was correct in my project; but restarting Xcode and doing a clean revealed my Enterprise scheme had somehow defaulted to the wrong provisioning profile.
Re-selecting the correct profile and re-archiving the app fixed the issue for me, I'm able to install an enterprise app on both iOS4 and 5.
I wanted to chime in after fighting this for a few hours. It is iOS 5 specific.
We had an htaccess password protection on the directory. Removing this allowed the app to finally download. So if you have htaccess, perhaps you can point the user to a parent directory that is password protected, then navigate to the subdirectory containing the app that isn't password protected. This is a temporary solution, apple needs to fix this.
Another thing to consider is the URL you specified in your over-the-air Application.plist file. I received the same error message ("-application- could not be installed at this time") because the URL I specified was too unspecific. Rather than writing "directory/directory/application.ipa", I had written "directory/directory/". You must include your application in the complete URL of the plist file's configuration.
If you didn't do this, don't fret! You don't have to rebuild the entire thing from step one, you can open your .plist file in any standard text editor and simply change the URL.
We had the same thing.
Our mistake was to point to a wrong 512.png icon in the manifest.
Which was no problem on iOS4 but turned out to stop iOS5 into a "...at this time" alert.
Wanted to chime in on my experience.
In my case, we were changing the address where the IPA file was hosted. Although I updated the PLIST file with the proper URL to the IPA file, iOS was still going after the old URL almost as if it cached the PLIST data. Creating a copy of the PLIST file and renaming it resolved the issue (data within the file remained unchanged)
I met the same problem today. The app can be installed in ios4, but failed in ios5 with "** could not be installed at this time" alert.
According to patricksan's suggestion, I download iPhone Configuration Utility 3.5 for Mac OS X, and try to catch the log while install the app through OTA.
The log helped me finally, one sentence of the log says entitlement 'get-task-allow' has value not permitted by a provisioning profile. It remind me that if the code signing identity in build settings of Project and Targets are correct, after checking them in Xcode, I found the code signing identity are not correct one, they should be iPhone distribution:.... other than iPhone developer:..... After correcting them, and re-Archiving the ipa file, it can be installed in iOS 5 now.
Check your Info.plist for Required device capabilities property. I recommend to delete completely this property if you haven't any restrictions on use.

Invalid SSL Certificate error on iPod Touch - works for iPhone

We are developing an iOS Application that connects to a server over https using nsurlconnection sendsynchronousrequest
We are getting the following error in the iPod Touch 3.2. However, the exact same code does not give any error on iPhone 3.1
Error message:
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xx.xx.xxx.xxx” which could put your confidential information at risk
We are trying to connect to a server https: subdomain.domain.com and the certificate actually belongs only to https: domain.com Could that be the reason of the above inconsistency? Any idea why it works on iPhone and not on the iPod Touch. The certificate is signed by GoDaddy. Could it be that the iPod Touch does not have GoDaddy's root certificate?
We need to find a way around this problem without preferably using private APIs. Any help will be appreciated. Thanks.
We had almost this exact problem: A certificate error on a particular device running the same code that worked on multiple other devices. It turned out that this had to do with the internal date of the problem device not being current. Our SSL certificate was up to date, but the device was set outside the valid date range. It's worth checking because it could happen to anyone - even the iTunes app reviewer rejected the app for this reason. Luckily we were familiar with the issue, appealed and got a quick approval.