Ionic: unable to archive app in xcode8.2.1 but it build successfully - ios

I am new with ionic1 framework. Currently i am working on ionic sidemenu ios app. I have create a share extention its working fine and build my app on iphone but when i archive it gives error
swift compiler error
 'Cordova/CDV.h' file not found
failed to import bridging header '/Users/ht/msbsocial/myApp/platforms/ios/project/Bridging-Header.h'
I am not able to understand how to resolve it. I have searched and tried solutions but no luck. Please help me.

To Archive a app in xcode you need to plug in a device, select it like if you would run the app on it, then you can archive it.

This hasn't been active for a long time, but...maybe this will be helpful to someone who gets the same problem in the future...
I had the same problem(build succeeded but archive failed) when I added an extension plugin(cordova-plugin-call-directory) to my ionic project. I solved the problem by:
select extension under [Targets] >> go to [Build Settings] >> find [Objective-C Bridging Header] >> delete the path value >> clean and then archive

Related

moving from GoogleMobileAds.framework to xcframework error

I changed my framework references from MobileAds.framework to xcframework following the instructions(manual) at https://developers.google.com/admob/ios/quick-start.
But for some reason I get the error as shown below. I cleared the cache. Even tried adding a new simulator. It still says the same. Can someone please help?
I am on Mac OS Catalina and Xcode 12.4. Cannot upgrade my OS or Xcode anymore.I am also unable to run the app on any of my devices. This app has been running fine, it was time to do minor UI color changes so nothing else has changed in the code.
Failed to load Info.plist from bundle at path /Users/User1/Library/Developer/CoreSimulator/Devices/8AF69E5B-FD16-4C80-B9F5-DE4A4A0B78BA/data/Library/Caches/com.apple.mobile.installd.staging/temp.8rg85u/extracted/Myapp.app/Frameworks/GoogleMobileAds.framework; Extra info about Info.plist: Couldn't stat /Users/User1/Library/Developer/CoreSimulator/Devices/8AF69E5B-FD16-4C80-B9F5-DE4A4A0B78BA/data/Library/Caches/com.apple.mobile.installd.staging/temp.8rg85u/extracted/Myapp.app/Frameworks/GoogleMobileAds.framework/Info.plist: No such file or directory
Finally found the solution. Target->Frameworks->All Google admob related frameworks had "Embed and sign" selected, made them "Do not embed" and the app is running.

Error on publish app to AppStore Xamarin.iOS build

Issue: Invalid Swift Support- The file libswiftAVFoundation.dylib doesn’t
I have tried to resolve my issue based on the following link. but still, I'm getting the issue after uploaded in App store. Please help me resolve this issue. I'm new for Xamarin.iOS
https://docs.google.com/document/d/1nWY-RK9oXsNnlca5eSvbH9tQejLnCjismHrSy8IuDFo/edit
Totally I have created two projects in Xamarin and works well in locally.
Project 1. Xamarin Sample Binding Project
- Here, I have included my own Swift SDK
Project 2. Xamarin Sample Demo Project
- Mapped the Binding project
Generated the iPA file:-
Created the IPA file for Project 2 in Xamarin. The IPA doesn't have the SwiftSupport folder. Then I have followed the above doc steps and export the IPA file using Xcode. I have extracted the IPA file and seen swiftSupport folder. After, I have submitted in the Appstore I'm getting the below issue.
AppStore Failed error message:-
Invalid Swift Support- The file libswiftAVFoundation.dylib doesn’t
have the correct code signature. Make sure you’re using the correct
signature, rebuild your app using the current public (GM) version of
Xcode, and resubmit it. Don’t just modify the code signature of
libswiftAVFoundation.dylib.
Finally, Luckily my app works fine. I have just removed all swift framework lib and added the Xamarin.Swift lib only from the Package. That's it.
Thank you Every one

Unable to install app in simulator Xcode 9 beta

I downloaded Xcode 9 beta recently, and when I tried to run my app in the simulator it is not getting installed. I am getting this error in my Xcode every time I try to run the app.
This app was unable to be installed.
The application used to work in Xcode 8.3.3
Unfortunately, the error message doesn’t explain why the install failed. You can take a look at ~/Library/Logs/CoreSimulator/CoreSimulator.log to see if the rest of the error message is there with more info. If not, you should check out the sim device’s system log:
sudo xcode-select -s /Applications/Xcode-beta.app # if you haven’t already
xcrun simctl spawn booted log show
You can use --predicate to filter that down a bit.
Late answer but might be that can be useful for others. I just get a project with existing watch-kit and custom keyboard code. After change the identifier i got the same error and i spend 1 day to find out why that happens.
I checked everything of bundle id and all version. then i do global search in xcode with old identifier and i found that following.
Here in both .plist file have old WKCompanionAppBundleIdentifier so after i update it with new manually application run again.
IMPORTANT NOTE:
IF YOU ARE JUST CHANGE IDENTIFIER FROM GENERAL TAB THAT DOES NOT MEAN IT UPDATE AT ALL. KINDLY CHECK WITH ALL POSSIBLE PLACES BY SEARCH AND REPLACE IT WITH NEW IDENTIFIER.
XCODE VERSIO: Version 9.0 (9A235)
I ran into this same issue and a quick click on Product > Clean did the trick for me!
If you are using CocoaPods in your project please have a look at this answer: https://stackoverflow.com/a/44533287/221194
Changing the status of the pods subdirectory helped me with my project.
I had a similar issue when installing my App on the IOS simulator (with Xcode 9).
I found the issue (at least for my case), it was due to an unauthorized key (Privacy - Location When In Use Usage Description) in the info.plist of the Watch App.
I have moved this key to the info.plist of the WatchKit Extension and now the App installs again.
I hope it will help others people having the same issue.
change deployment target as per requirement.
select project > GENERAL > DEPLOYMENT TARGET
also check ios version of your device
I had the same issue. Log shows it's an error caused by Google Signin:
FunctionName=-[MobileInstallationHelperService stageItemAtURL:completion:], SourceFileLine=392, NSUnderlyingError=0x7f891e9a1270 {Error Domain=MIInstallerErrorDomain Code=4 "Failed to remove ACL" UserInfo={NSLocalizedDescription=Failed to remove ACL, FunctionName=-[MIFileManager _removeACLAtPath:isDir:error:]
However it works on iOS 9 & 10 simulator.
I got same error and I was using Cocoapods in my project and for me help just update pods.
I ran into this issue in Xcode 9.0 beta 5 after renaming a project that contained an iOS and watchOS app. To fix, I recreated the iOS target.
This issue could be triggered by multiple things however if you take a look at the logs at ~/Library/Logs/CoreSimulator/CoreSimulator.log and it states an error that reads :
NSUnderlyingError=0x7fb51c271ee0 Could not hardlink copy /originPath
to /destinationPath
it's possible that your Build number in your Project Target's settings is set to empty.
Go to Project Target > Identity > Build and set a Build number. You'll have to uninstall the the app in the simulator and re-install it before installing updated versions.
Please check the bundle identifier to solve the issue.
I had the same issue on XCode 9.3.1 when I wanted to add google map framework to my project manually.
To fix the problem I remove the google frameworks from Embedded binaries...

ionic app archive failing in xcode 7.2 due to ‘Cordova/CDVViewController.h’ file not found

I am developing an ionic app for iOS and it is building fine, but when I archive it in xcode, it is throwing "‘Cordova/CDVViewController.h’ file not found" error in xcode 7.2.
I have tried usual suspects such as solution suggested in https://forum.ionicframework.com/t/cordova-cdvviewcontroller-h-file-not-found-in-xcode-7-1-beta/32232, but nothing worked. I have also tried archiving in xcode 7.1, 6.4 but the same error exists. I am using ionic 1.2.4.
Some of my project screenshots (if it helps)
let me know if you need more info.
2 things to try
1st)
you have screen shotted your header search paths i don't see a path to Cordova
try adding $(SRCROOT)/WhereCordovaIS to the header search paths
also do the same for Library Search Paths
2nd)
In the Cordova Lib make sure the headerFiles that are missing 'CDVViewController.h' is included in the 'copy files build step' in BuildPhases
is in the copy
Hi #David I tried your answer. Didn't work. However, I tried ionic's weather app and it worked. So I thought the issue might be with my environment. I cut out js, css and views folder and put it in a fresh repo and it worked like a charm.

'Failed to import bridging header', 'file not found', when archiving my project

I was having some trouble when archiving a project with a swift bridging header, and a framework. It was giving me errors, but only when I Archive. So I made a new project to test this further.
Here are my steps:
New swift project.
Add an objective-c file.
When it prompts me to ask about making a bridging header, press yes.
At this point, I archive. It succeeds.
Add ASyncDisplayKit.xcodeproj
Add libAsyncDisplayKit.a, AssetsLibrary and Photos to "Link Binary With Libraries" build phase.
Add "-lc++ -ObjC" to project linker flags.
Add #import <AsyncDisplayKit/AsyncDisplayKit.h> to the bridging header.
These are the instructions found here.
I archive again, and it fails, with two errors:
'AsyncDisplayKit/AsyncDisplayKit.h' file not found
Failed to import bridging header '/Users/Andrew/Desktop/testProject/testProject/testProject-Bridging-Header.h'
This is replicable. I seem to have followed their instructions perfectly well, and I haven't touched the project other than this.
Interestingly, it builds fine, and runs fine. But archiving, it gives these errors.
Any help is appreciated.
EDIT: If I import it using CocoaPods, it works just fine. The problem is that I'm specifically using Submodules, and not CocoaPods, for my project. It'd be pandemonium to switch to using both as a solution to this problem.
This guy has done work to resolve the issue here:
https://github.com/nrcmedia/AsyncDisplayKit
For the time being switching to this branch will get you past the issue.
It is currently under review to be pulled into Facebook here:
https://github.com/facebook/AsyncDisplayKit/pull/449
Did you check under Project Build settings -> swift compiler code generation -> objective-c bridging header is set to testProject-Bridging-Header.h?
I had the problem with a project where I wanted to share a CoreData database between App and Today App Extension and prepare the App for the AppStore (Archive Build).
The reason was that the file '+CoreDataModel.h' was not found and the 'Failed to import brigding header' error message was based on it.
It turned out that the corresponding CoreData classes, which were supposed to be generated by XCode, were built in debug mode, but not in release mode, which is finally used in the archive build.
The crucial difference was that the release build was built in compilation mode 'Whole Module' without generating the CoreData classes.
If you switch to Incremental in XCode under Build Settings > Swift Compiler - Code Generation > Release you could build the app as an archive and upload it to ITunes Connect.

Resources