Related
I am trying UI automation of IOS 10 using Appium XCUITest.
On running script, it tries to build WebDriverAgent and fails at this point. I have added the provisioning profile and added the account in Xcode through the UI but not sure from where does XCUITest take the profiles while running or if we need to provide some information in desired capabilities.
info Xcode Testing failed:
info Xcode Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
info Xcode Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.0'
info Xcode ** TEST FAILED **
You can fix it as follows:
enters from the Finder to the following path:
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
open: WebDriverAgent.xcodeproj
select the targets:
WebDriverAgentLib
WebDriverAgentRunner
go to General tab -> Signing
and place the team
view image:
solution appium
This issue occurs for Appium 1.6.X, in order to fix the issue please follow the steps:
Go to your Appium folder and find appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj file or you can search for the file name.
Open the file using Xcode.
Select WebDriverAgentLib and In general tab select 'Automatically Manage Signing" and select an id in team dropdown (Ask your developement team to provide you the team id).
Now select the next WebDriverAgentRunner and do the same thing as you did for the WebDriverAgentLib.
In case you get some errors just go to the 'Build Settings' tab and change the "Product Bundle Identifier" from "com.facebook.WebDriverAgentLib" to "com.facebook.WebDriverAgentLibNew".
Come back to general tab and the errors should be fixed.
Now build both WebDriverAgentLib and WebDriverAgentRunner.
When you get the Build succeed message, run your test again.
I've successfully run a simple Gluon application using NetBeans 8.1, Gluon plugin, javafxports 1.0.7, Mac OS X 10.11.1, Xcode 7 using Gluon Mobile - Single View Project. When I try to run on my connected iPhone 6 using launch | launchIOSDevice, however, I'm having errors with the provisioning. Error message is Execution failed for task ':createIpa'.
No signing identity found matching '/(?i)iPhone Developer|iOS Development/'
I setup an identically named project on Xcode and ran it on my connected device. I verified that I have Provisioning Profiles and Signing Identities defined for my project (Xcode | Preferences | Accounts). I verified that the Xcode project Bundle identifier is the same as the ios CFBundleIdentifier as defined in the Default-info.pllist file. I tried defining ios properties iosProvisioninProfile and iosSignIdentity in the build.gradle file. This gave different error messages, but the build still failed.
Has anyone successfully run a NetBeans/Gluon-Mobile app using Apple's Free Provisioning on a connected IOS device? I'm sure I'm doing something wrong, but need help figuring it out!
Thanks in advance!
I didn't try it with a free provisioning profile. I did it with an apple developer account, but here are the steps I've taken maybe it can help you:
Get accepted as an apple developer (not your case)
Go to XCode, click code->preferences
Go to the accounts tab
click the plus button to add an account. Add your account.
Click file->new project->single view application
Put whatever product name and organization identifier (it doesn't matter)
Choose whatever place you want to store the project
For any issue that arises like "no non-expired provisioning profiles were found", click fix issue.
Connect ios device and run app.
start gluon ios gradle task (for instance 'launchIOSDevice')
It will take a lot of time the first time. In the end it may give you a java.lang.OutOfMemoryError. Put in your gradle JVM settings: '-Xmx2000M'.
Start ios gradle task again.
You can also check: http://docs.robovm.com/getting-started/provisioning.html#limitations for free provisioning advise, but you probably already have.
You can use a free provisioning account. You just need to add a couple of lines to the build.gradle file in the iOS settings:
iosProvisioningProfile = 'xxxx'
iosSignIdentity = 'yyyy'
The ProvisioningProfile is the file name of the provisioning provisioning profile you created in xCode. Just right click, and choose "Show in Finder". Just copy the file name (you don't need to copy the "mobileprovision" extension.
The SignIdentity (yyyy) you can get with by opening a terminal and entering the following command:
security find-identity -v -p code signing
Look for the line that contains "iPhone Developer: " line and copy everything in the quotes
You need a apple developer account (the free variant works fine). Then you create a xCode project that matches your Gluon project so that:
Product Name in your xCode project is the same as your Gluon project's Project Name
and...
Organization Identifier is the same as as your Gluon project's Package Name
Then it should work fine. I have made this in Eclipse and later in Netbeans - and it have worked in both places.
Edit: By using this way however you have resign your app (around every 24h) - which means opening the project (that you created before that is being similar to your Gluon project) - letting xCode revalidate the project with your developer id. If you do not do this you will experience that your app doesn't open, (but it will be shown/exist among other opened apps - when you double tap the home button on iPhone).
I have all my code signing entitlements set correctly. Running the app on my phone is fine, but launching it in instruments gives me an error message:
Error Starting Recording
At least one target failed to launch; aborting run
And then:
Target failed to run. Permisson to debug [app name] was denied. The app must be signed with a development identity (i.e. iOS Developer)
Any ideas how I could stop this from happening? Doesn't happen on my iPad.
Edit the scheme for your target and under "Profile [App Name]" set the Build Configuration to Debug (it's usually Release by default).
It is saying that you need to sign the app with a developer certificate (not a distribution certificate).
In Xcode 5 just change the "Provisioning Profile" field for your "Release" build in the Build Settings to your developer certificate instead of your distribution certificate. For the duration of the testing anyway. Xcode doesn't allow you to build with a distribution certificate.
Make sure that the project build settings do not override the target build settings or make the change in your project build settings.
Don't forget to set the profile back after you're done with the testing.
I do not recommend harrywynn's method, since it is better to profile the release build because then you are taking into account the compiler optimizations, and having the exact experience your users will.
To add to the previous answers.
Instruments is complaining about the signing identity.
I believe it is preferable to profile in release mode, for the same reasons given by Zolten. (take into account the compiler optimizations, and have the exact experience your users will, etc...)
To change your code signing identity for Xcode 6:
Click on your Project, Select the Target you are Profiling.
Build Settings -> Code Signing -> Code Signing Identity -> Release
Select your iOS developer profile.
Provisioning Profile: Let Xcode pick the correct Provisioning Profile for you, e.g: switch to Automatic
When you are done with the Profile, switch back to your normal settings.
Here's a picture for those who are very visual ;)
I was getting the same issue :
[INST STDERR] Instruments Trace Error : Target failed to run: Permission to debug was denied. The app must be signed with a development identity (e.g. iOS Developer).
Solution:
1. I archived the the app with Debug Developer Profile in xcode for device.
2. The go to Window -> Organiser -> to see all the list of archieves
3. Now select the archive to wanted to export and open it in finder
4. Right click and show package contents
5. Go to the Products/Applications folder
You will see the .app file.
Use this instead of the ipa.
Make sure that the device has been already added to the developer portal and all the certs are installed on it for the above steps to work.
Once this is in place. Also, make sure you get the ios-webkit-debug-proxy from the link below:
https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/ios-webkit-debug-proxy.md
Also, enable developer tools on on the device setting.
Also, make sure safari webinspector (safari -> Develop) -> Inspector is on
Hope it helps:-)
NOTE: When you want appium to install the app on the device for you, don't provide Bundle ID.
I achieved to solve this issue on my machine by doing this :
Generate a new Developer Provisioning Profile with your device in the list or at least make sure that your machine is in the list of the profile's device.
In Project settings -> Code Signing -> Provisioning Profile -> Debug : Set the newly created profile.
In Targets settings -> Code Signing -> Provisioning Profile -> Debug AND Release : Set the newly created profile.
Hope that helps.
I realised what "At least one target failed to launch" means. It appears that both the development and release schemes (if you have a debug scheme and a release scheme) must have a development identity.
I had the debug scheme selected when running the profiler and the message at the top of XCode said "Running debug". However, it seems that this is not sufficient.
I changed my release scheme code-signing identity to be the same as the debug scheme (and also the provisioning profile), and the problem went away.
it worke.. when i changed my profile schema to debug mode and also made sure, build configs has developer certificate in it. Thanks
None of the other solutions here fixed my problem, but I did determine that it was only a problem for me on the simulator. The device works fine. Perhaps there's an issue with the simulator.
I encountered this problem with Xcode 9.1 for both simulators and devices, and my running scheme was already set as profiling with "Debug". Finally found this Apple forum discussion very helpful and got the problem resolved. In short, the solution that worked for me is ... Restart the Mac.
I've been working on an iPhone project with iOS 4.0. I just downloaded Xcode 3.2.4 with iOS SDK 4.1 so that I can work with the updated iOS. Upon opening the project in the udpated Xcode, I found that the target read 'Base SDK Missing'. I fixed that by following the instructions here.
Now when I try building targeting any version of iOS, I receive this error (with the corresponding version referenced in the error text):
CodeSign Error: code signing is required for product type 'Application' in SDK 'Device - iOS 4.1'
I have the Team Provisioning Profile created by Xcode installed, that Provisioning Profile has my certificate, and the Code Signing Entity selected is 'iPhone Developer: Aaron Milam'.
Any ideas as to what I could be missing here?
It happens when Xcode doesn't recognize your certificate.
It's just a pain in the ass to solve it, there are a lot of possibilities to help you.
But the first thing you should try is removing in the "Window" tab => Organizer, the provisioning that is in your device. Then re-add them (download them again on the apple website). And try to compile again.
By the way, did you check in the Project Info Window the "code signing identity" ?
Good Luck.
Be sure you code sign on the line "any iOS SDK" and not "Debug/Distribution/Release"
Here is exactly what I did :
Code signing identity -> don't code sign
* Debug -> don't code sign
** any iOS SDK -> [my developer profile]
* Distribution -> don't code sign
** any iOS SDK -> [my AppStore profile]
* Release -> don't code sign
** any iOS SDK -> [my AdHoc profile]
When I put my profiles one level above (at Debug/Ditribution/Release), it doesn't work for some reason (bug ?).
Hope it helps some of us !
I love Stack Overflow:
I realized that some time being too specific is not enough that is because we may have different Xcode version, I have 2 xcode version on the same Mac Pro myself. So here I would like to provide a general instruction that i hope it will work for all Xcode version:
My 2 versions are xcode 3.2.6 and 4.0. You need to find (even google for the settings) your xcode BUILD SETTINGS and its CODE SIGNING under CODE SIGNING you have CODE SIGN IDENTITY this provide you a list of IDENTIFIERS (if you do not have IDENTIFIERS go here to get one and registration is required https://developer.apple.com/ios/manage/overview/index.action - follow this instruction of Apple "Get your application on an iOS with the Development Provisioning Assistant") If you have a list of identifiers just select a valid one and run your Xcode again. It will work!
3.2.6 specific: On your scode window - click on Project -> Project settings -> Build (tab) -> there is a scroll down because the list is long MAKING SURE you scroll down to find your CODE SIGNING section
4.0 specific: On your xcode window - click on your project file left most colum -> then next colum click on your target app -> find CODE SIGNING and assign an IDENTIFIER. It should work for you.
Done!
Most common cause, considering that all certificates are installed properly is not specifying the Code Signing Identity in the Active Target settings along with the Project settings. Change these from to iPhone Developer (Xcode will select the right profile depending on App ID match).
In Xcode , change from Simulator to Device (in the dropdown at the top of the Xcode window), so that your target for application deployment will be the Device.
The default ID which is a wild card ID is like a catch all iD, when associated in Code Signing (if you are using sample files to build, they will most obviously not have com.coolapps.appfile imports, in which case without the 'Team Provisioning profile', your build would fail. So you would want to set this in your
Xcode->Project ->Edit Project Settings->Build (tab)->Code Signing Identity (header) ->Any iOS (change from Any iOS Simulator)->(select 'iPhone Developer' as value and it will default to the wildcard development provisioning profile (Team Provisioning Profile: * )
and also (VERY IMPORTANT)
Xcode->Project ->Edit Active Target ->Build (tab)->Code Signing Identity (header) ->Any iOS (change from Any iOS Simulator)->(select 'iPhone Developer' as value and it will default to the wildcard development provisioning profile (Team Provisioning Profile: * )
Complete steps for a beginner at:
http://codevelle.wordpress.com/2010/12/21/moving-from-ios-simulator-to-the-ios-device-smoothly-without-code-sign-error/
Make sure that you have created provisioning profiles correctly..
if you did.. you must be having ... public key, private key and Certificate in Keychain Access.
CHECK if you have all these..
XCode 3.2.4 Comes with the Auto device provisioning ... so you just have to sign in to your developers
account it will download all valid profiles..
If you have all you need in keychain and downloaded profiles...
When you are selecting iPhone Developer: Aaron Milam'. in build settings..
make sure you have selected Configuration ( on left top inside Target->Build ) you want to make build for.
or you can do All configuration to make changes in all available configurations i.e. Debug, Release etc.
Summarised form an answer to Xcode fails with "Code Signing" Error
project.pbxproj files can be merged in such a way that two CODE_SIGN_IDENTITY lines can be inserted. Deleting one of these normally fixes the issue.
I have created simple script to help diagnose this issue it can be found here: https://gist.github.com/4339226
A full answer can be found here.
After trying all of the above answers, and everything else I could think of from within Xcode 4.6, I fixed this with these steps:
Close Xcode
Right-click on .xcodeproj file -> show package contents
Edit project.xcodeproj in a text editor
Search for "CODE_SIGN_IDENTITY" - there will be pairs of lines like this:
CODE_SIGN_IDENTITY = "iPhone Developer: Joe Smith (555NN555)";
"CODE_SIGN_IDENTY[sdk=iphoneos*]" = "iPhone Developer: Joe Smith (555NN555)";
I found 2 targets with value like that, and 2 targets with
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTY[sdk=iphoneos*]" = "";
I copied the former pair of lines over the latter pair of lines for all cases where the latter pair was emtpy.
I then restarted Xcode, and it works fine now.
As already mentioned here if you don't want to code sign you application you can
set CODE_SIGNING_REQUIRED to NO. Here is method to do it without any project/files
modification:
Create file NoCodeSign.xcconfig:
CODE_SIGNING_REQUIRED = NO
Set XCODE_XCCONFIG_FILE environment variable to path to this file:
export XCODE_CXCONFIG_FILE=/path/to/NoCodeSign.xcconfig
Now you can build your application without code signing.
Toolchain for CMake users
In my case, locking and unlocking login-keychain from Keychain Access did the trick
Populate "Code Signing" in both "Project" and "Targets" section
Select valid entries in "Code Signing Identity" in both "Debug" and "Release"
Under "Debug" select you Developer certificate
Under "Release" select your Distributor certificate
Following these 4 steps always solves my issues.
Another possibility - When you Build for Archive make sure your Archive choice in your scheme is set for Distribution, not Release.
Go to Product -> Edit Scheme This brings up a new dialog.
Select Archive on the left. Make sure the build configuration is Distribution.
In file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/SDKSettings.plist
change the CODE_SIGNING_REQUIRED YES
to
CODE_SIGNING_REQUIRED NO
Restart Xcode
Have you updated the firmware version of the iPhone you are testing on?
I use Xcode 4.3.2, and my problem was that in there where a folder inside another folder with the same name, e.g myFolder/myFolder/.
The solution was to change the second folder's name e.g myFolder/_myFolder and the problem was solved.
I hope this can help some one.
Maybe your mac's date and time are incorrect. Just correct them.
I am having a problem with ad-hoc distribution on my iPhone. I have developed an application with SDK 3.0. I have a developer's license. I have added certificates and provisioning profiles in my project. So, no problem with that.
But, when I try to install the app on my iPhone, it compiles the project and then displays the error: "The executable was signed with invalid entitlements" in the Organizer window. Am I missing something? I have upgraded my iPhone from 2.2.1 and have downloaded latest SDK from Apple.
Please help me with this issue.
There are pretty good instructions in the 'Portal Program'. If you log into
http://developer.apple.com/iphone
Then click Distribution on the left, and click the
Creating and Downloading a Distribution Provisioning Profile for Ad Hoc Distribution
link at the bottom.
Here's the key bit:
For Ad Hoc Distribution, complete the following:
In the File Menu, select New File -> iPhone OS -> Code Signing -> Entitlements.
Name the file “Entitlements.plist" and click ‘Finish’. This creates a copy of the default entitlements file within the project.
Select the new Entitlments.plist file and uncheck the “get-task-allow” property. Save the Entitlements.plist file. (in Xcode 4, get-task-allow is called "Can be debugged" )
Select the Target and open the Build settings inspector. In the ‘Code Signing Entitlements’ build setting, type in the filename of the new Entitlements.plist file including the extension. There is no need to specify a path unless you have put the Entitlements.plist file somewhere other than the top level of the project.
Click ‘Build’. (Note: Your binary must contain a flattened, square-image icon that is 57x57 pixels. This icon is displayed on the iPhone or iPod touch home screen.)
This error also may occur if you're trying to profile an app where the device is not included in the provisioning profile.
Make sure your device is included in the dev provisioning profile you want to use. Somehow the error message is misleading. My entitlements were actually ok.
I have found that "get-task-allow" needs to be checked for Development builds but unchecked for Distribution builds. The easiest way to accomplish this (AFAIK) is to have two entitlements files in your project: Entitlements.plist and EntitlementsDebug.plist - and to reference the proper one in the build project settings for the various configurations in your project.
Code signing entitlements are no longer necessary for Ad Hoc builds in Xcode 4 - see details notes in Apple Technical Note TN2250
If you once come into the situation, that checking "get-task-allow" seems to be required in order to deploy your debug (!) build to your phone, check this:
a) Check the build setting. There should be no entry in "Code Signing Entitlements" for Debug
b) Remove Entitlements.plist temporarily and build your debug version. If it complains about a missing Entitlements.plist, then you probably have the same situation, I had to fight today.
c) Build again with Entitlements.plist and enable "get-task-allow". If it works now, you probably have the same problem:
After messing around with new profiles I couldn't deploy my Debug build to the phone. AdHoc was fine. I checked a) - empty.. Hmm. I checked b) - complains. c) - worked...
After all I examined project.pbjproj in an editor and - although the GUI did claim, that there was no entry for "Code Signing Entitlements" in fact there was one in the Debug section. I emptied it and was done.
This is because your device, on which you are running your application is not selected with your provisioning profile.
So just go through Certificates, Identifiers & Profiles select your iOS Provisioning Profiles click on edit then select your Device
I have just had an exciting three hours battling with this. I have just upgraded a project to 4.2 and for some reason it just wouldn't work.
I eventually removed the Entitlements.plist file and then created a new one.
File > New File > Code Signing > Entitlement
Name the file Entitlements.plist
Make sure it's in the Resources group in xCode.
It didn't put in the get-task-allow BOOL type in the Entitlements.plist file. I added it, checked it, saved it, unchecked it, saved it. This made me feel better.
I then removed the Adhoc and Release profiles I had created. Re-downloaded them from the Provisioning Portal and droped them back into the xCode organizer.
I then went into Build Settings and made sure the correct profiles were assigned to the Debug and Release profiles.
I then changed the to Release / Device. Hit the build button and it worked.
I have no idea why.
John's answer is 99% correct. I found that (at least in my configuration), you have to open the Build settings inspector for the PROJECT. The build settings for the target do not contain "Code Signing Entitlements". Perhaps this doesn't make a difference if you have only one target in your project. But if you have multiple targets, you need to go to the project build settings. In any case, after doing what John said, my ad-hoc distribution build worked perfectly.
In Xcode 5.1, if you go into Preferences -> Accounts -> View Details...
Make sure the Signing Identity status is Valid. If it says Revoked, hit the Plus button and add the appropriate signing identity: iOS Development or iOS Distribution. Xcode will replace it with a new, valid one.
For me that solved it:
https://coderwall.com/p/-ckobg
Open Project.xcodeproj > project.pbxproj
Remove all lines like these:
PROVISIONING_PROFILE = ...
"PROVISIONING_PROFILE[sdk=iphoneos*]" = ...
CODE_SIGN_IDENTITY = ...
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ...
Set provisioning profiles & code signings for the target again
pJosh, this might help understanding. In my case, my Team Provisioning Profile was expiring (the Provisioning Portal indicated it is managed by XCode), as well as the device testing profile for the app. (I still don't know why, but the portal had a "Renew" button next to the team profile, but it wouldn't do anything when I clicked it.)
So, I deleted the profiles about to expire, then in XCode go to Organizer (Command-Shift-2), under Library / Provisioning Profiles, I deleted the expiring ones. Then click "Refresh" at the bottom, enter my Apple ID, and it renewed the expiring ones.
Finally, on my Target, I went to Build Settings, Code Signing, and made sure to select the provisioning profile. Voila, now it builds to my device.
Just got this same error code.
It seems there are different things that cause this and therefore different ways to fix it.
In my case, I had two different devices with the same name (an iPhone 4 and an iPhone 4S). Changing the name of one of them fixed this error completely for me...
I was trying to add iCloud support to my existing app, but found that after adding entitlements and configuring iCloud, my app would no longer debug.
I realised that my generic iOS development certificate had a different APPID from the app I was working on. So to fix it, instead of using my generic certificate I created a specific development certificate for that APPID.
I refreshed my provisioning profile in XCode, cleaned out the app, disconnected my device, restarted XCOde and connected device and ran, and it now works a treat!
I also spent several hours fighting with this as well. The fix is real simple. Edit your Entitlements.plist file in the root of your project's directory. Find the line that says <key>get-task-allow</key>. Underneath it should be <false/>. Change that to <true/>.
Sorry that this is very late, but I just was looking at this question and found something that worked for me. I went to PROJECT->Build Settings and found the Code Signing section. Beside debug, my distribution profile that said Iphone Distribution: MY NAME was selected. I instead selected Iphone Developer: MY NAME on the drop-down list under IpodProfile (for bundle identifiers com.myName.myApp which was the provisioning Profile for my device. Hope this helps!
I just had this happen to a developer on the team I administer.
It turned out his developer certificate expired and after renewal, I neglected to add his certificate to the provisioning profile his app used.
I had not agreed to the new updated licensed agreement from apple.
Briefly : Please log in to your developer's account -> profile's -> review -> read the agreement or get your lawyer read it for you -> agree (at your own will) -> and again click profile's to check the status of your profile.
In my scenario the valid code signing entity was not showing up. When i followed the above procedure it was visible and i was able to run the app on the device and/or create the iPA file without much difficulty.
Had this issue occur when everything seemed to be setup correctly, build setting were pointing to correct provisioning profile, code signing was properly setup, etc.
Issue occurred because I had just created a new scheme and hadn't regenerated my CocoaPods for the new configurations. As you can see from the image, the new ad-hoc configuration is pointing to the Pods.production configuration, instead of a Pods.ad-hoc configuration (and test respectively)
To fix:
Set the offending configuration to None -- cocoapods wouldn't generate the configs unless I did this
Close XCode
Run pod install
Re-open XCode and set the new scheme's configurations to the newly generated configurations.
That's it!
Check if you're device is included in the provisioning profile.