Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 XCode 12 Status #8867

Closed
rigor789 opened this issue Sep 19, 2020 · 136 comments
Closed

🚨 XCode 12 Status #8867

rigor789 opened this issue Sep 19, 2020 · 136 comments

Comments

@rigor789
Copy link
Member

rigor789 commented Sep 19, 2020

Update (09/27):

We have released nativescript@7.0.9-rc.2 with additional fixes for running on a real device.

Details in this PR: NativeScript/ios-device-lib#70

Update (09/23):

We have released nativescript@7.0.9-rc.1 with fixes for running on a real device. This version reverted some changes from rc.0 - we expect this to run fine for both simulators and devices, however there may be other cases we need to take into account. Please try the latest RC (ideally revert manual changes in Podfiles, build configs etc and run ns clean) and if something isn't working, re-run with --log trace enable and share the logs with us.


We released nativescript@7.0.9-rc.0 that should allow building nativescript apps for the simulator using XCode12.

Please try it

npm i -g nativescript@rc

And then cleaning your project (ns clean) and re-running it. The apps should build successfully, and deploy to the simulator(s). If this works for you, consider leaving a 👍 on this issue to let us know - and if it fails to build/run leave a comment with the output logs (re-run the build with --log trace to get more verbose logs).

Known issues:

  • building with XCode 12 fails [Fix in RC]
  • deploying to an ios14 device (not simulator) gets stuck [Fix In RC1]
  • warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0 - this is a warning, that should not cause any issues with the build. If the build fails, it's likely related to another issue.
  • --release (and --env.production) not able to build the app. [Should Be OK in RC1]
  • running on a real device, the CLI cannot start/stop the app - the app has to be manually restarted. [Should be OK in RC2]
  • if you have a custom CFBundleName the cli will fail with No .ipa found in /.../platforms/ios/build/Debug-iphoneos directory.. [Looking into a fix]

Related issues:

@rigor789 rigor789 pinned this issue Sep 19, 2020
@NathanWalker NathanWalker added this to To do in @nativescript/cli via automation Sep 19, 2020
@NathanWalker NathanWalker added this to Needs triage in @nativescript/core via automation Sep 19, 2020
@NathanWalker NathanWalker moved this from Needs triage to In progress in @nativescript/core Sep 19, 2020
@NathanWalker NathanWalker moved this from To do to In progress in @nativescript/cli Sep 19, 2020
@asharghi

This comment has been minimized.

@NathanWalker

This comment has been minimized.

@asharghi

This comment has been minimized.

@NathanWalker

This comment has been minimized.

@asharghi

This comment has been minimized.

@NathanWalker

This comment has been minimized.

@asharghi

This comment has been minimized.

@Rho-bur
Copy link

Rho-bur commented Sep 20, 2020

I have fixed the 8861 for NS 6.8.0 by

Select the project or target -> Build Settings -> Excluded Architecture (if you can't see it make sure [All] properties are selected) and set the Excluded Architecture for 'Any iOS simulator SDK' -> 'arm64'.

as described here 656509.

@asharghi

This comment has been minimized.

@bmacdonald

This comment has been minimized.

@rigor789

This comment has been minimized.

@bmacdonald

This comment has been minimized.

@NathanWalker
Copy link
Contributor

NathanWalker commented Sep 20, 2020

@bmacdonald We have published @nativescript/localize 5.0.1 now which contains the hooks fix mentioned regarding CFBundleDisplayName and CFBundleName. That is the {N} 7 compat version. Let us know if you need a backported fix to the hooks in nativescript-localize 4.x if planning on staying on 6.5.x for awhile (we will need to coordinate a patch with @EddyVerbruggen if needed there).

@bmacdonald

This comment has been minimized.

@NathanWalker
Copy link
Contributor

NathanWalker commented Sep 21, 2020

@bmacdonald here's the fix for the 4.x series: EddyVerbruggen/nativescript-localize#100

@JCFowler
Copy link

JCFowler commented Sep 21, 2020

Hello, I'm having a weird issue now on iOS.

I have xCode 12, and i just updated nativescript using npm i -g nativescript@rc

But my code is still for 6.x.x.

Its working perfectly on simulator and I can run my app on 12.4 and 14.0 iOS. but when I send my app to Appcenter and download it on a real device running iOS 14, I'm gettin this weird error and can't even open the app.

"App Name" Needs to be updated
This app needs to be updated by the developer to work on this version of iOS.

Has anyone else seen this issue? I'm completely stumped on it.

@timdoege
Copy link

timdoege commented Sep 21, 2020

@JCFowler I tried the NS 7 cli rc on my NS 6.5-project and it builds, but it can't deploy to App Store / Testflight, stating

2020-09-21T15:53:51.6381490Z [15:53:51]: ERROR ITMS-90086: "Missing 64-bit support. iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK or later. We recommend using the default "Standard Architectures" build setting for "Architectures" in Xcode, to build a single binary with both 32-bit and 64-bit support."
2020-09-21T15:53:51.6383440Z ERROR ITMS-90203: "Invalid architecture: Apps that include an app extension and framework must support arm64."
2020-09-21T15:53:51.6385060Z Return status of iTunes Transporter was 1: ERROR ITMS-90086: "Missing 64-bit support. iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK or later. We recommend using the default "Standard Architectures" build setting for "Architectures" in Xcode, to build a single binary with both 32-bit and 64-bit support."
2020-09-21T15:53:51.6386720Z \nERROR ITMS-90203: "Invalid architecture: Apps that include an app extension and framework must support arm64."
2020-09-21T15:53:51.6387730Z The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
2020-09-21T15:53:51.6720960Z 
2020-09-21T15:53:51.6721620Z [!] Error uploading ipa file, for more information see above
2020-09-21T15:53:51.6954340Z ##[error]Error: fastlane failed with return code: 1
2020-09-21T15:53:51.6969790Z ##[section]Finishing: Publish to the App Store TestFlight track

(that is with and without the ARCH-changes in build.xcconfig from #8861)

Reverting back to using 6.8.0 of the CLI, the build succeeds and deploys correctly to Testflight.
My app-name is set by the nativescript-localize plugin - just make sure to use version 4.2.2 (just published).

@JCFowler
Copy link

JCFowler commented Sep 21, 2020

@timdoege
Thanks, I Just downgraded back to 6.8.0, and tried to build it, but i'm getting a build failed for simulators. (Both 12.4 and 14.0)

Error is: Command xcodebuild failed with exit code 65

Are you able to build on simulators?

But luckily on real devices, I am able to build and run! So Thank you so much!!

@edgardksb

This comment has been minimized.

@rigor789
Copy link
Member Author

rigor789 commented Sep 21, 2020

@JCFowler

Error is: Command xcodebuild failed with exit code 65

Can you re-run the build command with --log trace and see the full error log? That'd probably help pinpoint the issue - could be related to certs or anything really.

@edgardksb same here - re-run with --log trace and see if there's something more in the logs! For ios 14, you will need to use at least tns-ios@6.5.2 earlier versions will crash.

@timdoege Hmm, that's an odd one - could be related to the rc change, I'll have to test a release build. We may need to opt-out of this clause in release mode. In dev mode, this worked fine with an arm64 device (iPhone 6s) and x86_64 simulators (both ios14 and 13). (the current simulators are all x86_64).
NativeScript/nativescript-cli@85ba876#diff-55dbd132f583557f89bdf4525e1b4be0R125-R130

@facetious
Copy link
Contributor

facetious commented Sep 22, 2020

The symlink for the .app file is wrong in Debug-iphoneos:

~/example$ ls -ld platforms/ios/build/Debug-iphoneos/example.app
lrwxr-xr-x  1 ianmacdonald  staff  208 Sep 18 12:05 platforms/ios/build/Debug-iphoneos/example.app -> /Users/ianmacdonald/Library/Developer/Xcode/DerivedData/example-dutelroqwocqiafapaasnonxiehi/Build/Intermediates.noindex/ArchiveIntermediates/example/InstallationBuildProductsLocation/Applications/example.app
~/example$ ls -d /Users/ianmacdonald/Library/Developer/Xcode/DerivedData/example-dutelroqwocqiafapaasnonxiehi/Build/Intermediates.noindex/ArchiveIntermediates/example/InstallationBuildProductsLocation/Applications/example.app
ls: /Users/ianmacdonald/Library/Developer/Xcode/DerivedData/example-dutelroqwocqiafapaasnonxiehi/Build/Intermediates.noindex/ArchiveIntermediates/example/InstallationBuildProductsLocation/Applications/example.app: No such file or directory
~/example$ ls -d /Users/ianmacdonald/Library/Developer/Xcode/DerivedData/example-dutelroqwocqiafapaasnonxiehi/Build/Products/Debug-iphoneos/example.app
/Users/ianmacdonald/Library/Developer/Xcode/DerivedData/example-dutelroqwocqiafapaasnonxiehi/Build/Products/Debug-iphoneos/example.app

tl;dr, instead of Intermediates.noindex/ArchiveIntermediates/example/InstallationBuildProductsLocation/Applications, it should be Products/Debug-iphoneos.

@nativescript/core automation moved this from In progress to Closed Oct 3, 2020
@nativescript/cli automation moved this from In progress to Done Oct 3, 2020
@RibuRoyson
Copy link

RibuRoyson commented Oct 4, 2020

@NathanWalker updated my project to 7.0.10 & tns-ios to 6.5.3..still i'm getting that linkage error -1 & Command xcodebuild failed with exit code 65.. :( : (

@NathanWalker
Copy link
Contributor

NathanWalker commented Oct 4, 2020

@RibuRoyson we would suggest emailing support@nativescript.org with system details like node, npm and a sample of your package.json - the quickest help would be to send details on how to access project and we’d be happy to help.

@ngrie
Copy link

ngrie commented Oct 5, 2020

if you have a custom CFBundleName the cli will fail with No .ipa found in /.../platforms/ios/build/Debug-iphoneos directory.. [Looking into a fix]

@NathanWalker It looks like this is not yet fixed (Cli version 7.0.10, tns-ios 6.5.3). Are you still investigating this issue?

@RibuRoyson
Copy link

RibuRoyson commented Oct 5, 2020

Updated my node to 12.18.4 performed npm i g natievscript & ns clean..still the xcode error occurs..
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
CompileSwift normal x86_64 /Users/Ribu/Desktop/iMuthootNew/iMuthoot/platforms/ios/Pods/Cosmos/Cosmos/CosmosAccessibility.swift
CompileSwift normal x86_64 /Users/Ribu/Desktop/iMuthootNew/iMuthoot/platforms/ios/Pods/Cosmos/Cosmos/StarLayer.swift
(3 failures)

@rigor789
Copy link
Member Author

rigor789 commented Oct 5, 2020

@ngrie Right, that's something we haven't fixed yet - but you should be able to change the CFBundleName to ${PRODUCT_NAME} to get going in the meantime.

@RibuRoyson share the project if able, we can't fix something we can't reproduce ourselves!

@karlix
Copy link

karlix commented Oct 5, 2020

Thank you to everyone's input and reports here. We have published final cli and ios runtimes with the fixes:

  1. npm i -g nativescript (This will install latest 7.0.10 cli) - can always confirm with ns -v to see what you have installed
  2. Update ios runtime in devDependencies if using {N} 7 or in the nativescript key in your `package.json if using {N} 6

If you're using tns-ios (the JavaScript Core) runtime you'll want to update your project to use:

  • 6.5.3

If you're using @nativescript/ios (the new v8) runtime you'll want to update your project to use:

  • 7.0.1
  1. ns clean

We published a brief blog post about this: https://nativescript.org/blog/xcode-12-tsc-love-story/

Further reports can be reported separately.

@NathanWalker I was having this error and this solution has worked correctly for me.
Thank you very much

@eltharynd
Copy link

eltharynd commented Oct 5, 2020

I just followed the steps to upgrade and managed to make my app work again on simulators/devices...
i did a
tns publish ios

and it uploaded correctly but during review i got an email saying

ITMS-90512: Invalid sdk value - The value provided for the sdk portion of LC_VERSION_MIN_IPHONEOS in mypackagename.app/Frameworks/NativeScript.framework/NativeScript is 14.2 which is greater than the maximum allowed value of 14.0.

ITMS-90512: Invalid sdk value - The value provided for the sdk portion of LC_VERSION_MIN_IPHONEOS in mypackagename.app/Frameworks/TKLiveSync.framework/TKLiveSync is 14.2 which is greater than the maximum allowed value of 14.0.

any ideas what this means? and how to fix this?

@rigor789
Copy link
Member Author

rigor789 commented Oct 5, 2020

@eltharynd what runtime is that? @nativescript/ios or tns-ios?

@eltharynd
Copy link

eltharynd commented Oct 5, 2020

@rigor789
"@nativescript/ios": "7.0.1",

Is my understanding correct that the problem is that the libraries NativeScript and TKLiveSync are prebuilt and have been built with a beta sdk that can't go on the app store yet?
So are you planning to rebuild them with the release version of xcode and update nativescript?
or is there a way to fix this earlier?

I found a tmp workaround in #8937

@SaifulZiko
Copy link

SaifulZiko commented Oct 5, 2020

Hello All,
I have recently updated my NS app to the latest version and xcode to version 12 And now i can not open the app on my device/simulator.. both on xcode and "ns run ios" , app installed on the device but app does not open. From log i only got CONSOLE INFO: HMR: Hot Module Replacement Enabled. Waiting for signal.
NativeScript discarding uncaught JS exception!

And from xcode

Runtime initialization took 120ms
2020-10-05 17:33:33.581254+0200 MYDOC[40718:515534] CONSOLE INFO: HMR: Hot Module Replacement Enabled. Waiting for signal.
2020-10-05 17:33:33.631000+0200 MYDOC[40718:515534] NativeScript discarding uncaught JS exception!

my package.json
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN ",
"readme": "NativeScript Application",
"repository": "",
"dependencies": {
"@nativescript-community/drawingpad": "^4.0.0",
"@nativescript/camera": "^5.0.2",
"@nativescript/core": "~7.0.0",
"@nativescript/email": "^2.0.0",
"@nativescript/iqkeyboardmanager": "^2.0.0",
"@nativescript/webpack": "3.0.0",
"@nstudio/nativescript-snackbar": "^2.0.2",
"email-validator": "^2.0.4",
"nativescript": "^7.0.10",
"nativescript-bitmap-factory": "^1.7.1",
"nativescript-camera": "^4.2.0",
"nativescript-drawingpad": "^3.0.4",
"nativescript-email": "^1.5.3",
"nativescript-feedback": "^1.3.6",
"nativescript-imagepicker": "^6.1.0",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-local-notifications": "^3.2.2",
"nativescript-masked-text-field": "^4.0.1",
"nativescript-permissions": "^1.3.9",
"nativescript-share-file": "^1.0.6",
"nativescript-sqlite": "^2.3.3",
"nativescript-theme-core": "^1.0.4",
"nativescript-toasty": "^1.2.0",
"nativescript-ui-listview": "^9.0.2",
"nativescript-ui-sidedrawer": "^9.0.3",
"nativescript-xml2js": "^0.5.2",
"tns-i18n": "0.0.10",
"ts-loader": "^8.0.4"
},
"devDependencies": {
"@nativescript/ios": "7.0.1",
"@nativescript/types": "~7.0.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "6.4.5",
"lazy": "1.0.11"
},
"main": "app.js"
}

Does anyone have any idea? I have this problem since last week and don't know what went wrong :(

@eltharynd
Copy link

eltharynd commented Oct 5, 2020

@SaifulZiko first of all try running
tns clean
And then running again
tns run ios
.. old version files might still be there.. the crashes you describe stopped entirely for me with 7.0.1

And maybe share your tns info

@SaifulZiko
Copy link

SaifulZiko commented Oct 6, 2020

@eltharynd thanks for your response ... after "tns clean" whenever I try to run "ns run ios" I get this warning regarding cocopods
✄1�7 WARNING: CocoaPods is not installed or is not configured properly.
But its already installed
Successfully installed cocoapods-1.9.3
Parsing documentation for cocoapods-1.9.3
Done installing documentation for cocoapods after 2 seconds
1 gem installed

tns doctor:

No issues were detected.
✄1�7 Your ANDROID_HOME environment variable is set and points to correct directory.
✄1�7 Your adb from the Android SDK is correctly installed.
✄1�7 The Android SDK is installed.
✄1�7 A compatible Android SDK for compilation is found.
✄1�7 Javac is installed and is configured properly.
✄1�7 The Java Development Kit (JDK) is installed and is configured properly.
✄1�7 Xcode is installed and is configured properly.
✄1�7 xcodeproj is installed and is configured properly.
✄1�7 CocoaPods are installed.
✄1�7 CocoaPods update is not required.
✄1�7 CocoaPods are configured properly.
✄1�7 Your current CocoaPods version is newer than 1.0.0.
✄1�7 Python installed and configured correctly.
✄1�7 The Python 'six' package is found.
✄1�7 Xcode version 12.0.1 satisfies minimum required version 10.
✄1�7 Getting NativeScript components versions information...
✄1�7 Component nativescript has 7.0.10 version and is up to date.
✄1�7 Component @nativescript/core has 7.0.10 version and is up to date.
✄1�7 Component @nativescript/ios has 7.0.1 version and is up to date.
✄1�7 Component @nativescript/android is not installed.

@SaifulZiko
Copy link

SaifulZiko commented Oct 6, 2020

@eltharynd After updating all ...NOW i AM GETTING THIS :( I have no idea from where this NS-cloud came !
SKILMacMini:MY-DOC timmrichter$ tns clean
Error while loading nativescript-cloud is: Cannot find module '/Users/timmrichter/.local/share/.nativescript-cli/extensions/node_modules/nativescript-cloud'
(node:900) ExperimentalWarning: The fs.promises API is experimental
✄1�7 Cleaned directory hooks
✄1�7 Cleaned directory platforms
✄1�7 Cleaned directory node_modules
✄1�7 Cleaned file package-lock.json
✄1�7 Project successfully cleaned.
SKILMacMini:MY-DOC timmrichter$ ns run ios
Error while loading nativescript-cloud is: Cannot find module '/Users/timmrichter/.local/share/.nativescript-cli/extensions/node_modules/nativescript-cloud'
(node:929) ExperimentalWarning: The fs.promises API is experimental
Searching for devices...

@manojdcoder
Copy link

manojdcoder commented Oct 8, 2020

@NathanWalker I was facing this issue - NativeScript/nativescript-cli/issues/4846 with latest CLI. Even though I run with --no-hmr it still didn't work but passing --release helped. Still this becomes a pain when we actively make changes on application as the CLI will no longer watch for changes. Any suggestions?

@limux82
Copy link

limux82 commented Oct 12, 2020

Any news on the problems? Currently we are blocked in the daily work (nativescript/cli 7.0.10) tns-ios: 6.5.3?

The only way to work is manually remove the excluded_architecture opening the project with xCode

@eltharynd
Copy link

eltharynd commented Oct 12, 2020

@limux82 I'm not sure about the 6.x version but this issue has been fixed on the 7.x latest release #8937

You might wanna migrate to that if possible
https://nativescript.org/blog/nativescript-7-announcement/
The migration tool worked great for me, after that i only had to adapt my imports and it worked

@limux82
Copy link

limux82 commented Oct 12, 2020

Thanks I'm working on migrate to ns7, but it's not so simple when you have a big application with a lot of plugin with problem to migrate. I think that a framework has to be retro compatible in the build process, to avoid migration to other frameworks

@NathanaelA
Copy link
Contributor

NathanaelA commented Oct 12, 2020

@limux82

  • If you are using XCode 12; with @nativescript/core 6.5.x or later you want to use NS CLI 7.0.10 or later.
  • If you are using XCode 11; with tns-core-modules 6.5.x or later you want to use NS CLI 6.8.0

NS 7 requires XCode 12; Xcode 11 works with NS 6's cli...

@limux82
Copy link

limux82 commented Oct 14, 2020

HI
@NathanaelA
@NathanWalker
@eltharynd

It's what we have done XCode 11, tns-core-modules 6.5.3 and CLI 6.8.0
But I continued to have this error:

warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target '' from project '')warning: Mapping architecture armv7s to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target '' from project '')warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target '' from project '')warning: There are no architectures to compile for because all architectures in VALID_ARCHS (i386, x86_64) are also in EXCLUDED_ARCHS (i386, armv6, armv8, x86_64, arm64e). (in target '' from project '')
** BUILD FAILED **
Command xcodebuild failed with exit code 65

The only way to resolve the problem with the simulator was to add In App_resources ios

  1. In build.xconfig EXCLUDED_ARCHS_x86_64 = "";
  2. add a podfile with this
    post_install do |installer|
    installer.pods_project.build_configurations.each do |configuration|
    installer.pods_project.build_settings(configuration.name)['EXCLUDED_ARCHS'] = []
    end
    end

I have also a branch with the configuration with Xcode 11, @nativescript/core 7.0.x and @nativescript/ios7.0.2-rc and the last CLI 7.0.10 and I have the same problem. In android, skipping 2-3 plugins that are not updated to 7 it runs, instead in ios same problem. Now I will install xCode 12 to see if works with NS7. But After that can I continue to work with NS6 (we are not ready to migrate to 7 with master branch)?

In my opinion this issue should be reopen?

@romandrahan
Copy link

romandrahan commented Oct 14, 2020

We're still experiencing NativeScript/nativescript-cli#5411 with the latest @nativescript/ios@7.0.2-rc.1 and CLI 7.0.10.

@jcarolus
Copy link

jcarolus commented Oct 26, 2020

@NathanaelA

  • If you are using XCode 11; with tns-core-modules 6.5.x or later you want to use NS CLI 6.8.0

It seems like the tns-ios@6.5.3 is creating a XCode build config that has this new EXCLUDED_ARCHS strategy intended for XCode 12, while this is not working for XCode 11.

Previous builds with tns-ios@6.2.0 using CLI 6.7.8 (in our case we are now trying to update to 6.5.3 because of the invalid access pointer fix NativeScript/ios-runtime#1275) do not have any occurance of EXCLUDED_ARCHS in the platform directory - so are they supposed work for XCode 11?

@suprith-s-reddy
Copy link

suprith-s-reddy commented Dec 28, 2020

I still have this issue with the version of 7.0.12. Is anyone still facing this ?? My build is failing.

@7ammer
Copy link

7ammer commented Jan 25, 2021

I can't upgrade to ns7 due to plugin issues.
I can't use ns7 with my ns6 project - it doesn't work
I tried down grading command line tools and xcode to 11.7 - It didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests