iOS: How to install a configuration profile programmatically - ios

I would like to install a configuration profile in an iPhone that I receive through Safari from my localhost (RoutingHTTPServer) in the device.
I follow guidelines and tips that I found in this website to make it possible, but I am facing a small issue, in the final steps. I am able to run the localhost and create the configuration profile, but then Safari does not allow me to install the file due to an "unknown error".
I made some research and I found several possibilities to this "unknown error", most of them related to the format of the contents of the file created. I arrange that in different ways, but still the same problem.
My application it is just a concept solution, but I would like to know if the error could be because, it is mandatory to sign and encrypt the configuration file before sending it through Safari.
Thanks in advance

No, it is not mandatory to sign the configuration profile. Try the following steps
Connect the device to the laptop (windows/mac).
Open iPhone Configuration Utility.
Create a profile of your need.
Try installing it into the mobile.
Check the console for error.
If installation succeeded then export the profile and place it into the web-server and try installing the profile OTA. (Note: Uninstall the previously installed profile).
Open the profile and analyse it for identifying your mistake.
Your research is right, the main reason for Unknown Error is the formatting mistake. The detailed description about the payloads and keys are available under this link.

Related

iOS certification generation with Codename One

I am trying to generate the required certificates to build Apple App, but I get a runtime error while adding a new device via the certificate wizard.
The error reads (RuntimeError) Please login using Spaceship::Portal.login('user','password')
Before trying to generate a certificate I first connected successfully to itunes connect with my credentials. The error seems to be related to Fastlane presumably used internally by CodenameOne to generate the certificate.
Moreover I also tried to remove one character in the UDID and I got the same error which is estonishing. However the UDID has been double checked with someone who dictated it to me. So the UDID is a 1-to-1 copy of the one shown in itunes.
Why do I get this error message and what can be done to remove it and be able to add the new device ?
Please note : My setup involves codenameone running under Eclipse Mars under Linux 64.
Any help appreciated!
Thanks for reporting this. It should now be fixed. Please give it another try.

ios provisioning profile valid signing identity not found

i am developing an native ios application on mac os mavericks image on vmware, i am doing a training in a company. this application contain PushNotification service. i have download a video tutorial and i complete all the tasks as the video show. but in the end when i install the provisioning profile it show this warning message : "valid signing identity not found" . i have work on this issue many days.
i am new in ios developing, so day by day i read questions of developers that have this issue also and i've read the answers and try to fix it but no result.
can anyone help me and guide what to do. down i will notice what i've see and i feel that this could be the problem and i can't do anything:
- when i create the provisioning profile , they gave me numbers of certificates to chose, none of these certificates is the one that i create.
There are probably many reasons for this message and many more potential solutions.
I often see this error message display when building. Quitting and restarting Xcode usually resolves the issue for me.
Have you tried downloading the provisioning direct from apple site? Sometimes I have problems when I try to update directly from xcode.

IOS Distribution Certificate using Adobe Flash - Error Storage Issue (Mobile Provisioning File) PackageExtractionFailed

I am trying to install an app on my iPhone from my computer using Flash cs6. I had it working before but my p12 expired. My friend on a mac made me a new one. From developer.apple.com I created a new provisioning file. I run the app install and I get this error.
Error Creating Files.
Installation Error: PackageExtractionFailed.
Device Error: please check if there is enough space on the device.
I have enough space. I think this is an issue with the two files and a combination of many other things. There are just so many options when making the provisioning file that I don't know what ones to choose for DEVELOPMENT.
I am putting all the errors in length in hopes that, when we find the answer, someone will find this in a search and it will help them too. It's very hard to find info on this error. Any help would be greatly appreciated. Thanks
http://www.instructables.com/id/How-to-use-Adobes-iPhone-Packager-without-an-Appl/step2/Exporting-the-App/
try with this one, if it work make another provisioning profile

Xcode stuck at “Your application is being uploaded”

I am facing an issue while submitting my app from Xcode to the App Store. I have done everything regarding my project, and its running fine on my iPhone and iPad. But when I submit my project I am facing a huge problem.
First after archive I have done the validate. Now my archive file in Organizer is showing status pass validation as well. So I believe I am at the final step of submitting the app.
I have clicked on distribute and selected submit app to app store.
After login I have selected provisioning files as well.
I am stuck here. You can see in the screenshot below. And I have never seen any
progress bar where I can see the submission progress or something like that.
Only screen I can see is:
Edited:
It was near about 1.30 hours. And internet connection is working. My ipa file is only 3.5 MB.
And last when I tried Application loader to upload the same I received the following screen as well for a long time in Authenticating with the iTunes Store... ..
What should I do now?
As I felt a serious issue on this. I believe this answer might be helpful.
After trying for around 10 to 12 hours to fix this issue and as everything else regarding my project and coding was fine enough, it became a headache for me. But after getting some valuable comments from some of the expert users of stack-overflow and after doing some more search on the internet, I have found some quality answers.
This answer helped me the most:
application loader stuck at the stage of "Authenticating with the iTunes Store"
If you are going to upload it through Application Loader and it gets stuck on "Authentication with the iTunes Store..."
or
You are going to upload it through XCode and it stucks on “Your application is being uploaded”
Then just keep your head cool and check this first method:
Check if your firewall protection is off. If not then turn it off. It maybe blocking you to connect your computer with iTunes
Store.
Try a different internet connection. The purpose for trying a different internet connection is that your current internet connection maybe blocking a required port for connection to Apple servers.
If the above steps doesn't help you then follow this second method:
Xcode needs java runtime for uploading your apps to the App Store.
enter 'java -version' in the terminal, java version should be 1.6 .If not then download
latest compatible java only from apple download center:
http://support.apple.com/kb/DL1572?viewlocale=en_US
If this still doesn't help then follow this third method:
This method enables the application loader to use the HTTP port instead of HTTPS.
Go to
Application Loader java folder :
/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/java/lib
Open net.properties file using any text editor application like text mate or sublime text
Change this particular line : #https.proxyPort=443 proxy port to
https.proxyPort=80
Save the file. And that's it !! You can easily upload your binary file to App
store now.
If the above methods still doesn't help then follow this fourth method: Regenerate your certificate
Goto iOS developer portal (https://developer.apple.com/membercenter).
Revoke current certificate which is used by your App for signing.
Remove current "iOS distribution provision profile" from Developer
portal.
Regenerate the iOS distribution certificate and add them in developer portal.
Regenerate "iOS distribution provision profile" for app store
distribution and download to mac.
Install it.
Try again using xcode/application loader to upload the build.
There is definitely a problem if your app stuck on "application stuck process". I suggest you to go with Application loader rather than Xcode itself as Application loader shows the activity status. You can clearly know in which step you stuck.
The most frequent issue faced is to stuck on the "Authentication with the iTunes Store..." step.
There are possible two work around which I followed and finally submitted my app to app store. You can try both. For me both worked at least once.
Method One : This method plays with proxy port to use http connection over https
Go to Application Loader java folder : /Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/java/lib
Open net.properties file with "sublime text" or "text mate"
Change "#https.proxyPort=443" proxy port to "https.proxyPort=80"
Save the file and reopen Application Loader and Try again.
Method Two : Regenerate your certificate and iOS distribution provision profile and Try to upload
Goto https://developer.apple.com/membercenter
Delete previous certificate referenced by your App for signing.
Revoke your distribution certificate and download it to your mac. And install it by double clicking it.
Delete current "iOS distribution provision profile" from Developer portal.
Regenerate "iOS distribution provision profile" for app store distribution and download to mac.
Install it by double clicking it.
Try again using application loader to upload the build.
Edit: I again got this problem while uploading new build. Both of above methods were followed but was stucking in "Authentication..". Restarted the mac book and it worked. When you restart, the previous itunesconnect connection (which you might have opened in browser prior to submit your app) are reset which allows restarted mac to easily authenticate iTunes Connect. Yesterday (jan 26, 2014) the iTunesConnect authentication step proceeded within 2 mins. Hope this helps someone who is loosing patience while stuck on authentication step.
Edit 2: Before deleting distribution Certificate, try only regenerating "iOS Distribution Provision Profile". It worked for me else you can redo as above.
I Hope this helps. All the best.
I tried all the steps from Rajan's solution; none worked. However, this threads on apple dev forum (https://forums.developer.apple.com/thread/76803) gave me the solution in my case :
Try this, it fixed it for me. Open Terminal and run:
cd ~
mv .itmstransporter/ .old_itmstransporter/
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"
iTMSTransporter will then update itself, then you can try uploading in XCode again.
For me, just logging out from ituneconnect website and developer.apple.com does work.And just using xcode to upload. No need to restart
I got this issue today. But finally I found it's caused by my wrong settings.
In 'Build settings' of the target, change settings "Code Signing Identity -> Release" to your production certificate, and "Provisioning Profile -> Release" to your distribution provisioning file.
Then archive and distribute it again.
You can try to cancel the upload and retry. If that does not work you may want to try the Application Loader from Apple. It essentially does the same thing, but does not resign the binary. You can download the application loader from itunes connect. See https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf (Getting Started, Page 9)
I had the same issue.
I cancelled and ran a validation check. It turned out I had written a URL Scheme incorrectly.
Xcode did not gave any errors when uploading and simply got stuck but validating gave the error.
So, try validation first. Hope this helps someone.
try this on terminal
cd ~
mv .itmstransporter/ .old_itmstransporter/
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"
worked for me after hours of researching
This is Happened Due to the iTMSTransporter
Try this, it fixed it for me. Open Terminal and run:
Use these commands one by one on the terminal. Hope it will help you
cd ~
mv .itmstransporter/ .old_itmstransporter/
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"
iTMSTransporter will then update itself, then you can try uploading in XCode again.
I met this issues many times, I tried all steps but it still not working (home network) and try other network work fine (company network).
I fixed this problem by update latest Java SE from 1.6 to 1.7 and it work like a charm
To be honest, this may not be an answer but it really worked for me.
I launched Application Loader and started submitting. While sumbitting was going on,
I launched Organiser and select Distribution over archiver in Xcode as well and started uploading concurrent.
They worked together and 2nd one completed the submission.
Just my experience.
For me the issue was that I've changed my Dev. Account at some point of time and Application Loader itself was not authorized anymore. You have to manually to go it (Xcode -> Open Developer Tools -> Application Loader) and fill in your account details
I had the same issue. I as able to fix it by:
Remove/delete all distribution certificates and provisioning profiles from my machine.
Revoke distribution certificates and delete distribution provisioning profiles from Member Centre at developer.apple.com
Create a new Distribution certificated by generating a new certificate signing request from keychain access
Create a new provisioning profile for app store distribution
Download newly created certificate and add it to keychain access
Download newly created provisioning profile and add it to xcode. OR sync from Xcode from account settings.
Try to upload again.
This is some silly issue that Apple needs to fix asap. I wasted 2 days from something as silly as this.
I had the same issue. Trying all these answers may work sometimes, but usually it takes much time and may not work at the end like in my case.
I figured out a solution which will probably work for all.
Create your .ipa file by: Product -> Arcive -> Disribute(Save for Enterprise or ...) -> Next and save .ipa at target
Xcode -> Open Developer Tool -> Application Loader -> Deliver your app -> Pick your .ipa file
Withing few minutes your app will submit to iTunes. Good luck
All i did was duplicate my Application Loader.app in /Applications and ran both Application loaders at the same time.
I had the same issue after updating Xcode5 to Xcode6. After hours of craziness, the one and only thing that helped me was to delete my account in Xcode preferences and add my account again.
Last week I had the same issue after update to Xcode7, this helped me again...
If you are running inside a virtual machine (e.g. VMWare or VirtualBox), try setting the network adapter mode from the default NAT to Bridged.
This worked for me:
Logout from iTunes portal in all the browsers.
Restart your Mac machine.
Open Application Loader
Click on your Apple Login in the Top Right corner of the Application Loader Window.
Clicking Next will succeed your authentication process.
Now, do your process as usual by clicking upon the "Deliver Your App" and following the procedure beyond that.
My problem was I forgot to change the Bundle Identifier in info settings for the target. Hope it help someone.
I had similar issue while uploading iOS apps through application loader.Then once after i opened iTunes parallel all of the sudden uploading apps was faster.Not sure if iTunes has any dependency with application loader.
None of the answers worked for me and my upload was hanging for days without any error. (my build was generated using Expo). Here's what I did to make this work:
In the apple's guideline, it says one way to upload the build is to use the Transporter.
Using the Transporter, it was able to detect and output the error.
It turns out the root cause for me was the XCode version was 9 but it has to be 10.
I hope this helps others who are struggling on this issue.

How to create Deployment package for iOS using Marmalade

I am using Windows7 and Marmalade 5.1.10. I tried to create deployment package for iOS but it is giving error of certificate not found at particular location. I checked in that location and there is one .cer file presents. I installed that certificate under trusted root authorities store. Still I am getting same error. Then I copied that and renamed .cer file to AppleWWDRCA.cer file as per given in error message. After that it is giving me error:
"Signing error: Can't find your developer signing private key at C:\Marmalade\5.1\s3e\deploy\plugins\iphone\certificates\developer_identity.key".
Let me know how to resolve this issue.
Note that I dont have Apple ID created for iOS developper.
Please share your input on this.
What if I just want to test with iPhone simuulator? I tried following:
I created my simple demo application. Then I created package for iPhone on my Windows PC. While creating package I selected option "Do Not Sign". I got success with that. Then I transfered .app to my MacMini. I copied .app to XCode in appropriate folder of Application. Then I started iPhone Simulator and I can see my application. But when I click on that it is not opening.
So now let me know what can be issue. Is it due to certificate issue or due to selected option "Do Not Sign"?
Please treat this as little bit urgent.
Thank you very much in advance for your inputs.
Regards,
Premal Panchal
There is a detailed description of how to create the necessary certificate files in the Marmalade Documentation help file, installed as part of the SDK. You can find it here:-
Marmalade->Platform Guides->iOS Guide (for iPhone, iPad, iPod)->iOS Requirements and Setup Guide
When you say you don't have an Apple ID created for iOS Developer do you mean you haven't signed up to the iOS Developer Program? If so, then you won't be able to generate a signed build at all.
Regarding testing with the iPhone simulator, I don't think that this is possible. If it is possible you will probably need to have a signed app. I believe the reason XCode can run in the iPhone Simulator even without valid developer certificates is that it is doing it's own signing of the generated app behind the scenes.

Resources