I've configured Entitlements in Xcode, but they don't get put in the compiled app bundle. Do I have to do some additional steps?
I'm writing an OS X "Developer ID"-signed application (not for the AppStore), and to be able to implement an Extension that shares preferences with the parent app I need to put them in the same App Group.
I've configured App Groups in Xcode, and I see them in $Extension.entitlements and $ParentApp.entitlements plist.
However, in the built product $Extension.app/Contents/_CodeSignature/CodeEntitlements resembles a default entitlements file without the group I've configured, and in the parent app this file doesn't exist at all.
I've even tried signing the app again with an explicit entitlements file:
codesign --force --entitlements $ParentApp.entitlements -s "Developer ID" \
Build/Products/Debug/$ParentApp.app
but again, it doesn't get added to $ParentApp.app/Contents/_CodeSignature/CodeEntitlements.
At run time the parent app and the extension don't appear to be in the same app group: they write their preferences ([NSUserDefaults…initWithSuiteName:teamIdEtc]) to their own subdirectories in ~/Library/Containers rather than a shared dir in ~/Library/Group Containers.
Magically, it started to work after:
I've replaced $(TeamIdentifierPrefix) with actual identifier
Deleted DerivedData folders everywhere and rebuilt everything
Related
I was facing code singing issue while generating IPA using fastlane or xcodebuild command that was showing log like
log
From xcode I keep getting prompted to unlock "Local Items" keychain on my Mac, how do I fix that?
I tried to lock and unlock key-store but that not worked
I tried to unlock keychain using below command also
security unlock-keychain ~/Library/Keychains/login.keychain
90% will work.In my case that not worked
I tried to Delete keychain 'login
That worked for me there might be some issue with my keychain access password
Follow these steps to prevent prompts to unlock the Local Items keychain.
In Finder Select Go > Go to folder (⇧⌘G)
In the window that appears, type the following:
~/Library/Keychains/
Click OK.
Look for a folder with a name similar to this "A8F5E7B8-CEC1-4479-A7DF-F23CB076C8B8". Note: Each folder has a unique number.
Move this folder to the Trash.
Empty Trash.
Immediately choose Apple Menu () > Restart… to restart your Mac.
After restarting the computer, a new folder is created in the Keychains folder with a name similar to "4B29A0BB-599D-47FC-A2D1-42B5592B130B". This corrects the issue.
For more info: https://help.queens.edu/hc/en-us/articles/205937040-How-to-Resolve-Mac-OS-X-Keychain-Problems
I am currently releasing an update for an app and i can successfully debug the project. Now when i try to archive for publishing to create the .ipa file I recieve the following error:
I have tried to delete the obj + bin folders in my iOS folder and then clean/rebuild + try again but the error still remains.
Has anyone come across this problem before? The errormessage isn't giving me much information to work with.
try to delete your current certificate in keychain and add it again.
I also faced to this same exact problem when I'm going to debug the xamarin.iOS app using Visual Studio 2015. To solve this issue, steps are as below,
Open Terminal in your Mac and type this command:
security set-key-partition-list -S apple-tool:,apple:,codesign: -s /Users /YOUR_USERNAME/Library/Keychains/login.keychain-db
Then it will prompt for your Keychain access password.
(If it repeatedly promopt that your keychain access password is incorrect, go to "Keychain Access", select and deselect the lock. Then enter your password when asked for it.
Re-enter the above command in the Terminal. Give the password.
Clean and build your project and Run it.
Now it will work definetly.
I have started to use iCloud Drive to persist my files between two Macbooks I work on (MacbookA and MacbookB). iCloud creates a clone of my Desktop on both computers that are configured with iCloud. So on MacbookB I've got the path /Users/<ME>/Desktop/Desktop - MacbookA and /Users/<ME>/Desktop/Desktop - MacbookB.
I moved an Xcode project to /Users/<ME>/Desktop/Desktop - MacbookA and am now failing to build with the error - `/Users//Library/Developer/Xcode/DerivedData/-ffucveeerdkfefbhdxktyzhzcsko/Build/Intermediates/.build/Debug-iphonesimulator/.build/Script-BECCC6851D2428FD0068813F.sh: line 2: /Users//Desktop/Desktop: No such file or directory
I'm unable to make sense of this. The script seems to be an Xcode script and not a custom one. Has anyone experienced this problem?
`
I'm trying to remove all of my personal provisioning profiles that were loaded into my work computer when I added my account to Xcode.
I've already removed my account from the Accounts tab in settings.
I deleted all profiles in ~/Library/MobileDevice/Provisioning Profiles
I deleted and reinstalled Xcode. No matter what I do, the provisioning profiles will still appear in Build Settings > Provisioning Profile.
Is there another place where these are stored? I am using Xcode 6.4
EDIT:
I've made some progress. In the folder /Users/admin/Library/Developer/Xcode (admin is my username), I searched for one of the profiles by ID using
sudo find . -type f -exec grep -l '2322c49f' {} +
where 2322c49f is the beginning of the ID. This showed me that this ID was in the file DeveloperPortal 6.4.db-wal. When I opened it, it showed a lot of characters that couldn't be rendered, so I thought maybe it's a binary file. Then scrolling down was a plist embedded in it. The plist consisted of all the profiles. I delete this file and the two other similar files, listed below
DeveloperPortal 6.4.db DeveloperPortal 6.4.db-shm
I restarted XCode, it regenerated these three files, but the profiles continued to appear in them
I found another location where profiles are kept
/System/Library/MobileDevice/Provisioning Profiles/
I deleted the profiles from here and that solved the issue
I'm really going mad with this problem! I have an app that contains a simple Helper app which manages the login item for the Main app.
When I try to submit the app I get errors related to the provisioning profile and the entitlements. I'm sure that the problem is related with the Helper app because before than I added it the submission worked with no problem.
At the moment the helper app is code signed and is sandboxed as the main app.
The errors are :
Invalid provisioning profile. The provisioning profile included in the bundle is invalid
Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the one that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile 'com.apple.application-identifier' in 'myapp.app/Contents/Library/LoginItems/helper.app'
Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the one that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile 'com.apple.application-identifier' in 'myapp.app/Contents/MacOS/myapp'
For anyone else coming across this problem, you don't have to codesign the helper app a second time, just remove the "embedded.provisionprofile" from the helper app in the xarchive and you can submit no problem.
The only solution that seems to solve this problem was codesign and sandboxing the helper app from Xcode and then:
Re-Codesign the Helper app from terminal
codesign -f -s "3rd Party mac Developer Application:" -i
"com.bundle.YOUR.HELPER" --entitlements path/to/helper/entitlements
YEOR-HELPER.app
Remove provisioning profile from Helper app, adding a "Run script" into the "Build Phases"
rm"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Library/LoginItems/YOUR-HELPER.app/Contents/embedded.provisionprofile"
With this solution we've correctly submitted our App.
I had the 3rd error when I accidentally included some 3rd-party .a files in my target. (They're needed for non-App Store distribution but I'd forgotten to exclude them for the App Store build). The error wasn't too helpful in tracking this down!
I was finally able to resolve this problem by deleting the embedded.provisionprofile file from the helper app by adding the following run script:
if [ -f "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/embedded.provisionprofile" ];
then
rm "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/embedded.provisionprofile"
echo "Removed embedded provisioning profile."
else
echo "No profile found"
fi