Developer Team IOS 10 Apache Cordova Build - ios

I have the following problem when compiling a project in IOS 10. The project needs the Developer Team to compile correctly.
sudo cordova build ios --device
When you run the command, the following error:
In some forums JIRA official Apache Cordova, show the following solution:
issues.apache.org/jira/browse/CB-11845
I have not found a way to implement it properly to avoid this error. Build.xcconfig also attempt to modify the file, but I failed to fix the error.
If anyone has any ideas, I appreciate it very much.
Thank you.

Related

Error When Start to Install React Native Project in IOS | Error Code 65

I got an error that said, it works before I update my OS to Monterey. but after I update it just like this.
Failed to build iOS project. We ran "xcodebuild" command but it exited
with error code 65. To debug build logs further, consider building
your app with Xcode.app, by opening AwesomeProject.xcworkspace.
How can I solve this?
I try some references in Stackoverflow too, and I don't have a build folder in my project so it seems quite outdated some references in StackOverflow.

How to fix ionic 2 Apple Mach-O Linker error?

I'm building an ionic 2 app, and I can build the app with ionic build ios and I get no erros, but on xcode when I build my application I get the following error.
Apple Mach-O Linker (id) Error
Linker command failed with exit code 1 (use -v to see invocation).
How can I fix this?
Here is my system information
Cordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.0
OS: macOS Sierra
Node Version: v6.9.4
Xcode Version: Xcode 8.3 Build version 8E162
You are probably opening the .xcodeproj on Xcode, try opening the .xcworkspace. This fixed this error for me.
Had the same issue, spent almost a day trying to figure out what was causing it. For me the following solved it. Everything was working fine on ios#4.3.1, but on 4.5.3, I got this annoying error.
Check if this plugin "cordova-plugin-console" is there in the plugins folder. If it is there, remove it. Then it started building without any errors.
ionic cordova plugin remove cordova-plugin-console
Look for a file named libPods-AppName.a in Frameworks directory
where AppName is your app name.
Deleting it fixes it in most cases.
Take a look at the screenshot for reference.
Quick Fix
Disclaimer: My project uses Ionic v1
I had the same error and, once I had added a Android-only plugin, I thought that it was the cause of the error - I was wrong (so, ignore this cause if you think the same as I).
After some search I found the truly cause of the error: the cordova-ios version (4.5). I followed the steps suggested here and I solve this issue.
Steps:
ionic cordova platform remove ios
ionic cordova platform add ios#4.4.0
ionic cordova platform
Last step is used to check if ios#4.4.0 is actually the installed version.
Hope it helps.
In your platforms folder for ios, there are both .xcodeproj and .xcworkspace files. Open the /platforms/ios/.xcworkspace.
I found the issue that was causing this error.
On the config.xml file on the tag I had the email with my#email.com and you cannot have the .com on the email. I removed and it works fine now.
Thanks for the help

xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH - Since updating Xcode

Updated Xcode this morning and now ionic project wont deploy to a device.
ionic run ios --device
Returns:
** BUILD SUCCEEDED **
xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
Error: Error code 72 for command: xcrun with args: -sdk,iphoneos,PackageApplication,-v
No idea what to do to fix, Googling returns lots of options but none correct.
Cordova is trying to use "PackageApplication" tool. But it was removed since Xcode 8.3. Either downgrade Xcode or wait for Cordova to have a fix for that.
Linked in the Jenkins issue that matson kepson mentioned here there was a guy who attempted a PR to fix the issue. There was some unfinished change requests in his PR and I also found a few null ptrs in his changes. I forked his pr and fixed these things here and there is now a snapshot linked here that you can download and become unblocked until such a change is merged into the full build.
Hi its official Bug from jenkins
here you have a fresh status
https://issues.jenkins-ci.org/browse/JENKINS-43163
Little bit clearer to look at this:
http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/
I've just come across this and my solution was to remove the iOS platform from the project:
ionic platform rm ios
Then add it back in again
ionic platform add ios
I needed to run an initial build for it to fail with no signing set, so opening up the project in Xcode to just fix that. After that, building via the ionic cli worked as expected. I am guessing that re-adding the platform pulled in a new version of cordova-ios.
Update: I had only started on this project and created the base project from the blank template. I have Xcode 8.3.1 installed and using Ionic 3 (still with the --v2 switch with ionic cli).
I used shenzhen this automatic procedure encountered a similar problem, and finally in accordance with the github Pull Request to solve my problem, hope for your reference!
https://github.com/nomad/shenzhen/pull/347
I found a workaround to solve this using command line, with device connected on your mac:
ionic build ios --device
ios-deploy --noninteractive --debug --bundle build/device/YOURAPP.app
After this, stop debug using Ctrl C, and your app will be working on your device.
Hope work for you guys.
The is caused by the deprecated PackageApplication. If you're using the remotebuild tool to run from Windows, it will be solved when the remotebuild bug has been fixed: https://github.com/Microsoft/remotebuild/issues/26
Another solution is to downgrade XCode.
Here if the explanation on how to uninstall current XCode.
And here you can download XCode 8.2.
An option is open a .xcodeproj file located at platforms/ios and run the project directly from Xcode.

Titanium CLI error in building for app-store

I'm using the open source Titanium CLI for updating an app that's currently in the Apple app store. It builds and runs in the simulator without any problems using the command
ti build -p ios
When I try to build for the app store I use the command
ti build -p ios -T dist-appstore -R <company> -P <distribution certificate>
and get an error message
[ERROR] titanium_prep failed to run (10)
[ERROR] This application cannot be built with the Titanium open source SDK because it is an Appcelerator Platform registered application. Please use the Appcelerator Platform CLI tools or Appcelerator Studio to build this application.
I've unregistered the application with the Appcelerator Platform, but it hasn't corrected the problem.
I'm using Titanium Command-Line Interface, CLI version 5.0.6, Titanium SDK version 6.0.0.v20160131225447 and Node version 0.12.7.
Any help resolving this would be greatly appreciated.
There is a migration guide at https://github.com/m1ga/from_zero_to_app/blob/master/appc_to_ti.md
It seems you need to use a GUID that is not registered with appcelerator in the tiapp.xml.
It's also worth removing any <appc-...> or <property name="appc-..."> references to appcelerator services that will be turned off, and set <analytics>false</analytics>
I'm on a Mac with node 0.12 and I was having the same issue with Titanium SDK 5.X.X, but I have changed it to 4.X.X and now I can compile without errors.
I hope you don't need Titanium SDK 5.X.X. or 6.X.X to make your code run...
I met the same problem.
Solution:
re-create your app using $ ti create
or, just build this app using $appc ti build ...
Long explanation:
Our experience is: don't create ti app using $ appc create, just use $ ti create ...
in China mainland, the appc command is not usable at all because of GFW.
I found the related file is the titanium_prep file, which is binary, I can't see any useful information there.
You can't simply edit tiapp.xml and remove the appc/acs attributes to solve this problem
this problem will not occur if you run your app on IOS simulator.
Also, don't downgrade to Titanium 4.X. That means your app won't run at the latest devices.

Phonegap local builds fail with media plugin

create new project
build for iOS: SUCCESS
add media plugin
build for iOS: FAIL
The following build commands failed:
CompileC build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/i386/CDVSound.o HelloWorld/Plugins/org.apache.cordova.media/CDVSound.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[error] /Projects/Code/hello/platforms/ios/cordova/build: Command failed with exit code 65
Here's the list of commands
phonegap create hello
cd hello
phonegap build ios # WORKS
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git
phonegap build ios # FAILS
Same scenario happens with cordova, and if I use sudo.
I fixed the problem by completely deleting the iOS folder under platforms, then re-running phonegap build ios.
This is something I ran into a while back. If you’re not an iOS developer, but get tasked with building iOS apps, you may run into this. This particular exit code is fun because xcodebuild doesn’t tell you what the problem is.
Aside from building your app using the Xcode IDE, you also have the command line utility xcodebuild available to you. Assuming the code itself compiles just fine, this tool will tell you, for example, if you’re missing a provisioning profile or something.
In my case, it turned out xcodebuild didn’t have access to the certificate I was using.
So… here’s some things to check for:
Make sure you’ve installed an up to date certificate in your Keychain
Remove expired certificates
Grant access to xcode to use your certificate (or allow all programs to use the certificate)
Make sure you’ve installed an up to date provisioning profile
Remove expired
provisioning profiles
Another option ....
use https://build.phonegap.com which will build the app for you and generate your .ipa and .apk files. It is free for 1 project (just delete your project and then re-upload if you have multiple ones). Just make an account, upload your certs and then you upload your www folder.
Thumbs up if you this was helpful to you!
I got the solution on PhoneGap Google group
And the solution is to add the File plugin also. Strange that these dependencies are not mentioned but it worked. I guess we'll need to randomly try the combinations of plugins until something works.
The bug is logged here: https://issues.apache.org/jira/browse/CB-6225
And it looks like you have to add File plugin first, then Media, the order is important.
try add sudo when add cordova plugin into your project.
sudo cordova plugin add https://github.com/apache/cordova-plugin-media
I was getting an exit code 65 after adding the dialogs plugin. Tried some of the top answers here, but in the end James's advice worked: deleted the ios platform, reinstalled the platform, and then it built.

Resources