Which Build is generated when I archive my App in Xcode6? - objective-c

I have an app which I want to distribute to the app store.
When I do >Product > Archive does the app automatically build in Release or Debug config? Do I have to set this manually or is it always Release?

You can define Release or Debug in the scheme by tapping on Edit Scheme and selecting the Build Configuration. Take a look at below screenshot:
EDIT: To get Production APNS token
Archive the build in release mode.
Ensure to sign it with an Ad Hoc Distribution Provisioning profile.
Ensure profile is correct by following below:
Verify that the entitlements in the provisioning-profile file are
correct. To do this, open the .mobileprovision file in a text editor.
The contents of the file are structured in XML. In the Entitlements
dictionary locate the aps-environment key. For a development
provisioning profile, the string value of this key should be
development; for a distribution provisioning profile, the string value
should be production.

You can define Release or Debug in the scheme by tapping on Edit Scheme and selecting the Build Configuration
Its better to cross check when you are uploading build to store.

Related

Is there a way to apply ITSAppUsesNonExemptEncryption in a Swift Playground?

In Swift Playgrounds 4 you can upload apps to App Store Connect. Like in Xcode, by default App Store Connect will complain every build is missing compliance when you upload it and cannot be tested until you provide the information.
If you are building an application in Xcode that doesn't use non-exempt encryption you can set the key ITSAppUsesNonExemptEncryption in your Info.plist and App Store Connect will skip the compliance step for each build.
Swift Playgrounds don't have an info.plist, so is there a way to provide this value inside Swift Playgrounds or is this just a minor oversight?
If you open the .swiftpm file package, and look at the Package.swift file, you will see the .iOSApplication product. It takes an optional value, additionalInfoPlistContentFilePath. Give that a relative path to an Info.plist file you create, and values from that file will be merged into the app's final Info.plist when you build.
(I know the Package.swift file has a comment saying you shouldn't edit it because it is generated, but Apple employees on Twitter have said they try to be good about not overwriting valid changes made. I can confirm the plist one is working for me.)
Details here.

install iOS ad-hoc app failed

I've a problem by installing an ad-hoc build to my iOS test devices.
When I run the app via XCode, there is no problem, but from the moment I create a signed ad-hoc app (*.ipa), the app is not able to install via iTunes or the iPhone configuration tool.
What I've done:
- Creating a distribution certificate
- Creating an app ID (com.project_name.*)
- Creating a distribution provisioning profile including the distribution certificate, all devices UUID, etc.
- In the plist file I set "Bundle identifer" to "com.project_name.app_name"
By creating the ad-hoc file, I've chose the distribution certificate for code signing. This certificate is also set in the project file --> build settings --> Code-Signing
When I install the app in itunes, there comes an error dialog which just says, that it was not possible to install the app.
Make sure you are not using special characters in bundle identifier.
The bundle identifier string identifies your application to the
system. This string must be a uniform type identifier (UTI) that
contains only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.)
characters. The string should also be in reverse-DNS format. For
example, if your company’s domain is Ajax.com and you create an
application named Hello, you could assign the string com.Ajax.Hello as
your application’s bundle identifier. The bundle identifier is used in
validating the application signature.
If your bundle identifier is correct,
Please validate your ipa file with following steps:
Step1: rename yourapp.ipa to yourapp.zip
step2: Extract content of yourapp.zip, you will see content in Payload
folder.
Step3: locate yourapp.app in payload folder.
Step4: rightclick on app and click "show package content"
Step5: in package content, locate "embedded.mobileprovision"
step6: Open "embedded.mobileprovision" in text editor. and check if
your device id exist there.
If your device id is there, Your build is correct. otherwise, rebuild by checking all code.
Note: Please make sure you have selected "Ad-hoc" while creating distribution file and not "App store".
The problem wasn't the app.
My solution: Export the app as Xcode-Project (same way Organizer --> Archive --> Distribute) to another mac. Think about the certificates. You will have to export the private keys from your first mac too (*.p12 files).
Open the XCode-Project from your second mac, sign it with the provision profile and install it via itunes.

Drive permissions in AndroidManifest.xml via Titanium's tiapp.xml

I am attempting to upload a mobile app I developed using titanium-mobile to the Google Play marketplace. I am getting the following message:
This apk requests 4 permissions that users will be warned about
android.permission.ACCESS_WIFI_STATE
android.permission.ACCESS_NETWORK_STATE
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.INTERNET
This apk requests 2 features that will be used for Google Play filtering
android.hardware.touchscreen
android.hardware.wifi
When developing apps natively, I was able to modify these permissions directly via the AndroidManifest.xml file. With Titanium I do not actually generate the AndroidManifest.xml myself but rather it is generated by Titanium's build.
Is there a way to send directives to titanium's build engine via tiapp.xml to remove, enable, or disable permissions in the titanium generated AndroidManifest.xml?
You cannot edit permissions via tiapp.xml.
You can edit the AndroidManifest.xml file directly
(located at {TitaniumWorkspace}/{ProjectRoot}/build/android/AndroidManifest.xml) then copy and edit this file. After that ensure that you put it in your root project directory with the following folder hierarchy:
Your root project folder
platform (note: you may have to create this folder)
android (note: you may have to create this folder)
AndroidManifest.xml
Example path for where to put the edited manifest: {TitaniumWorkspace}/{ProjectRoot}/platform/android/AndroidManifest.xml

XCode 4, Invalid Signature (-19011)

I'm goin mad.
I'm using XCode 4 and finally i finished my app,and i was about to submit it to App Store,uploading to iTunes Connect. I tried to to Build for Archive but this warning showed up:
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
I've googled all day long,i've tried to renew all my certificates in Provisioning Center,i've even tried to upload it with Application loader but anything happened. Same error there too. I've tried to validate it through the Archive tab in Organizer but anything, this warning won't go away.
I've read some answers here, and even if the answers were a bit old, anything worked for me, i've tried to reinstall XCode too,i've tried to select the right profile on Build in Targets..
Thanks to anyone who will help me
edit:
When i try to start a new project and select "Build for Archive" and then Archive, the warning appears but i can still share the archive as ipa. I tried to copy all the files from my old project into the new one, build for archive, archived. But when i select "Share" as .ipa it shows an error
The operation couldn't be completed. No such files or directory.
May this be 'cause i added 2 frameworks to my project to work? Should i select something from Target,or Project? Also,i want to say that all my profiles are ok, certificates etc. I've tried to bypass the error -19011 by turning on NO "Validate built product".
EDIT2:
The -19011 doesn't show up anymore, but when i try to validate or submit,i got this error:
The archive is invalid. var/folders/*randomnumbers* app.ipa does not exist.
What am i supposed to do in this case? I've already read some of the answers but none worked.
I solved, thanks to the help of an Apple Technic Engineer, this way:
In targets, on Build Settings - Product name, I had the name of the app with spaces and special characters (? character). After changing that and changing the Bundle Name too, I solved all the problems I got with that.
Hope this will help someone, one day.
You said you tried to "renew all my certificates in Provision Center". Are you certain you are:
Using a valid certificate. Have you imported the private key into your keychain?
Chosen the right provisioning profile + certificate combination for your "Release" or "Distribution" configuration?
It's possible that your Development configuration is correct, hence you could test on your device (if you have), but your Release configuration is wrong.
Go to "Build Settings" in XCode and verify that under "Release" or "Distribution", you chose your Distribution certificate (not development certificate) and the provisioning profile tied to it.
If that doesn't work, your problem is possibly related to
this SO question.
Try reinstalling?
Hope this helps.
Are you sure your distribution certificate is for the app store, and not for ad-hoc distribution?
From Product menu go to "Edit Schema", there find the Archive from the left sidebar and check which build configuration you are using for Archive. It should be distribution.
Another thing to check is which provision profile Distribution configuration is using, you can check this from projects Build Settings under Code Signing section.
After making sure my certificate and provisioning profile were correct for In-House deployment and making sure I didn't have any unwanted spaces or characters in the target names, what worked for me was to change my scheme from Debug to Release on the Run page. Product -> Scheme -> Edit Scheme -> Click Run -> Change Build Configuration to Release.

Entitlement are not valid?

My friend send me Build & provision profile ok, 1st I install provision profile than I upload Build on my i pod device , I face this error. Entitlement are not valid?? could you please tell me how can i solve this problem
The standard Project template does not include the entitlements file. On your project, add a new file (File, New). Select Code Signing as the category under iOS, and pick "Entitlements" template. You can name the file Entitlements.plist.
Then, on your Target, go to Build Settings, and set your Code Signing Entitlements setting to the name of this new file.
You should be able to build and distribute it just fine now.