Using the CLI as always but after updating my iPhone to iOS14 I have got this error:
** EXPORT SUCCEEDED **
Project successfully built.
Unable to apply changes on device: XXXXXXXXX. Error is: No .ipa found in /Users/XXXXXXXX/XXXXXXXX/platforms/ios/build/Debug-iphoneos directory..
But the file is located there. Also using Xcode 12 doesn't help...Even the LaunchScreen is black...
Would anyone suggest if it can be fixed any how? Or it is a Nativescript bug and we have to wait when they will update it?
Also there is a warning on:
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'MDFInternationalization' from project 'Pods')
Your Error:
Unable to apply changes on device: XXXXXXXXX. Error is: No .ipa found in /Users/XXXXXXXX/XXXXXXXX/platforms/ios/build/Debug-iphoneos directory..
comes from a wrong configured Info.plist. You should check the line
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
If you don't have ${PRODUCT_NAME} as the value, change it to this. That helped me.
Hey just to add to what Moritz said. I also had to upgrade nativescript-localize to 4.2.2 (thread: iOS14 and nativescript)
After that ${PRODUCT_NAME} stopped being replaced by the plugin and the .ipa then had the correct name.
To fix the warning around IPHONEOS_DEPLOYMENT_TARGET you may need to add this to your Podfile in app/App_Resources/iOS/Podfile.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
end
end
end
https://timleland.com/how-to-fix-nativescript-issue-with-ios14-and-xcode-12/
Try Removing and adding back
tns platform add ios
This will update the ios package below
"#nativescript/ios": "8.2.1",
This worked for me.
Related
I am getting rid of my 8 year old mac, and am switching to the new m1 macbook air, but none of my old projects are running. I have installed cocoapods succesfully, but a lot of my big projects are running into errors, even after updating all the pods and running everything through Rosetta. Here are some of the errors I am running into in Xcode:
Could not find module 'PodName' for target
'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator
No such module 'PodName'
These are just a few, encountering many errors. I tried updating these pods, reinstalling them, etc. but nothing is working. Has anyone with a m1 mac had any success with this?
You can tweak your project architecture or add the following at the very end of your Podfile (and run pod update again) :
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
This seems likely related to this question & answer here: Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
Basically what you'll need to do is make sure that:
The architectures being built is set to Standard Architectures (ARCHS_STANDARD)
That you add an 'excluded' architecture setting, for Any iOS Simulator and set it to arm64
That should get you up and running.
One thing to note (that caught me up for a while): Make sure that you do not have the Build Setting of "Valid Architectures" (VALID_ARCHS). If you do, delete the line entirely. It was causing issues for me, because it was effectively ignoring the new paradigm that Apple wants us to use (Architectures + Excluded Architectures).
Finally, if you do not see VALID_ARCHS but you're still unable to run it, one thing that worked for me (since I also was coming back to an old project) was to:
Add in VALID_ARCHS and set it to Standard architectures
Build the app (get the errors as expected)
Delete the line
Re-build the app
This stumped me for ages.
You need to add the following line inside your pod file inside your project.
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
Add it for each build configuration. The full code to do this is:
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
There is also a chance that on an M1 machine you need to compile your pods using the x86_64 architecture. To do so running the following:
arch -x86_64 pod install
You can see the full solution on building for multiple architectures here.
Open your Build Settings and set Excluded Architectures value as arm64
I am getting rid of my 8 year old mac, and am switching to the new m1 macbook air, but none of my old projects are running. I have installed cocoapods succesfully, but a lot of my big projects are running into errors, even after updating all the pods and running everything through Rosetta. Here are some of the errors I am running into in Xcode:
Could not find module 'PodName' for target
'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator
No such module 'PodName'
These are just a few, encountering many errors. I tried updating these pods, reinstalling them, etc. but nothing is working. Has anyone with a m1 mac had any success with this?
You can tweak your project architecture or add the following at the very end of your Podfile (and run pod update again) :
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
This seems likely related to this question & answer here: Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
Basically what you'll need to do is make sure that:
The architectures being built is set to Standard Architectures (ARCHS_STANDARD)
That you add an 'excluded' architecture setting, for Any iOS Simulator and set it to arm64
That should get you up and running.
One thing to note (that caught me up for a while): Make sure that you do not have the Build Setting of "Valid Architectures" (VALID_ARCHS). If you do, delete the line entirely. It was causing issues for me, because it was effectively ignoring the new paradigm that Apple wants us to use (Architectures + Excluded Architectures).
Finally, if you do not see VALID_ARCHS but you're still unable to run it, one thing that worked for me (since I also was coming back to an old project) was to:
Add in VALID_ARCHS and set it to Standard architectures
Build the app (get the errors as expected)
Delete the line
Re-build the app
This stumped me for ages.
You need to add the following line inside your pod file inside your project.
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
Add it for each build configuration. The full code to do this is:
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
There is also a chance that on an M1 machine you need to compile your pods using the x86_64 architecture. To do so running the following:
arch -x86_64 pod install
You can see the full solution on building for multiple architectures here.
Open your Build Settings and set Excluded Architectures value as arm64
My project builds fine, but when i build as previewing it shows lots of errors. Have already restarted my Mac and used pod install and pod update, but it still persists.
The screenshot that shows an error in the code isthe only error that refers to some code, the other "red" errors don't refer to any fisic code
Edit: FAIL DIAGNOSIS:
umbrella header for module 'GoogleUtilities' does not include header 'GULSwizzler.h' [-Werror,-Wincomplete-umbrella]
SchemeBuildError: Failed to build the scheme "MedicalApp"
umbrella header for module 'GoogleUtilities' does not include header 'GULSwizzler.h' [-Werror,-Wincomplete-umbrella]
Build target FirebaseCoreDiagnostics:
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
I think the correct pod is pod 'FirebaseCore', not pod 'Firebase/Core'. Try changing that pod and see if it works. Some of the "yellow" errors will remain, but the app should still build.
Your problem is here as written :
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0
Copy and paste this code to your podfile. After go to terminal and make pod update
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Just updated my project to Xcode12 and tried to compile. I keep getting "file not found" errors for multiple modules from the pods included in my project.
I tried to follow these instructions mentioned here but that didn't work.
Error: Could not build Objective-C module 'Firebase'
I still see this error
Btw, this error isn't specific to just Firebase. My project is mostly objective c with some swift files.
Any thoughts on how to fix this ?
Changing the 'Build Active Architecture' to NO in the pods project fixed the issue for me.
Change the Build System can fix the errors. On your Xcode Workspace, Go File -> Workspace Settings. Then change to "Legacy Build System".
See my explanation, which contains the second section that can help by some Podfile attachment:
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] =
"arm64"
end
end
and some project configurations, for more info go to:
https://github.com/ElizaSapir/KnowlageSharing/blob/main/Xcode12Issues.md
When building my project in the new XCode5, I receive the following warning: Pods-App was rejected as an implicit dependency for 'libPods-App.a' because its architectures 'i386' didn't contain all required architectures 'x86_64'.
To fix that, select the Pods project in the left menu, then under the targets section select the Pods-#YourAppName# target and in the build settings click on the Architectures and press delete so it goes to the default option (Standard architectures (armv7, armv7s). More information can be found in this link.
Non of the other answers worked for me.
What eventually solved it for me is to make sure Build Active Architecture Only is set to Yes for Debug and No for Release in my app's xcodeproj file.
Also, because I have custom configurations, I had to add the following to the Podfile:
xcodeproj 'MyApp.xcodeproj', 'MyDebugConfiguration' => :debug, 'MyReleaseConfiguration' => :release
Take a look at the blog post here, it will do the work.
To make your Applications compatible for iPhone 5s and older models (till iPhone 3Gs running iOS6), select the following option for your architectures – “Standard Architectures – armv7, armv7s”. Do not select the option that says “Standard Architectures (including 64 bit)…”. Since the Arm instruction sets are backward compatible, any application compiled for armv7s will also run on the iPhone 5s or the iPhone 5c.
ARCHS = armv7 armv7s
For valid architectures in the build settings, you can specify arm64,
armv7, armv7s.
VALID_ARCHS = armv6 armv7 armv7s arm64
env:
CocoaPods v0.24.0
Xcode 5 from App Store
Add the following at the end of your Podfile.
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ARCHS'] = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"
end
end
end
Go to Project "pods", set "build active architecture only" to NO for debug.
Above solution is working for me.
I have just upgraded one of my projects to Xcode 6 and experienced this problem. To fix it, I changed the Base SDK of the Pods project to a real one (previously it was like unknown SDK).
I had this same issue. The warning suggested that the pod library was not included and as a result, the app failed to finish compiling. (It complained about a missing header file that was part of a Pod dependency).
If you are experiencing the same compilation issue, you might be able to resolve it with the following:
Select Pods project in the workspace
Select Pods project to
access Pods project-wide settings
Go to Build Settings
Search
for 'Build Active Architecture Only'
Set to 'NO'
This seemed to work for me, but YMMV.