On our CI (GitHub Actions) we are signing our .ipa with codesign and after that uploads the resulting .ipa with altool to TestFligt.
The problem is that the entitlements added by codesign no longer appear when we view the build on TestFlight.
The app requires entitlements for push notification and for associated domains.
codesign -s Distribution prod.entitlements prod.ipa
Immediately after we do a
codesign --verbose --display --entitlements -
and the entitlements show fine.
Next command is
xcrun altool --upload-app --type ios -f prod.ipa --apiKey $api_key_id --apiIssuer $appstore_api_key_issuer
To us it seems like altool strips the entitlements from the .ipa.
What are we doing wrong?
Continuous Integration
RSS for tagContinuous integration is the process of automating and streamlining the building, analyzing, testing, and archiving of your apps, in order to ensure that they are always in a releasable state.
Posts under Continuous Integration tag
34 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I want to integrate an apple pay account on the website, but on the point where I am validating merchant that return "false" responses . I already followed the documentation and tried many times but still did not resolve it. Please help me to resolve this issue. so that i can integrate apple pay for heartland.
here i mentioned my block of code where i am verifying merchant, please help to fix this.
server side code: (PHP):
$merchantSession = fetchAppleMerchantSession($validationURL);
echo json_encode($merchantSession);
function fetchAppleMerchantSession($validationUrl){
$cert_url = base_path('cert/merchant.pem');
$cert_key = base_path('cert/merchant.key');
$data = [
'merchantIdentifier' => 'domain.com',
'domainName' => 'domain.com',
'displayName' => 'Disp Name',
'initiative' => 'web',
'initiativeContext' => 'domain.com'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $validationUrl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_CERTINFO, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
curl_setopt($ch, CURLOPT_SSLCERT, $cert_url);
curl_setopt($ch, CURLOPT_SSLKEY, $cert_key);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
curl_close($ch);
$result = json_encode($res);
return ['data' => $result, 'status' => false];
}
client side code (JS):
// Create Apple Pay session within the user gesture handler
const session = new ApplePaySession(6, paymentRequest);
// Handle merchant validation
session.onvalidatemerchant = (event) => {
console.log("event", {event, session});
const validationURL = event.validationURL;
fetch('gp_applepay_validate.php', {
// Replace with your server-side validation endpoint
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Headers': "*"
},
body: JSON.stringify({
validationURL
}),
})
.then((response) => {
console.log("response.json()", response);
return response.json();
})
.then((data) => {
console.log("datappp", data);
if (data.status) {
event.completeMerchantValidation(data.data);
} else {
console.error('Merchant validation failed:', data.data);
session.abort();
alert('Payment failed: ' + data.data); // Improve error message
}
})
.catch((error) => {
console.error('Error during merchant validation:', error);
session.abort();
alert('An error occurred during payment. Please try again later.'); // Generic error message for user
});
};
Hello, we recently added a build plugin to our swift package and we have a Xcode project that uses the swift package as a dependency and we build that Xcode project from the command line using xcodebuild build-for-testing. After we added that build plugin to the swift package, xcodebuild now fails and says this:
If I remove that build plugin from the swift package then xcodebuild build-for-testing will build successfullly. It is also worth noting then when we run the xcodebuild build-for-testing command we pass in multiple -destination flags. If we pass one -destination flag then xcodebuild succeeds even with the build plugin. So it seems like the issue is around having multiple destination flags and a build plugin added.
This sounds like a bug within xcodebuild. Any thoughts or ideas on why this isn't working would be helpful!
Here is an example of what our full xcodebuild command looks like:
xcodebuild build-for-testing
-project “SomeProject”
-scheme “SomeScheme”
-configuration Debug
-destination ‘SomeDestination1’
-destination ‘SomeDestination2’
-destination ‘SomeDestination3’
-disableAutomaticPackageResolution
-onlyUsePackageVersionsFromResolvedFile
-skipPackageUpdates
-skipPackagePluginValidation
-allowProvisioningUpdates DEVELOPMENT_TEAM=SomeTeam
Thank you!
I'm building a Unity application for ios that also communicates with Firebase (and GDrive, if it makes a difference, as well as some other servers). When running it through Unity Build Automation with fastlane, this is what it's failing on.
Help?
inline-code[2024-04-10T09:53:11.680Z] - 7.4.1.2.7.4 - [0;36mINFO [0m: SwiftCompile normal arm64 Compiling\ AsyncAwait.swift,\ Result.swift,\ Storage.swift,\ StorageComponent.swift,\ StorageConstants.swift,\ StorageDeleteTask.swift,\ StorageDownloadTask.swift,\ StorageError.swift,\ StorageGetDownloadURLTask.swift,\ StorageGetMetadataTask.swift,\ StorageListResult.swift,\ StorageListTask.swift,\ StorageMetadata.swift,\ StorageObservableTask.swift,\ StoragePath.swift,\ StorageReference.swift,\ StorageTask.swift,\ StorageTaskSnapshot.swift,\ StorageTaskState.swift,\ StorageTokenAuthorizer.swift,\ StorageUpdateMetadataTask.swift,\ StorageUploadTask.swift,\ StorageUtils.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/AsyncAwait.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/Result.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/Storage.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/StorageComponent.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/StorageConstants.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/Internal/StorageDeleteTask.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/StorageDownloadTask.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/StorageError.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/Internal/StorageGetDownloadURLTask.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/Internal/StorageGetMetadataTask.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/F...
[2024-04-10T09:53:11.680Z] - 7.4.1.2.7.4 - [0;36mINFO [0m: torageTokenAuthorizer.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/Internal/StorageUpdateMetadataTask.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/StorageUploadTask.swift /opt/workspace/workspace/arpalusdev.productrecognition.ios-provisioned-app/temp20240410-3408-1mgvzme/Pods/FirebaseStorage/FirebaseStorage/Sources/Internal/StorageUtils.swift (in target 'FirebaseStorage' from project 'Pods')
[2024-04-10T09:53:11.680Z] - 7.4.1.2.7.4 - [0;36mINFO [0m: (2 failures)
I want to use a ci_script to change the CI_BUILD_NUMBER to a new value.
But in XCODE CLOUD there seems to be no programmatic way to change it?
Hello!
Since Xcode 15 came out, I've been having this issue with UI tests where the test runner hangs for 60s when the keyboard is presented.
In the test logs I get this kind of messages:
00:07.588 Wait for com.example.app to idle
01:07.642 App event loop idle notification not received, will attempt to continue.
Interestingly, this only appears to be happening in CI environments (I've tried Xcode cloud and Circle CI). It works fine on my local machine.
Everything is fine with Xcode 14, but I can't keep my CI environment stuck on Xcode 14 forever.
I've tried disabling animations using UIView.setAnimationsEnabled(false), but it did not fix the problem.
Here are the full logs of what it takes to fill out a text field: logs.txt
Does an 'archive build' require 'preview content'?
I've put swift source files into 'Preview Content' directories - one directory for the top-level App and one for an embedded framework. An 'archive build' fails, complaining about the code in a #Preview block.
#Preview {
// the archive build fails to find this `default` ??
let controller = PersistenceControllerTopLevelPreview.default
let user = controller.user
...
The framework has its 'Preview Context' specified in the Development Assets; same with the top-level App.
I'm encountering an **error Segmentation fault: 11 ** during the archiving process. If the issue is happing with the my code. Then how can I diagnosing the problem. or figure out pin point in code base?
I changed the compiler optimization level. It works for me when I use the Osize compiler optimization level. Previously, it was set to Ospeed.
Want to know about the impact of the Osize compiler optimization level on the app.
I am looking for any help regarding an errSecInternalComponent error I am seeing when trying to archive my iOS app via my CI process. Specifically, this CI process is a GitHub Action running on a self-hosted M2 Pro Mini machine to which we have Screen Share access. I have followed the very helpful seminal post and have confirmed that I can run the necessary command in the local terminal via Screen Share, and I don't get any Keychain Access dialogs to pop up. When I try to run the same command via an SSH terminal from my local machine on that same machine, I get the following error:
/Users/{username}/Library/Developer/Xcode/DerivedData/{projectID}/Build/Intermediates.noindex/ArchiveIntermediates/{projectname}/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/{some name}NotificationServiceExtension.appex: errSecInternalComponent
I only get the error for that one service extension target. The project is only a couple years old, created with Xcode 14 or maybe 13. The signing has always been managed automatically with the provisioning profiles for all our targets being managed by Xcode.
Thanks in advance for any advice or suggestions as to what I may be missing or how to address this problem. I am more than happy to provide any more information I can to diagnose and solve the issue.
Hi,
I have created the applications (debug and runner) using xcodebuild.
I have tried it both using Xcode 14.3.1 and 15.1.
I used the xcodebuild build-for-testing... with -configuration set to Debug (I've also built the apps by omitting the -configuration altogether).
The configurations are set correctly in Xcode, and I can run the automation from Xcode and running xcodebuild.
I am using a different tool other than xcodebuild to run the tests (I'm using go-ios https://github.com/danielpaulus/go-ios). The issue I'm having is that right at the beginning of the test, I'm getting this error "Failed to retrieve test configuration from IDE". I know it's something to do with the two apps (debug and runner appp), because I've made comparison to a brand new application I had created using Xcode.
I assume this is something to do with the build configurations we have in the app (Debug or Release), but they're all correctly set in Xcode, and I can also run the tests (albeit using the xctestrun file) without any problems.
Do you know what could be causing this? In particular, what could cause the above error to be generated? Any help (however related or unrelated you think it could be) is greatly appreciated.
Thanks in advance.
Sep
There was an issue when we processed your order. Verify that your information is correct and try again. If you need further assistance contact us.
Duplicate order
I've pulled the project from Git. Someone else was working on it and it works perfectly fine for them, they can edit all the files. On mine I can only edit what I have added, the files which were already there I can edit, but their changes and additions do not show on the xcode directory on the left side. If i go to finder and click on the project folder there I can see their changes on there..
I tried clicking the lock icon on the preview screen and it says this:
“file.swift” is currently locked because it is a remote resource.
and when clicking Unlock
The file is a remote resource. Try making a local copy.
Literally have no idea what to do now. I tried copying their files and making new files and folders like how they made on their branch but it says its already existing even though it is not showing on my swift directory!
If you need any other information I am happy to provide it for you!
Our CI pipeline produces .xcresult bundles that allow developers to diagnose failures by opening them in Xcode. If the test crashes, we used to be able to open the diagnostic folders and inspect the raw test logs. As of Xcode 15, that option is no longer available. I know the Diagnostic data is there because I can view it with Xcode 14. Am I just missing something in the Xcode 15 UI? Or has the capability to browse the Diagnostics actually been removed?
We got the newly issue that our Test devices keeps us asking for the pin code to "Enable UI Automation".
Then it works for some hours or days, but after some time it starts again.
"Enable UI Automation" is already enabled in "Settings" - "Developer" menu.
The devices are located remotely and we can't access them directly, so this is a big issue for us right now.
Is there any way to avoid this?