I am trying to configure my Fastfile to get an enterprise build with over the air installation support. Here is my current lane:
lane :enterprise do
increment_build_number(xcodeproj: "myapp.xcodeproj")
build_app(
scheme: "enterprise",
output_name: "myapp.ipa",
output_directory: "build",
export_options: {
manifest: {
appURL: "my app url",
displayImageURL: "display image url",
fullSizeImageURL: "full size image url"
}
},
export_method: "enterprise",
export_xcargs: "-allowProvisioningUpdates"
)
end
The build runs withouth problem and I get both ipa and manifest.plist ffiles. The problem is when get the build with Xcode, it produces 5 files:
DistributionSummary.plist
ExportOptions.plist
manifest.plist
Packaging.log
myapp.ipa
When I try to update the files by just changing ipa and the plist files, over the air intallation failes wih this error:
Error Domain=MIInstallerErrorDomain Code=13
"Failed to verify code signature of /.../myapp.app : 0xe8008017
(A signed resource has been added, modified, or deleted.)"
UserInfo={
NSLocalizedDescription=Failed to verify code signature of /.../myapp.app : 0xe8008017
(A signed resource has been added, modified, or deleted.),
LegacyErrorString=ApplicationVerificationFailed,
FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:],
SourceFileLine=77,
LibMISErrorNumber=-402620393
}
for bundle IDs ("com.myapp")
How can I make Fastlane generate all these files?
UPDATE
I have managed to get DistributionSummary.plist and ExportOptions.plistusing below code:
fastlane_require "gym"
dist_plist_path = File.join(Gym.cache[:temporary_output_path], "DistributionSummary.plist")
FileUtils.cp(dist_plist_path, "../build")
dist_plist_path = File.join(Gym.cache[:temporary_output_path], "ExportOptions.plist")
FileUtils.cp(dist_plist_path, "../build")
But I am still getting error when I try to install the app.
UODATE 2
I have tried deleting all the files except ipa and manifest with Xcode export and It is still working except it doesn't show app icon while downloading the app. So the error I am getting isn't related to other files.
I have found the problem. My app name contains a non ASCII character "ö" and it cousing the problem when I try to get an enterprise export. I gess enterprise package validation doesn't handle non ASCII characters. After changing the character the problem is solved.
Related
I am trying to repack an iOS Application; IPA file with the frida gadget dynamic library according to the following link. However, i am running into a console log error when launching the application:
<Warning>: Unable to obtain a task name port right for pid 610: (os/kern) failure (5)
Thus, googling a bit, I found that a possible fix(second link to related fix) might be to add a task_for_pid-allow key-value pair to the entitlements file.
Editing the entitlements file by adding the key using a text-editor before re-sigining the application with the following code snippet:
codesign --force --sign "iPhone Developer: m*****************" --entitlements entitlements.plist Payload/Plain\ Notes.app/Plain\ Notes
Resulted in a verification error when running ios-deploy as shown below:
Error 0xe800003a: The application could not be verified. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Is there a specific way to add key-value pairs to the entitlements file when repacking applications on iOS which would solve the verification error that I am getting?
I found out how to add values to the entitlements file, use PlistBuddy.
In my case, the below snippet should add the task_for_pid-allow key into my entitlements:
/usr/libexec/PlistBuddy -c "Add :Entitlements:task_for_pid-allow bool True" profile.plist
To check that it has been successfully added:
/usr/libexec/PlistBuddy -c "Print :Entitlements" profile.plist
I am trying to build a complicated xcworkspace that contains 8 xcodeproj.
Main project (target app, framework, app extension)
Pods
6 cpp projects with one static library target each (these have dependencies with each other and added to the final project)
I can build the project via xcodebuild command. I am also able to Archive it, but I cannot export the IPA file, it always gets the following error:
2020-03-18 19:04:49.801 xcodebuild[28749:691158] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/vr/1fb5zcxd0gg92359ynn0r2gm0000gn/T/xxxxx_2020-03-18_19-04-49.800.xcdistributionlogs'.
2020-03-18 19:04:49.834 xcodebuild[28749:691158] [MT] IDEDistributionMethodManager: -[IDEDistributionMethodManager orderedDistributionMethodsForTask:archive:]: Error = Error Domain=IDEDistributionMethodManagerErrorDomain Code=2 "Unknown Distribution Error" UserInfo={NSLocalizedDescription=Unknown Distribution Error}
error: exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but no value was provided
Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key 'method': expected one of {}, but no value was provided" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key 'method': expected one of {}, but no value was provided}
I also tried to use the XCode 10.3 (10G8) UI in order to perform the same actions. This results to the Organizer screen where I see the xcarchive erroneous located in a group "Other Items" and not "iOS Apps" as it should.
Additionally, the option
"Validate Content" is disabled.
"Distribute Content" does not provide anything for iOS packing.
I have verified that my build commands are correct as the project was able to build with these in its previous state.
I've tried changing static project libraries dependencies but when adding all dependencies to all items it ends with a build error of multiple symbols.
I suspect that something in the build settings, or library/header references is faulty, but I cannot really troubleshoot it.
Is there any way to get additional information for the problem?
I had the same issue. I had to reset my developer certificate on our build server to resolve this.
I hope this helps others.
I have problem with firebase app distribution.
I am using Xcode 11 and there are new iOS Development certificates, namely Apple Development certificates.
I have added fastlane, added plugin to fastlane for firebase-app-distribution.
But when I am executing my lane to distribute application there is error
note: Using new build system
[19:55:21]: ▸ note: Planning build
[19:55:21]: ▸ note: Constructing build description
[19:55:21]: ▸ error: No profile for team 'TEAM_ID' matching 'App Name Development' found: Xcode couldn't find any provisioning profiles matching 'TEAM_ID/App Name Development'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'AppNameDev' from project 'AppName')
I have similar configuration and fastlane lane with this plugin for other app but run in Xcode 10, and I think it has old certificates iOS Development not new one Apple Development and it builds and distribute correctly.
I can build this app using Archive, export .ipa and distribute it manually via firebase console and it works.
I have also such error informations
There seems to be a mismatch between your provided `export_method` in gym
[19:55:21]: and the selected provisioning profiles. You passed the following options:
[19:55:21]: export_method:
[19:55:21]: Bundle identifier: com.company.AppNameDev
[19:55:21]: Profile name: App Name Development
[19:55:21]: Profile type: development
So It just suggest profile name and type and bundle id that I've already correctly types in my Fastfile file in build_ios_app
desc "Firebase App Distribution to testers"
lane :firebase_distribution do
build_ios_app(
workspace: "AppName.xcworkspace",
configuration: "Release",
scheme: "AppName Dev",
silent: true,
clean: true,
output_directory: "firebase-builds",
output_name: "appname.ipa",
sdk: "iphoneos13.1",
export_options: {
method: "development",
provisioningProfiles: {
"com.company.AppNameDev" => "App Name Development"
}
}
)
firebase_app_distribution(
app: "<id goes here>",
testers_file: "fastlane/crashlytics_testers.txt",
release_notes: "Lots of amazing new features to test out!",
firebase_cli_path: "/usr/local/bin/firebase"
)
end
end
I am giving a try of GluonVM on iOS with Oracle JDK 10.2.
I have noticed that although I have "com.javasuns.test" in src/ios/Default-Info.plist, when I run the "./gradlew launchIOSDevice" command, the bundle ID is taken from the mainClassName defined in build.gradle.
Here is my example:
Default-Info.plist
<key>CFBundleIdentifier</key>
<string>com.javasuns.test</string>
build.gradle
dependencies {
compile 'com.gluonhq:charm:5.0.2'
}
mainClassName = 'test.TestFX'
fxmobile {
javafxportsVersion = '8.60.12'
ios { ...... }
}
./gradlew launchIOSDevice
com.gluonhq.higgs.Higgs: non-fatal issue for class javafx.scene.web.JSObjectIosImpl (no known superclass)
command to dsymutil: xcrun dsymutil -o /Volumes/MyApps/testFX/build/gvm/testFX.app.dSYM /Volumes/MyApps/testFX/build/gvm/testFX.app/testFX
Error getting ProvisioninedDevices, ignore
created
created
created
created
Error getting ProvisioninedDevices, ignore
created
provprofile asked, bid = test.TestFX and origbid = test.TestFX
provprofile asked, bid = test.* and origbid = test.TestFX
provprofile asked, bid = * and origbid = test.TestFX
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
Warning, getProvisioningProfile is failing
java.lang.NullPointerException
I have managed to bypass the issue by creating a new java main class named "test.java" under "com.javasuns" package (ignoring that java type names usually start with an uppercase letter).
build.gradle (Changed)
mainClassName = 'com.javasuns.test'
However, now a new error appears that I do not know how to get through it:
13:17:45:491] BosonAppSupport: Validating codesign...
[SUB] /Volumes/MyApps/testFX/build/gvm/testFX.app: valid on disk
[SUB] /Volumes/MyApps/testFX/build/gvm/testFX.app: satisfies its Designated Requirement
[13:17:46:269] BosonAppSupport: Validation codesign result: true
[13:17:46:270] BosonAppSupport: Codesign done
[13:17:46:333] BosonAppBuilder: UploadInternal start
[13:17:51:041] : Upload Progress: 10%
[13:17:51:573] : Upload Progress: 20%
[13:17:52:104] : Upload Progress: 30%
[13:17:52:916] : Upload Progress: 40%
[13:17:53:947] : Upload Progress: 50%
[13:17:54:696] : Upload Progress: 60%
[13:17:55:520] : Upload Progress: 70%
[13:17:56:372] : Upload Progress: 80%
[13:17:57:367] : Upload Progress: 90%
[13:17:58:414] : Upload Progress: 100%
[13:17:58:460] BosonAppBuilder: uploadInternal done
[13:17:58:796] : Progress: CreatingStagingDirectory [5%]
[13:17:58:798] : Progress: ExtractingPackage [15%]
[13:17:58:799] : Progress: InspectingPackage [20%]
[13:17:58:802] : Progress: TakingInstallLock [20%]
[13:17:58:804] : Progress: PreflightingApplication [30%]
[13:17:58:805] : Progress: InstallingEmbeddedProfile [30%]
[13:17:58:812] : Progress: VerifyingApplication [40%]
[13:17:58:954] : Error: APIInternalError, Description: Failed to unhide archs in executable file:///private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LXITKr/extracted/testFX.app/TestApp
> Task :launchIOSDevice
[13:17:58:955] BosonAppBuilder: Installing finished due to an error.
[13:17:58:958] BosonAppBuilder: Install internal failed
[13:17:58:958] BosonAppBuilder: Something went wrong. App wasn't installed on the device
Any ideas of how I can solve both issues?
There are two main keys that you have to set properly: CFBundleIdentifier and CFBundleExecutable.
You can check the sample SingleView-GluonVM:
Main className (see build.gradle): com.gluonhq.samples.singleviewgvm.SingleViewWithGluonVM
CFBundleIdentifier (see Default-info.plist): com.gluonhq.samples.singleviewgvm.SingleViewWithGluonVM
and
Gradle project (see settings.gradle): singleview-gluonvmApp
CFBundleExecutable (see Default-info.plist): singleview-gluonvmApp
or the sample DeepLearning-LinearClassifier, with similar settings.
As you can see, the Gluon IDE plugin sets by default the CFBundleIdentifier as the main class name and the CFBundleExecutable as the name of your mobile project.
CFBundleIdentifier
When you want to deploy your app to iOS, the provisioning profile should have this bundle ID. However, you can also use wildcards. Just make sure you have downloaded and installed to your machine the provisioning profile (it should be under /Users/<user>/Library/MobileDevice/Provisioning Profiles), with extension .mobileprovision.
If you preview it (from Finder for instance), the AppID from this file could be something like <TEAM ID>.<mainClassName>, or <TEAM ID>.*.
This is where the jfxmobile plugin sets the appId.
CFBundleExecutable
About the CFBundleExecutable, this is the name your application under build/gvm/ will have. It is mandatory in this case that it uses the name of your project (as in the gradle name).
This is where the jfxmobile plugin sets the appName.
You will find your app under /<appName>/build/gvm/<appName>.app (though Finder will show just <appName>:
If you see the content of the app, you will find the executable file under /<appName>/build/gvm/<appName>.app/<appName>:
The error you are getting;
[13:17:58:954] : Error: APIInternalError, Description: Failed to unhide archs in executable file:///private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LXITKr/extracted/testFX.app/TestApp
shows testFX.app/TestApp, so probably your project name is testFX, but should be TestApp?
Alternatively, you can simple match the value you have set in CFBundleExecutable, by adding a settings.gradle file to your project, with:
rootProject.name = "<your bundle executable value>"
Working in Ionic 2, then upgrading to 3 to try to fix this error. It began when I was trying to figure out a cordova plugin. The archive doesnt appear to be signed correctly.
** ARCHIVE SUCCEEDED **
2017-10-03 14:40:10.745 xcodebuild[4293:73077] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/12/9djblkvn1_7g0_41crqy9ht00000gn/T/Omnidispatch_2017-10-03_14-40-10.744.xcdistributionlogs'.
2017-10-03 14:40:10.965 xcodebuild[4293:73077] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fa1dde9d300>: Error Domain=IDEFoundationErrorDomain Code=1 "No 'teamID' specified and no team ID found in the archive" UserInfo={NSLocalizedDescription=No 'teamID' specified and no team ID found in the archive}
error: exportArchive: No 'teamID' specified and no team ID found in the archive
Error Domain=IDEFoundationErrorDomain Code=1 "No 'teamID' specified and no team ID found in the archive" UserInfo={NSLocalizedDescription=No 'teamID' specified and no team ID found in the archive}
** EXPORT FAILED **
Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,Omnidispatch.xcarchive,-exportOptionsPlist,/Developer/omnisolutions/omni-ionic/platforms/ios/exportOptions.plist,-exportPath,/Developer/omnisolutions/omni-ionic/platforms/ios/build/device
There have been a few solutions that suggest that its not the team id, but rather a certificate error. I'm not very good with mac certificates, but they seem to be in place and I've not changed them since this broke.
I have gone into xcode a time or two and the team was not saved, I've fixed that every time I've seen it and it seems to be staying there now, but its still not changing anything when i run ionic build ios
What else can I check?
I should add, that it builds in xcode 8, but not in vscode or on the commandline as it did previously.
I faced the same issue during a ionic cordova build without signature (for
pro MDM):
ionic build ios --release --device
--buildFlag="-UseModernBuildSystem=0"
finally I smash it using a build.json at the root folder with only the developmentTeam Info filled
{
"ios": {
"debug": {
"codeSignIdentity": "Apple Development: BLa BLa (XXXXXXX)",
"provisioningProfile": "<XXXXXX-XXXXXX-XXXXX>",
"provisioningProfileFile": "embedded.mobileprovision",
"certificateFile": "blabla.p12",
"developmentTeam": "<TEAMID>"
},
"release": {
"codeSignIdentity": "",
"provisioningProfile": "",
"provisioningProfileFile": "",
"certificateFile": "",
"developmentTeam": "<TEAMID>"
}
}
}
Hope it's help you
Unfortunately I did not find a great solution for this error. I was forced to rm -rf my directory, uninstall ionic and cordova and bring it all down from git and set it up again.