AS3 air multiple apps required to use APNS - ios

I have 2 versions of the same app, one for iPad the other for iPhone. The app requires APNS services but could someone explain the setup of App ID's, provisioning files, and certs.
Let me explain what I have done and please correct me if I am wrong.
I have created an app id which has push notifications enabled. I have also created a distribution cert converted to P12. I also have a distribution provisioning file that is linked to app id com.myapp. Now, in the iPad app which has already been approved and sent to the app store uses u26hiu61.* (example) in the application description file. The iPhone version is ready to be sent to apple for approval but can I use the same app ID in the iPhone version? So basically have exactly the same app description file (other than the targeted device).
So can I pretty much use all the same certs, provisioning profiles and APNS cert for the second app?

You can publish a single app in the appstore and have it available for ipad and iphone.
You specify the devices to support in the app descriptor file:
<iPhone>
<infoAdditions>
<![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
...your other settings
]]>
</infoAdditions>
</iPhone>
Where the 1 signifies iphone and 2 is for ipad.
So yes, you can use same certs, provisioning files etc.

Related

The executable was signed with invalid entitlements [AIR]

First before anyone suggests this has been answered elsewhere on SO, I submit that ALL of those answers assume you are compiling with XCode, which is not the case for me. I am using Adobe Animate to compile an Adobe AIR application and deploy to an iPad.
Updated Adobe air SDK to latest 32.0 and have tried re-creating my certificates and provisioning profile from scratch.
If I try to deploy directly from Adobe AIR I get an error message
"Application verification failed"
If instead I publish an .ipa and try and deploy via XCode I get the following
If I furthermore check entitlements on my app.bundle I see
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>foo.domain.app</string>
<key>get-task-allow</key>
<true/>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
but checking entitlements in my Provisioning profile I see
<key>get-task-allow</key><false/>
Could this be the source of my error? If so, how do I get both these values to be the same?
Any replies welcome as I need to launch this!
Here are a few ideas/things to check.
Check beta reports key is removed from the app descriptor.
When changing iOS certificates, delete the old ones via Keychain Access, then restart the computer before creating the Certificate Signing Request for the new cert.
Check that the new assets.cer has been created for the icons and it has been included in the package.
Check that all icons are present and all casing is correct in the naming on icon files as well as in xml.(e.g. icon and Icon)
Ensure path to SDK is correct. e.g. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
If you still cannot install the app from Animate, try including the beta reports key, publish the app and upload it to TestFlight.

iOS install in-house app wirelessly

Need some help to understand terminology and the process correctly.
I have an iOS app that i want to install on my Devices for testing. So far i was able to install the app on my devices only through iTunes(with archived .ipa file), plugging the device to my Mac.
My iOS developer program is not enterprise, it's regular Developer Program (the $99 one).
Can i use over the air installation in my case? http://help.apple.com/deployment/ios/#/apda0e3426d7
My app is built with a "Development" Provisioning profile and not "In House" provisioning profile. Documentation says it must be built with and in-house provisioning profile. I don't have in-house option in my Developer Program interface.
What other wireless, web based installation options can i provide my users?
The difference between signing with an Enterprise account in-house distribution profile and one from a regular account is that the former allows any iOS device to install the .ipa, and the latter one allows only devices listed in the profile to install it.
Without an enterprise account, this means that you need to obtain the deviceID from the devices first, create a provisioning profile that contains all those IDs and use that profile for an OTA-build (OTA = over the air).
But before you do, just try out the next steps with your own device (which for sure is listed as you use if to build on from Xcode). The next steps are error-prone enough even without trying multiple devices:
To create an OTA-build you need to do the following:
create a .ipa for in-house distribution (this will make sure the profile is included into the package, which allows listed devices to actually install it)
create a .plist file with information about the app and a URL to the .ipa file (see below). The link to the .ipa contained in it needs to be HTTPS.
create an .html file with a specially formatted link (also needs to be HTTPS) to that .plist file: <a href="itms-services://?action=download-manifest&url=http://linkToyour/plistFile.plist">
Download My App
</a>
If you browse on your iOS device to that webpage, you should be able to install the .ipa file. Make sure that you have your device connected to your machine with Xcode's devices pane open. This will allow you to look at the system output in the console when things don't work (the alerts on your iOS device usually are not helpful).
Note that another, way more convenient way is to setup an Xcode bot. Maybe you can do this from one machine, but I did this using an old MacBook I still had. Download Xcode Server (for free) by using the redemption code from the developer portal. Enable Xcode server, then setup a bot from your local machine. This is by far the most convenient way.
Here is a template of the .plist file that you need to make:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>http://yourWebSite.com/youripaFileName.ipa</string> // change this
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>yourBundleID</string> // change this
<key>bundle-version</key>
<string>yourApplicationVersion</string> // change this
<key>kind</key>
<string>software</string>
<key>title</key>
<string>yourAlertTitle</string> // change this
</dict>
</dict>
</array>
</dict>
</plist>
Clean build folder. Go to Product Menu and Select Archive from the submenu. Let the process of archiving complete. Once it will get complete select export option from screen menu.
Select save for development deployment method to export the ipa file.
Chooose your provision profile and account that was used when you created the provision profile.
Choose Export one app for all compatible devices option
In the summary screen verify the correct provision profile and entitlement has been added to archived file. Click next option
Finally save the ipa file to desktop or any other folder where you need it.
Upload the .ipa file to https://www.diawi.com/ and get the installation link

iOS - Missing Push Notification Entitlement

Apple keeps sending me this mails, when I try to upload my app to TestFlight
Missing Push Notification Entitlement - Your app appears to include API used to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.
I am trying to use Push Notifications.
My App ID looks like this.
My Provisioning profile is set up to use that App ID.
So what could I have done wrong?
And how can I check, if XCode is using the right Provisioning profile?
EDIT I am using Xamarin Studio, so I have to set the profile correctly in XCode
Get a developer build
Get your developer to give you the .IPA file that is signed using their normal “iPhone Developer” key. They do this all the time to test the app on physical devices they own
Get your tools in order
You will need the following:
A “Mobile Provisioning Profile”
An “Entitlements.plist”
An “iOS Distribution Certificate”
iReSign OS X app (or you could use command line)
1. Mobile Provisioning Profile
Download (or create then download) this from the “iOS Provisioning Profiles”inside of Apple Developer Members Center.
2. Entitlements Plist
You will actually need to make this yourself. You will need two values to make the strings required. You need the App ID Prefix and the Bundle ID. You can find them in Members Center “Certificates, Identifiers & Profiles”
Open your favorite text/code editor and drop this in. Then update the two values in the following code and save it as “entitlements.plist”.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>get-task-allow</key>
<false/>
</dict>
</plist>
If you are NOT using Push Notifications, you need to remove the two lines:
<key>aps-environment</key>
<string>production</string>
3. iOS Distribution Certificate
You should have this installed already. If not, you can get it installed via Xcode or Member Center.
Xcode > Preferences > Accounts
Find or add your Apple ID and click “View Details”
”+” “iOS Distribution” (or iOS Development) and then Refresh (bottom left)
Have you tried explicitly setting the Provisioning Profile that you want Xcode to use?
Instead of having "XC:*" there, specify the exact provisioning profile that you want Xcode to use when signing your build for App Store upload.

The correct beta entitlement for TestFlight Beta Testing in iTunesConnect with FlashBuilder

I develop games on ActionScript with FlashBuilder. I want to use TestFlight Beta Testing in iTuneConnect. But the builds that I compile with FlashBuilder don't contain the correct entitlement. I've generated new provisioning file, downloaded it and compiled my app with it. I use Adobe AIR SDK 15.0.0.295.
How can I generate the correct entitlement?
Olga
Updating to Adobe AIR SDK & Compiler (version 15.0.0.302) and adding the following code to the -app.xml file fixes this problem.
<Entitlements>
<![CDATA[ <key>get-task-allow</key>
<false/>
<key>beta-reports-active</key>
<true/> ]]>
</Entitlements>
Found this code here: Enabling TestFlight testing in iTunes Connect for Adobe AIR apps
This particular answer on a different thread helped me the most.
You WILL have to generate a new distribution profile if you created one before the launch of TestFlight.
https://stackoverflow.com/a/26221904/870274
"Yes, you need to recreate provisioning profile and one more important thing is that you need to provision your app with App Store distribution provisioning profile.
You can also convert .mobileprovision file to .xml with that command to see if there really is a beta-reports-active key in your entitlements.
security cms -D -i YourProfile.mobileprovision > YourProfile.xml

iPhone App Minus App Store?

If I create an application on my Mac, is there any way I can get it to run on an iPhone without going through the app store?
It doesn't matter if the iPhone has to be jailbroken, as long as I can still run an application created using the official SDK. For reasons I won't get into, I can't have this program going through the app store.
Official Developer Program
For a standard iPhone you'll need to pay the US$99/yr to be a member of the developer program. You can then use the adhoc system to install your application onto up to 100 devices. The developer program has the details but it involves adding UUIDs for each of the devices to your application package. UUIDs can be easiest retrieved using Ad Hoc Helper available from the App Store. For further details on this method, see Craig Hockenberry's Beta testing on iPhone 2.0 article
Jailbroken iPhone
For jailbroken iPhones, you can use the following method which I have personally tested using the AccelerometerGraph sample app on iPhone OS 3.0.
Create Self-Signed Certificate
First you'll need to create a self signed certificate and patch your iPhone SDK to allow the use of this certificate:
Launch Keychain Access.app. With no items selected, from the Keychain menu select Certificate Assistant, then Create a Certificate.
Name: iPhone Developer
Certificate Type: Code Signing
Let me override defaults: Yes
Click Continue
Validity: 3650 days
Click Continue
Blank out the Email address field.
Click Continue until complete.
You should see "This root certificate is not trusted". This is expected.
Set the iPhone SDK to allow the self-signed certificate to be used:
sudo /usr/bin/sed -i .bak 's/XCiPhoneOSCodeSignContext/XCCodeSignContext/' /Developer/Platforms/iPhoneOS.platform/Info.plist
If you have Xcode open, restart it for this change to take effect.
Manual Deployment over WiFi
The following steps require openssh, and uikittools to be installed first. Replace jasoniphone.local with the hostname of the target device. Be sure to set your own password on both the mobile and root users after installing SSH.
To manually compile and install your application on the phone as a system app (bypassing Apple's installation system):
Project, Set Active SDK, Device and Set Active Build Configuration, Release.
Compile your project normally (using Build, not Build & Go).
In the build/Release-iphoneos directory you will have an app bundle. Use your preferred method to transfer this to /Applications on the device.
scp -r AccelerometerGraph.app root#jasoniphone:/Applications/
Let SpringBoard know the new application has been installed:
ssh mobile#jasoniphone.local uicache
This only has to be done when you add or remove applications. Updated applications just need to be relaunched.
To make life easier for yourself during development, you can setup SSH key authentication and add these extra steps as a custom build step in your project.
Note that if you wish to remove the application later you cannot do so via the standard SpringBoard interface and you'll need to use SSH and update the SpringBoard:
ssh root#jasoniphone.local rm -r /Applications/AccelerometerGraph.app &&
ssh mobile#jasoniphone.local uicache
Yes, once you have joined the iPhone Developer Program, and paid Apple $99, you can provision your applications on up to 100 iOS devices.
Build your app
Upload to a crack site
(If you app is good enough) the crack version will be posted minutes later and ready for everyone to download ;-)
With the help of this post, I have made a script that will install via the app Installous for rapid deployment:
# compress application.
/bin/mkdir -p $CONFIGURATION_BUILD_DIR/Payload
/bin/cp -R $CONFIGURATION_BUILD_DIR/MyApp.app $CONFIGURATION_BUILD_DIR/Payload
/bin/cp iTunesCrap/logo_itunes.png $CONFIGURATION_BUILD_DIR/iTunesArtwork
/bin/cp iTunesCrap/iTunesMetadata.plist $CONFIGURATION_BUILD_DIR/iTunesMetadata.plist
cd $CONFIGURATION_BUILD_DIR
# zip up the HelloWorld directory
/usr/bin/zip -r MyApp.ipa Payload iTunesArtwork iTunesMetadata.plist
What Is missing in the post referenced above, is the iTunesMetadata. Without this, Installous will not install apps correctly. Here is an example of an iTunesMetadata:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>appleId</key>
<string></string>
<key>artistId</key>
<integer>0</integer>
<key>artistName</key>
<string>MYCOMPANY</string>
<key>buy-only</key>
<true/>
<key>buyParams</key>
<string></string>
<key>copyright</key>
<string></string>
<key>drmVersionNumber</key>
<integer>0</integer>
<key>fileExtension</key>
<string>.app</string>
<key>genre</key>
<string></string>
<key>genreId</key>
<integer>0</integer>
<key>itemId</key>
<integer>0</integer>
<key>itemName</key>
<string>MYAPP</string>
<key>kind</key>
<string>software</string>
<key>playlistArtistName</key>
<string>MYCOMPANY</string>
<key>playlistName</key>
<string>MYAPP</string>
<key>price</key>
<integer>0</integer>
<key>priceDisplay</key>
<string>nil</string>
<key>rating</key>
<dict>
<key>content</key>
<string></string>
<key>label</key>
<string>4+</string>
<key>rank</key>
<integer>100</integer>
<key>system</key>
<string>itunes-games</string>
</dict>
<key>releaseDate</key>
<string>Sunday, December 12, 2010</string>
<key>s</key>
<integer>143441</integer>
<key>softwareIcon57x57URL</key>
<string></string>
<key>softwareIconNeedsShine</key>
<false/>
<key>softwareSupportedDeviceIds</key>
<array>
<integer>1</integer>
</array>
<key>softwareVersionBundleId</key>
<string>com.mycompany.myapp</string>
<key>softwareVersionExternalIdentifier</key>
<integer>0</integer>
<key>softwareVersionExternalIdentifiers</key>
<array>
<integer>1466803</integer>
<integer>1529132</integer>
<integer>1602608</integer>
<integer>1651681</integer>
<integer>1750461</integer>
<integer>1930253</integer>
<integer>1961532</integer>
<integer>1973932</integer>
<integer>2026202</integer>
<integer>2526384</integer>
<integer>2641622</integer>
<integer>2703653</integer>
</array>
<key>vendorId</key>
<integer>0</integer>
<key>versionRestrictions</key>
<integer>0</integer>
</dict>
</plist>
Obviously, replace all instances of MyApp with the name of your app and MyCompany with the name of your company.
Basically, this will install on any jailbroken device with Installous installed. After it is set up, this results in very fast deployment, as it can be installed from anywhere, just upload it to your companies website, and download the file directly to the device, and copy / move it to ~/Documents/Installous/Downloads.
With the upcoming Xcode 7 it's now possible to install apps on your devices without an apple developer license, so now it is possible to skip the app store and you don't have to jailbreak your device.
Now everyone can get their app on their Apple device.
Xcode 7 and
Swift now make it easier for everyone to build apps and run them
directly on their Apple devices. Simply sign in with your Apple ID,
and turn your idea into an app that you can touch on your iPad,
iPhone, or Apple Watch. Download Xcode 7 beta and try it yourself
today. Program membership is not required.
Quoted from: https://developer.apple.com/xcode/
Update:
XCode 7 is now released:
Free On-Device Development
Now everyone can run and test their own app
on a device—for free. You can run and debug your own creations on a
Mac, iPhone, iPad, iPod touch, or Apple Watch without any fees, and no
programs to join. All you need to do is enter your free Apple ID into
Xcode. You can even use the same Apple ID you already use for the App
Store or iTunes. Once you’ve perfected your app the Apple Developer
Program can help you get it on the App Store.
See Launching Your App on Devices for detailed information about
installing and running on devices.
It's worth noting that if you go the jailbroken route, it's possible (likely?) that an iPhone OS update would kill your ability to run these apps. I'd go the official route and pay the $99 to get authorized. In addition to not having to worry about your apps being clobbered, you also get the opportunity (should you choose) to release your apps on the store.
After copying the the app to the iPhone in the way described by #Jason Weathered, make sure to "chmod +x" of the app, otherwise it won't run.
*Changes/Notes to make this work for Xcode 3.2.1 and iPhone SDK 3.1.2
Manual Deployment over WiFi
2) Be sure to restart Xcode after modifying the Info.plist
3) The "uicache" command is not found, using killall -HUP SpringBoard worked fine for me.
Other then that, I can confirm this works fine.
Mac users, using PwnageTool 3.1.4 worked great for Jailbreaking (DL via torrent).
If you patch /Developer/Platforms/iPhoneOS.platform/Info.plist and then try to debug a application running on the device using a real development provisionen profile from Apple it will probably not work. Symptoms are weird error messages from com.apple.debugserver and that you can use any bundle identifier without getting a error when building in Xcode. The solution is to restore Info.plist.

Resources